Improve support for modules/packages
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- documentation
Research direction
Review the “Documenting Modules” section and the function-documentation section it references, then compare their guidance with the proposed module headings in the issue. Done means the docs explain how to present routine listings and module-provided functions, classes, and variables without implying a literal “Routine Listings” section.
Written by the indexing model from the issue text.
Description
I apologize in advance if I have missed something seeking previous discussion on the topic.
I am finding some issues with following the numpydoc style guide wrt modules and packages. The documentation has a section "Documenting Modules" that says:
Each module should have a docstring with at least a summary line.
Other sections are optional, and should be used in the same order as for documenting functions
when they are appropriate
Then, a numbered list of items to be included is provided:
- summary
- extended summary
- routine listings
- see also
- notes
- references
- examples
With the explicit indication that
Routine listings are encouraged, especially for large modules, for which it is hard to get a good
overview of all functionality provided by looking at the source file(s) or the __all__ dict.
With this, it remains a bit unclear to me how the "routine listings" should be provided. Incidentally, also AI bots are confused and from this documentation end up suggesting that you should have a section entitled "Routine Listings", that is clearly not the case.
The problem is that using the sections "for documenting functions" does not really seem a good match. Functions have params and returns, which modules need not. On the other hand, modules tend to provide Functions, Classes, Module variables and constantes. All this could go under a section named "Attributes", but it seems a bit large as a catch-all.
IMHO, it would be nice if modules could rely on "Classes", "Other Classes", "Functions", "Other Functions" section entries.
Without them, I have noticed that for many packages, modules end up having no sectioning at all in the extended summary (which often results in a text that is not structured enough) or deviating completely from the numpydoc guidelines for modules (which may cause issues with IDES that rely on numpydoc to provide a "rich text" view of the docstrings).
- Dominant language
- Python
- Stars
- 354
- Forks
- 185
- Avg merge
- 4m
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from numpy/numpydoc
-
Don't require ``RT01`` for propertiesMay be free again @Nani-2007-code claimed this 30 days ago, and no pull request is open. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 57/100
-
DOC: Version link overflowing on navbarMay be free again @swoyer2 claimed this 52 days ago, and no pull request is open. Open
Difficulty 3/5 1-2 days Newbie friendliness 52/100
-
needs-decision
Difficulty 5/5 Over a week Newbie friendliness 35/100
Similar issues
-
00 - Bug component: numpy.linalg
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
521xueweihan/HelloGitHub#4543 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
emeryberger/CSrankings#15700 ·
Maintainers usually reply within 2 days
-
Bug | 工作不正常 Triage | 待检查
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
OneDragon-Anything/ZenlessZoneZero-OneDragon#3084 ·
Maintainers usually reply within 1 day
-
Task select patterns with uppercase letters never matchPossibly taken @manobhisriram claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day