Skip to content
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

Add docstrings to classes and functions for automated documentation + Clarity #49

Open
ayush9pandey opened this issue Jun 15, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@ayush9pandey
Copy link
Collaborator

This could be a running issue where every developer can try to add docstrings to existing classes and functions. For new additions to the software, we should check every pull request for docstrings as well.

@WilliamIX
Copy link
Collaborator

Good idea - I think Zoltan was doing this for BioCRNpyler. If you can set this up and teach it to me, I can add doc-strings to all of bioscrape cython code (I'm guessing I'm the only person who knows it well enough to do that at this point). Ideally there is a way to get detailed information on which functions don't have doc-strings, right?

@ayush9pandey
Copy link
Collaborator Author

ayush9pandey commented Jun 16, 2020

Yeah, once we setup the automated documentation tool we should be able to see what functions don't have doc strings. For now, we can add docstrings whenever we find that they are missing.

@zoltuz
Copy link

zoltuz commented Jun 16, 2020

The answer is flake8!

pip install flake8

pip install flake8-docstrings

By default, flake8 checks the PEP8 compliance, but with the docstring extension, it can do more:

flake8 --select D bioscrape
Filters for docstring errors (category D)

A way to automate: you can use a pre-commit hook, which runs after you execute the git commit command on your computer. Here's an example config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants