Map subclass page in docs can have two "Notes" sections #7286
Labels
Documentation
Affects the documentation
Effort Low
Requires a small time investment
Feature Request
New feature wanted!
Good First Issue
The best issues for new people to tackle!
map
Affects the map submodule
Package Novice
Requires little knowledge of the internal structure of SunPy
Priority Low
Slow action required
We have this code:
sunpy/sunpy/map/mapbase.py
Line 198 in ef9b401
that automatically appends a fresh "Notes" section with a couple of notes and a warning:
sunpy/sunpy/map/mapbase.py
Lines 83 to 105 in ef9b401
However, if the subclass docstring already has a "Notes" section, that means that the page in the docs will have two "Notes" sections (e.g., https://docs.sunpy.org/en/v5.1.1/generated/api/sunpy.map.sources.AIAMap.html). (Also, the "Notes" section is supposed to come before the "References" and Examples" sections, so blanket appending a "Notes" section can result in out-of-order sections, even if the subclass docstring does not already have a "Notes" section.)
We should try to do something more sophisticated, such as searching for the best point of insertion in to the docstring.
The text was updated successfully, but these errors were encountered: