Skip to content

doc: Use Numpydoc standard#101

Merged
arokem merged 4 commits intotee-ar-ex:masterfrom
skoudoro:numpydoc-standard
Feb 3, 2026
Merged

doc: Use Numpydoc standard#101
arokem merged 4 commits intotee-ar-ex:masterfrom
skoudoro:numpydoc-standard

Conversation

@skoudoro
Copy link
Collaborator

@skoudoro skoudoro commented Feb 3, 2026

fixed #43

This pull request focuses on standardizing docstring.

These changes will help ensure code clarity, improve maintainability, and enforce consistent documentation standards.

  • Added, expanded and improved NumPy-style docstrings for the whole project.
  • Upgraded pre-commit hooks for ruff and codespell, and added a numpydoc validation hook to .pre-commit-config.yaml to enforce docstring standards automatically.
  • Added a [tool.numpydoc_validation] section to pyproject.toml to configure docstring validation rules, exclusions, and overrides.

@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.06%. Comparing base (e5cec49) to head (4610e54).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #101   +/-   ##
=======================================
  Coverage   60.06%   60.06%           
=======================================
  Files          12       12           
  Lines        2454     2454           
=======================================
  Hits         1474     1474           
  Misses        980      980           
Flag Coverage Δ
unittests 60.06% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@arokem arokem left a comment

Choose a reason for hiding this comment

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

Great - thanks for doing this! I had some small suggestions, many of which are potentially too much, but take a look.

trx/workflows.py Outdated

Returns
-------
nibabel.streamlines.ArraySequence
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
nibabel.streamlines.ArraySequence
nibabel.streamlines.ArraySequence class instance

trx/workflows.py Outdated

Parameters
----------
streamlines : ArraySequence
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
streamlines : ArraySequence
streamlines : ArraySequence class instance

trx/workflows.py Outdated

Returns
-------
ArraySequence or None
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
ArraySequence or None
ArraySequence class instance or None

trx/workflows.py Outdated
Temporary directory where header.json is written.
reference : str
Reference anatomy used to derive affine and dimensions.
streamlines : ArraySequence
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
streamlines : ArraySequence
streamlines : ArraySequence class instance

trx/workflows.py Outdated
----------
tmp_dir_name : str
Temporary directory to store binary arrays.
streamlines : ArraySequence
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
streamlines : ArraySequence
streamlines : ArraySequence class instance

Copy link
Collaborator

@arokem arokem left a comment

Choose a reason for hiding this comment

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

Great - thanks for doing this! I had some small suggestions, many of which are potentially too much, but take a look.

… information.

Co-authored-by: Ariel Rokem <arokem@gmail.com>
@skoudoro
Copy link
Collaborator Author

skoudoro commented Feb 3, 2026

Thanks for the review @arokem , it is ready to go

@arokem arokem merged commit 9b6a77d into tee-ar-ex:master Feb 3, 2026
16 checks passed
@skoudoro skoudoro deleted the numpydoc-standard branch February 3, 2026 20:04
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.

Use numpy doc standard

2 participants