Skip to content

docs: increase docstring coverage to 100% #4913

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 1 commit into from
Mar 7, 2025

Conversation

hai1337
Copy link
Contributor

@hai1337 hai1337 commented Mar 7, 2025

Added missing docstrings to acheive 100% coverage 🎉
image

Signed-off-by: Thomas, Hailee [email protected]
Signed-off-by: Patel, Narendra [email protected]>
Signed-off-by: Menchaca, Jesus [email protected]

fixes: #4900

Signed-off-by: Thomas, Hailee <[email protected]>
Signed-off-by: Patel, Narendra <[email protected]>>
Signed-off-by: Menchaca, Jesus <[email protected]>

fixes: intel#4900
Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

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

These are looking great. Can you run black to fixing the linting issues so we can merge these? (it usually fixes flake8 too) It looks like it's only complaining about 2 files:

  • cve_bin_tool/available_fix/redhat_cve_tracker.py
  • cve_bin_tool/error_handler.py

@hai1337 hai1337 force-pushed the add_docstring_coverage branch from d1d0efa to 1e72523 Compare March 7, 2025 22:13
@hai1337
Copy link
Contributor Author

hai1337 commented Mar 7, 2025

Hey @terriko, we were just about to open a PR for adding a docstring style guide to CONTRIBUTING.md and enforce a style in interrogate, but there are some conflicts with the Google style, e.g. it requires init to be documented but interrogate is set up to ignore that. Doing more research, Sphinx/reStructuredText style could be a better fit, especially since Sphinx is already used within the project and can generate some really nice code documentation. It might be worth creating a new issue to investigate this further. In the meantime, we will add some generic text in CONTRIBUTING.md for docstrings in another PR, and more work on defining and enforcing a style can be done later.

Since this PR used google style docstrings, I'll leave it up to you whether we want it merged or not, I do think the content is valuable either way.

Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

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

Let's merge this as is and file an issue, since it's not like our docstrings are entirely consistent yet anyhow. Thank you so much for working on this!

@terriko terriko merged commit 82ccffd into intel:main Mar 7, 2025
23 of 24 checks passed
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.

docs: increase docstring percentages
3 participants