Repository navigation
Improve generated docstring readability and NumPy-style structure - #839
munechika-koyo wants to merge 2 commits into
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Can you rebase this back on main. There is some older commits in here. |
|
|
||
| Other Parameters | ||
| ---------------- | ||
| See `matplotlib.animation.Animation.save`. |
There was a problem hiding this comment.
not sure why this is removed?
There was a problem hiding this comment.
Numpydoc doesn't allow this format in this area. “Other parameters” must follow the same style as “Parameters”.
There was a problem hiding this comment.
we should still have the linkback in the existing docs tho
There was a problem hiding this comment.
Isn't it enough to show them only in the existing "See also" section?
|
Are you intending to do a full sweep of the doc strings to make them numpy compliant or are these just cherry picked? Need to brush up on my numpy docstrings. In general many of the doc strings used a style that I am not too familiar with but the new code I added I just did in the same style. |
- Updated "Note" sections to "Notes" in various files for uniformity. - Changed "Example" sections to "Examples" in multiple locations to align with Numpy style. - Improved parameter documentation formatting in `ticker.py`, `scale.py`, `legend.py`, and others. - Ensured consistent use of parameter descriptions and examples throughout the codebase. - Enhanced docstring structure in `cartesian.py`, `geo.py`, `plot.py`, `colors.py`, `config.py`, `gridspec.py`, and `ticker.py`.
8614c1b to
90b40a2
Compare
First, I tried to check the generated docstrings by inspecting cherry-picked sections, but now I am considering a more comprehensive approach, like using |
|
@munechika-koyo I would halt on moving further. We first started with that the formatting is wrong, I believe this was fixed recently. As the docs are not compatible already with numpy docstrings we don't need to retrofit this. It requires a stance on what UltraPlot wants to be, I think doc string compliance to numpy is not high on it -- as we could also move away from dynamic doc strings which is higher on my list I think in terms of urgency. |
Follow-up to #836 for #835.
PR #836 corrected docstring normalization before snippet expansion, subplot C/F ordering documentation, and the projection parameter declaration.
Expanded docstrings are still serialized as single-line escaped literals in built Python sources, and several shared templates contain malformed NumPy-style sections or parameter entries.
This PR makes generated docstrings readable as multiline literals and fixes the remaining structural problems across the package.
Changes
Validation