Skip to content

feat: Add support for Numpy docstrings #87

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

Merged
merged 13 commits into from
Feb 14, 2021

Conversation

aschmu
Copy link
Contributor

@aschmu aschmu commented Jan 4, 2021

This is an initial stab at supporting numpy style docstrings. The docstring_parser library is used, therefore not all errors are caught but I still think it's useful especially since the objective is to enable mkdocs to automatically document functions with the mkdocstrings plugin.

Speaking of mkdocstrings, I couldn't quite figure out how to switch (package-wide) to a different docstring style from the documentation 🤔 .

Fixes #7

@aschmu
Copy link
Contributor Author

aschmu commented Jan 4, 2021

CI is failing given that mkdocs is a dependency of pytkdocs and requires a version number lower than the current one (0.10.1) :
mkdocstrings (>=0.13.1,<0.14.0) requires pytkdocs (>=0.2.0,<0.10.0)

Maybe mkdocstrings should relax the versio number requirements ?

@pawamoy
Copy link
Member

pawamoy commented Jan 9, 2021

I just upgraded mkdocstrings version in pyproject.toml to 0.14.0, which accepts pytkdocs <0.11. You can rebase on master to see how CI behaves now.

@aschmu aschmu force-pushed the feat/add-numpy-docstring branch from b84d6ad to ab71d8d Compare January 9, 2021 19:53
@aschmu
Copy link
Contributor Author

aschmu commented Jan 9, 2021

Ok the CI is passing now !

Copy link
Member

@pawamoy pawamoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, looking good 🙂

Just a few nitpicks, and the new dependency should be made optional!

Thanks a lot 🙂

@aschmu
Copy link
Contributor Author

aschmu commented Jan 24, 2021

I've tried to address all the comments. CI quality is failing for some reason (it didn't with make check locally).
Same for a build on windows :/

@aschmu
Copy link
Contributor Author

aschmu commented Feb 4, 2021

Hello, did you have the time to review this PR ? Is there anything that can still be improved ?

@pawamoy
Copy link
Member

pawamoy commented Feb 7, 2021

Hi @aschmu, sorry for the delay! Thanks for addressing the previous comments! I've added a couple more. One of them could resolve the CI failure. If not I'll merge anyway, must simply be a CI cache issue 🙂

@pawamoy pawamoy merged commit de0424a into mkdocstrings:master Feb 14, 2021
@pawamoy
Copy link
Member

pawamoy commented Feb 14, 2021

Merci Achille 😄 !

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.

[FeatureRequest] Support the numpy docstring format
2 participants