Skip to content

numpydoc adoption tick list #4721

@tkknight

Description

@tkknight

📚 Documentation

GOAL: Improve the docstring content and ensure numpydocs formatting.

Related to #5637.

Below is a list of all the python files in iris/lib. In order to make ground ensuring our code based support numpdoc fully the below checklist can be used to track our progress.

Recommend we slowly work thru this list using multiple pull requests, all may contribute!

For each file we should:

How to Test usinf ruff (preferred)

Install ruff into your iris-dev conda environment via:

  • pip install ruff

Temporarily enable the ruff checker by commenting out this line: https://github.com/SciTools/iris/blob/main/.ruff.toml#L30 Once all the repo the source is compliant this ignore rule can be removed.

You can then run the checker via (running against time.py in this example):

  • ruff time.py

How to Test (not preferred)

Unless we find something better we can use pydocstyle. Install into your iris-dev conda environment via:

  • pip install pydocstyle

You can then run the docstring checker via (running against time.py in this example):

  • pydocstyle --convention=numpy --add-ignore=D105 time.py

We can use the numpy convention otherwise there maybe conflicts in the errors codes (fix one and and the other triggers and vice versa).

Proposed additional error codes to ignore:

  • D105 - Missing docstring in magic method

Hit List

Commands used to create the list: cd lib/iris; find . -name "*.py" -print | grep -v "^./tests". Feel free to remove entries is they are not relevant.

Metadata

Metadata

Assignees

Labels

Good First IssueA good issue to take on if you're just getting started with Iris developmentType: Documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions