numpy / numpy/numpydoc

Lots of UserWarnings for Unknown Section despite GL06 rule exemption

Open
#589 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
355
Forks
181
Avg merge
1d 9h
Merged PRs (30d)
3

Description

Hi there,

I'm wondering what the best way forward is for my use case. I currently make use of the module-level docstrings to supply the documentation on my project's ReadTheDocs page. This can include adding sections that are not in the standard.

Ignoring GL06/Unknown Section should be enough to handle this, but I still end up with many UserWarning messages when running the tool, e.g.

/pc/clone/_SwdT2XXRaOD_6gJ7rZXAA/py_env-python3/lib/python3.12/site-packages/numpydoc/docscrape.py:421: UserWarning: Unknown section Calendar Handling Utilities
  self[section] = content
/pc/clone/_SwdT2XXRaOD_6gJ7rZXAA/py_env-python3/lib/python3.12/site-packages/numpydoc/docscrape.py:421: UserWarning: Unknown section Cf-convention Checking
  self[section] = content
/pc/clone/_SwdT2XXRaOD_6gJ7rZXAA/py_env-python3/lib/python3.12/site-packages/numpydoc/docscrape.py:421: UserWarning: Unknown section Data Checks
  self[section] = content
/pc/clone/_SwdT2XXRaOD_6gJ7rZXAA/py_env-python3/lib/python3.12/site-packages/numpydoc/docscrape.py:421: UserWarning: Unknown section Data Flags
  self[section] = content
/pc/clone/_SwdT2XXRaOD_6gJ7rZXAA/py_env-python3/lib/python3.12/site-packages/numpydoc/docscrape.py:421: UserWarning: Unknown section Formatting Utilities For Indicators
  self[section] = content
/pc/clone/_SwdT2XXRaOD_6gJ7rZXAA/py_env-python3/lib/python3.12/site-packages/numpydoc/docscrape.py:421: UserWarning: Unknown section Indicator Utilities
  self[section] = content
/pc/clone/_SwdT2XXRaOD_6gJ7rZXAA/py_env-python3/lib/python3.12/site-packages/numpydoc/docscrape.py:421: UserWarning: Unknown section Dictionary And Yaml Parser
  self[section] = content
...

It would be great if ignoring GL06 would also prevent these UserWarnings from being emitted.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at numpydoc/docscrape.py:421 and trace how unknown sections produce UserWarnings and how the GL06 exemption is applied. Verify the behavior with the project's existing tests, if available. Done means ignored GL06 sections no longer emit these warnings while other unknown sections still do.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.