-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Consistently use param: type in docstrings #4284
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
Comments
The numpydoc style guide is very clear about the spaces:
Not sure if the bug was fixed in the meantime, @OriolAbril ? It would be great to add a numpydoc style checker to the pre-commit... |
On v3 docs, the issue is still there. Checkout the function docstring rendering here
+1. We can use this http://www.pydocstyle.org/en/4.0.0/usage.html#usage-with-the-pre-commit-git-hooks-framework I just ran pydocstyle check locally at v3 branch $ pydocstyle --convention=numpy . | wc -l
3122 So, there are > 1500 docstring warnings 😭 |
As @Sayam753 says, this is a combination of not following numpydoc on all the docstrings in the codebase plus a bug in the v3 theme (which is now fixed). I think we should follow numpydoc and like the lint check on it for v4 and I would therefore keep this open. |
this would be an easy thing to do with docs, let’s try to find a couple of numpy docstring violations and create some smaller issues. cc: @OriolAbril |
this is already part of https://pymc-data-umbrella--13.org.readthedocs.build/en/13/webinars/contributing_to_documentation/docstring_tutorial.html. I think creating smaller issues for this will be more work than anything. I was planning on a single issue where we'd checkmark those following numpydoc (which I didn't realize before but is the exact opposite, we should use |
Closing this in favour of #5459 which covers more changes and is more clear. |
The docstring of
sample
(frompymc3.sampling
) is written asparam : type
:and in the docs this shows up as
which, given the PyMC3 docs configurations, doesn't look great.
On the other hand,
fast_sample_posterior_predictive
is written asparam: type
:In the docs this shows up as
which, given the PyMC3 docs configurations, looks better.
Possible fixes here would be:
param : type
looks better and then apply that consistentlyparam: type
consistentlyI'd be more inclined towards the latter
UPDATE
Please wait before making a big PR for this, we may be able to resolve the custom sphinx theme
The text was updated successfully, but these errors were encountered: