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

Move class documentation to class docstrings #2525

Merged
merged 2 commits into from
Oct 3, 2024
Merged

Conversation

natestemen
Copy link
Member

Description

By default Sphinx uses class docstrings when building documentation pages, instead of docstrings from special functions like __init__ (see the sphinx variable autoclass_content1 for more details). We had a few instances of valuable documentation hiding in __init__ docstrings that was never being displayed in the API-doc! This PR remedies that by ensuring it is picked up by sphinx.

Footnotes

  1. One can set this variable to look at both the class docstring and the __init__ function, but it then creates duplicated sections specifying the arguments to the class.

Copy link

codecov bot commented Oct 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.72%. Comparing base (411e234) to head (ef70732).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2525   +/-   ##
=======================================
  Coverage   98.72%   98.72%           
=======================================
  Files          90       90           
  Lines        4156     4156           
=======================================
  Hits         4103     4103           
  Misses         53       53           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@cosenal cosenal left a comment

Choose a reason for hiding this comment

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

👍 thanks

mitiq/observable/pauli.py Outdated Show resolved Hide resolved
@natestemen natestemen merged commit 935e287 into main Oct 3, 2024
18 checks passed
@natestemen natestemen deleted the nts-class-docstrings branch October 3, 2024 03:53
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.

2 participants