plotly / dash

Data Apps & Dashboards for Python. No JavaScript Required.
https://plotly.com/dash
MIT License
21.54k stars 2.08k forks source link

Keep doc-string order for shape or exact props #2994

Closed CNFeffery closed 2 months ago

CNFeffery commented 2 months ago

In developing custom components, parameters defined by PropTypes.shape or PropTypes.exact should ensure that the automatically generated doc-string follows the original order in the source code.

Closes #2990

T4rk1n commented 2 months ago

There is failure in unit test that check for hardcoded values that needs to be updated:

5 failed

  • tests/unit/development/test_generate_class.py:105 test_docstring
  • tests/unit/development/test_generate_class_file.py:64 test_class_string
  • tests/unit/development/test_generate_class_file.py:73 test_class_file
  • tests/unit/development/test_metadata_conversions.py:77 test_docstring
  • tests/unit/development/test_metadata_conversions.py:87 test_docgen_to_python_args

For the first three. just need to copy the new generated content and paste it on: https://github.com/plotly/dash/blob/2ec3f5ccc6b0869f41bf6919994a08f7c24332b6/tests/unit/development/metadata_test.py

metadata_conversion can change the order of the docstrings: https://github.com/plotly/dash/blob/49a80bb3cd94cf6afc67bf285a2abe17f54f8fb8/tests/unit/development/test_metadata_conversions.py#L29-L65