-
Notifications
You must be signed in to change notification settings - Fork 7
Add numpydoc validation as a pre-commit hook #145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Note: the numpydoc pre-commit hook currently reports existing docstring and encoding issues. This PR only introduces the validation hook and it doesn’t attempt to fix existing violations to keep the scope focused. |
The pre-commit failures are from the new |
If you could fix them here, that would be great. I'd rather not merge something that will make the test suite fail. If you see any other BrainGlobe repos that this could be added to (without a huge reformatting of existing docstrings), let us know. In theory all BG repos should use the numpy standard, but we haven't really spend any time standardising this. |
Thanks for clarifying, I will fix the existing docstring issues in this PR so the test suite passes cleanly, and push an update shortly. |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
|
Hi @AlgoFoe, as dicussed in the developer meeting today, it would be great if we could converge on a single configuration here and in the atlas API. Ideally something that enforces as much standardisation as possible, without being too onerous to adopt here, or in other BrainGlobe repos. |
|
Thanks @adamltyson, sounds good. I am aligning the configuration with the atlas API and adding minimal docstrings to move toward a single shared setup. |
Description
What is this PR
Why is this PR needed?
What does this PR do?
numpydoc-validationas a pre-commit hook and enables automated validation of docstrings against the numpydoc standard.References
How has this PR been tested?
pre-commit run numpydoc-validation --all-filesand confirming that the hook executes and reports existing docstring issues.Is this a breaking change?
Does this PR require an update to the documentation?
Checklist: