Skip to content

Conversation

srivarra
Copy link

@srivarra srivarra commented Sep 11, 2025

Converts docstrings to NumPy.

Updated the tool.ruff section in the pyproject.toml. Primary changes here are adding numpydoc as the pydocstyle convention. Ignored a few rules to keep things reasonably sane. ruff ignores viscy/scripts, applications/ and examples/ currently. Expanded I001 to include all of the isort rules.

Added docstrings to public functions which didn't have them as the rule would throw errors for public classes, methods and functions otherwise. Some private methods and classes had docstrings and those were adjusted.

Converted the existing sphinx style docstrings to NumPy the style.

There are a handful of type hint fixes as well, but these are not super thorough and were the result of aligning docs.

I'm sure the contents of some of these are not completely accurate. We can either change the incorrect ones in this pr or in another.

@srivarra srivarra linked an issue Sep 11, 2025 that may be closed by this pull request
@ziw-liu
Copy link
Collaborator

ziw-liu commented Sep 11, 2025

Moved the current ruff configuration from the pyproject.toml file into it's own ruff.toml file

Is this necessary? I have been trying to restrict the proliferation of dev tooling config files.

@ziw-liu
Copy link
Collaborator

ziw-liu commented Sep 11, 2025

In general, please limit the diff to the absolute minimum, and keep PRs single-purpose.

@srivarra
Copy link
Author

Moved the current ruff configuration from the pyproject.toml file into it's own ruff.toml file

Is this necessary? I have been trying to restrict the proliferation of dev tooling config files.

Not necessary, but I find the separation to be nice for organization.

@ziw-liu
Copy link
Collaborator

ziw-liu commented Sep 11, 2025

Not necessary, but I find the separation to be nice for organization.

Can you revert this change?

@srivarra
Copy link
Author

Can you revert this change?

Sure

- Fixed conflicts in data modules (combined.py, triplet.py, hcs.py)
- Resolved classification.py parameter conflicts
- Updated transforms __init__.py imports
- Cleaned up _transforms.py duplicate classes
@srivarra srivarra force-pushed the docs/standardize-numpydocstrings branch from 100a2be to b6635d4 Compare September 18, 2025 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move to NumPy style docstrings?
2 participants