Repository navigation
Fix documentation warnings, unify docstring style and use a src layout - #589
Merged
Merged
Conversation
The docs build reported 94 warnings. Fix them and make the docs workflow
fail on warnings (-W --keep-going) so they do not come back.
- Mark repeated automodule directives and the classes that are documented
both on the wfdb and io pages as :no-index:, so each object is indexed
once (duplicate object descriptions). This option requires Sphinx 7.2,
so raise the pinned Sphinx version of the docs group from 7.0.0 to 7.2.6.
- Do not link the numpydoc method tables to autosummary stubs, which do
not exist (numpydoc_class_members_toctree = False).
- Fix too short title underlines.
- Fix reStructuredText in docstrings: blank lines before lists, literal
blocks for the EDF/MATLAB/WAV format descriptions, label and class
tables, the rdedfann dictionary and the gqrs_detect pseudo-code, and
"..." continuation lines in doctest examples (which also fixes a typo
in a csv_to_wfdb example).
- Rename the "Examples:" and "Example" docstring sections to the section
name numpydoc knows ("Examples").
No code is changed.
Docstrings and comments were wrapped inconsistently, with 86 lines over
the 88 columns used for the code. Rewrap them and enforce the limit with
ruff (W505, max-doc-length = 88).
- Prose comments and docstrings are reflowed.
- Long shell commands in the test docstrings, doctest examples, the EDF
specification tables, the AnnotationLabel examples and commented-out
code are split over several lines.
- The EDF+ annotation table in the rdedfann docstring is now a literal
block like the other format descriptions.
- Fix a few typos in the lines that were touched ("thee", "mooth",
"enfore").
No code is changed.
Put the summary directly after the opening quotes instead of on the next
line, and make it a single line. Summaries that were wrapped over several
lines or were too long for one line are shortened, and the remaining text
moves into the extended description below it. Lists in the first paragraph
are now separated from the text by a blank line.
Only docstrings change. Fix a few typos on the way ("suration", a doubled
period) and make the descriptions of the CSV converters accurate.
Move wfdb/ to src/wfdb/, which is the default module root of uv_build, so the module-root setting is no longer needed. The tests now always run against the installed package instead of the copy in the working directory, and the documentation build adds src/ to sys.path.
Member
|
Very cool, thanks for the huge clean up! One minor thing: the new summary of |
tompollard
approved these changes
Oct 28, 2026
Contributor
Author
|
I'll fix this tomorrow! Going to bed now! |
Member
|
Sleep well, and thanks again! I'm going to merge and we can update as needed later. |
Member
|
Raised issue here: #590 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the last part of the cleanup that started with #578, #580, #581, #582 and #588. It builds the documentation without warnings, applies one docstring style everywhere, and moves the package to a
srclayout. Each commit can be reviewed on its own.-W --keep-goingso they stay fixed.automoduledirectives and the classes documented on both thewfdbandiopages are marked:no-index:, so each object is indexed once.numpydoc_class_members_toctree = False, because the autosummary stubs it links to do not exist.:no-index:option needs Sphinx 7.2, so the pinned Sphinx version of thedocsgroup goes from 7.0.0 to 7.2.6..git-blame-ignore-revs.csv_to_wfdbandcsv2ann(which described reading a WFDB header) now match what the functions do. Also listed in.git-blame-ignore-revs.src/wfdb. This is the default module root ofuv_build, so themodule-rootsetting is removed. The tests now always run against the installed package, anddocs/conf.pyaddssrctosys.path. Files are moved without changes, sogit blameandgit log --followkeep working. The wheel and the sdist build as expected.DEVELOPING.md. The hashes stay valid with a merge commit, as in Replace black and pylint with Ruff #582.AGENTS.mdandCLAUDE.mdwith short guidance for coding agents (commands and conventions).CLAUDE.mdonly points toAGENTS.md.Checked locally: Ruff lint and format, the docs build with
-W --keep-going, and the tests that work offline on Python 3.11 with the lowest dependencies and on 3.15.@tompollard this concludes the tooling and infrastructure refresh. Any remaining changes are minor, such as fixing the ignored Ruff rules, which can be done later in follow-up PRs.