Skip to content

docs: improve NumPy-style docstrings in atlas_specific modules - #468

Open
AlgoFoe wants to merge 5 commits into
brainglobe:mainfrom
AlgoFoe:format-api-ref-atlas-specific
Open

docs: improve NumPy-style docstrings in atlas_specific modules#468
AlgoFoe wants to merge 5 commits into
brainglobe:mainfrom
AlgoFoe:format-api-ref-atlas-specific

Conversation

@AlgoFoe

@AlgoFoe AlgoFoe commented Aug 13, 2026

Copy link
Copy Markdown
Member

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?

  • The codebase lacked consistent docstrings, making Sphinx autodoc output incomplete and hard to read.

What does this PR do?

  • Adds/updates NumPy-style docstrings (module, class, method, function level) in atlas_specific modules.

References

  • Part of Issue-96

How has this PR been tested?

  • No functional changes, existing tests pass.

Is this a breaking change?

  • No.

Does this PR require an update to the documentation?

  • Yes.

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality (unit & integration)
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

@AlgoFoe
AlgoFoe marked this pull request as ready for review August 13, 2026 13:22
@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.67%. Comparing base (bdcdf90) to head (87f30a5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #468      +/-   ##
==========================================
+ Coverage   89.64%   89.67%   +0.03%     
==========================================
  Files          27       27              
  Lines        1313     1317       +4     
==========================================
+ Hits         1177     1181       +4     
  Misses        136      136              

☔ View full report in Codecov by Harness.
📢 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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR improves Sphinx autodoc output by adding and standardizing NumPy-style docstrings (and some related typing annotations) across Allen Brain Atlas atlas_specific modules.

Changes:

  • Added module-level docstrings and expanded function/method docstrings in Allen atlas streamline and gene-expression modules.
  • Added/clarified type annotations for several helper functions and GeneExpressionAPI methods.
  • Improved parameter/return documentation to better match NumPy docstring conventions.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
brainrender/atlas_specific/allen_brain_atlas/streamlines.py Adds module docstring and expands docstrings/type hints for streamline download/conversion utilities.
brainrender/atlas_specific/allen_brain_atlas/gene_expression/ge_utils.py Adds module docstring plus docstrings/type hints for cache/download/load helpers used by gene expression workflows.
brainrender/atlas_specific/allen_brain_atlas/gene_expression/api.py Adds module/class/method docstrings and typing for the Allen gene expression API client.
Suppressed comments (1)

brainrender/atlas_specific/allen_brain_atlas/gene_expression/ge_utils.py:42

  • The docstring return type currently says "str or bool", but the function only returns a path string or False. Tightening this to "str or False" improves the generated NumPy-style documentation.
    Returns
    -------
    str or bool
        Path to the cached folder if found, False if not cached.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread brainrender/atlas_specific/allen_brain_atlas/gene_expression/ge_utils.py Outdated
Comment thread brainrender/atlas_specific/allen_brain_atlas/streamlines.py Outdated
Comment thread brainrender/atlas_specific/allen_brain_atlas/gene_expression/api.py Outdated
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