Skip to content

Conversation

@scverse-bot
Copy link

@scverse-bot scverse-bot commented Dec 24, 2025

cookiecutter-scverse released v0.7.0.

Changes

Changes

Fixes

Additional remarks

  • unsubscribe: If you don’t want to receive these PRs in the future,
    add skip: true to template-repos.yml using a PR or,
    if you never want to sync from the template again, delete the .cruft.json file in the root of your repository.
  • If there are merge conflicts, you need to resolve them manually.
  • The scverse template works best when the pre-commit.ci, readthedocs and codecov services are enabled.
    Make sure to activate those apps if you haven't already.

Summary by CodeRabbit

  • Chores
    • Updated minimum Python version requirement to 3.11+
    • Modernized build and test infrastructure with UV and Hatch tooling
    • Refactored GitHub Actions workflows for improved CI/CD automation
    • Updated documentation build system and Sphinx configuration
    • Streamlined pre-commit hooks and code quality tools
    • Added IDE configuration files for VS Code integration
    • Updated project metadata and classifier information

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 24, 2025

📝 Walkthrough

Walkthrough

This pull request modernizes the project's development infrastructure by migrating from traditional build tools to UV-based workflows, upgrading Python support from 3.8 to 3.11+, replacing linting tools (Black/isort/flake8 → Ruff/Biome), and introducing hatch for environment and test management. Configuration files are restructured, CI/CD workflows are enhanced with dynamic test discovery and automated release publishing, and documentation tooling is updated to Sphinx with Myst.

Changes

Cohort / File(s) Summary
Build & Package Management
pyproject.toml, .bumpversion.cfg
Extensive reconfiguration: requires-python upgraded 3.8→3.11, classifiers extended to 3.14, dependencies reorganized into hatch dependency-groups, bumpversion config removed, tool.ruff added with lint rules, pytest config updated, legacy isort/black sections removed.
CI/CD Workflows
.github/workflows/build.yaml, .github/workflows/test.yaml, .github/workflows/release.yaml
Build workflow migrated to UV-based builds with setup-uv; test workflow refactored with dynamic hatch environment discovery via get-environments job and matrix-driven execution; new automated release workflow added for PyPI publication via trusted publishing.
Linting & Code Quality
.flake8, .pre-commit-config.yaml, .codecov.yaml, biome.jsonc
.flake8 deleted; pre-commit hooks completely overhauled (Black/Prettier/isort removed, Ruff/Biome/pyproject-fmt added); .codecov.yaml indentation standardized; new biome.jsonc introduced with JSON/JSONC formatting and VCS integration.
GitHub Issue Templates
.github/ISSUE_TEMPLATE/bug_report.yml, .github/ISSUE_TEMPLATE/feature_request.yml, .github/ISSUE_TEMPLATE/config.yml
Restructured YAML: bug_report updated with new type/Versions fields and session-info2 guidance; feature_request flattened and type changed; config.yml indentation corrected for proper YAML parsing.
Documentation Configuration
docs/conf.py, docs/contributing.md, docs/extensions/typed_returns.py
conf.py: project_name→project rename, katex extension added, intersphinx Python→3.13, scanpy added, repository URL sourced from metadata, custom CSS and hatch doc building integrated; contributing.md introduced with hatch/uv/pytest guidance; typed_returns.py enhanced with typing and generator-based returns parsing.
Documentation Tooling & Content
docs/Makefile, docs/make.bat, docs/developer_docs.md, docs/_templates/autosummary/class.rst, docs/_static/css/custom.css
Sphinx build scripts (Makefile, make.bat) deleted; developer_docs.md removed and replaced with contributing.md; autosummary class template refactored to use name instead of fullname with shortened underlines; custom CSS added for dataframe font sizing.
Repository Configuration
.gitignore, .cruft.json, .readthedocs.yaml, .editorconfig
.gitignore revised (buck-out, .venv, *.cache added; build/dist/.egg-info removed); .cruft.json expanded with new context keys and exclusion rules; .readthedocs.yaml upgraded to Ubuntu 24.04, Python 3.13, Node.js added, replaced Sphinx config with hatch-driven build jobs; .editorconfig extended with YAML/TOML/JSON indent_size: 2 override.
VS Code Configuration
.vscode/extensions.json, .vscode/launch.json, .vscode/settings.json
Three new files introduced: extensions.json with marketplace recommendations (GitHub, Python, Jupyter, TOML, linting tools); launch.json with debug configs for Sphinx HTML builds and pytest; settings.json with Ruff/Biome as formatters, formatOnSave enabled, pytest configured with colored output.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

🐰 The tools grow bright with modern ways,
UV bundles builds in fewer days,
Ruff hops in where Black once stood,
Hatch orchestrates—oh, isn't it good?
From workflows new to config clean,
The finest dev setup you've ever seen! 🚀

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Update template to v0.7.0' directly aligns with the PR's primary objective of updating the repository template to cookiecutter-scverse v0.7.0, as confirmed by the PR objectives and the extensive changes across configuration files and workflows.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (6)
.gitignore (1)

1-21: Consider keeping IDE directory ignores.

The PR removes IDE-specific ignore entries (.idea/, .vscode/). While this allows IDE configurations to be committed (like the new .vscode/settings.json), it also means developers' personal IDE settings could accidentally be committed. Consider re-adding these entries or documenting which IDE files should be committed vs. ignored.

Potential additions to .gitignore
+# IDEs (personal configs)
+/.idea/
+/.vscode/*
+!/.vscode/settings.json
+!/.vscode/launch.json

This approach ignores personal IDE configs while allowing specific committed files.

docs/contributing.md (4)

90-93: Typo: "VScode" should be "VS Code".

The official spelling uses a space: "VS Code".

🔎 Proposed fix
-In case you are using VScode, now open the command palette (Ctrl+Shift+P) and search for `Python: Select Interpreter`.
+In case you are using VS Code, now open the command palette (Ctrl+Shift+P) and search for `Python: Select Interpreter`.
 Choose `Enter Interpreter Path` and paste the path to the virtual environment from above.

-In this future, this may become easier through a hatch vscode extension.
+In the future, this may become easier through a hatch VS Code extension.

106-106: Typo: "initalize" should be "initialize".

🔎 Proposed fix
-To initalize a virtual environment in the `.venv` directory of your project, simply run
+To initialize a virtual environment in the `.venv` directory of your project, simply run

133-134: Unused link reference definition.

The [hatch environments] reference is defined but never used in the document.

🔎 Proposed fix
-[hatch environments]: https://hatch.pypa.io/latest/tutorials/environment/basic-usage/
 [uv]: https://docs.astral.sh/uv/

264-264: Typo: "napoloen" should be "napoleon".

🔎 Proposed fix
-- [Numpy-style docstrings][numpydoc] (through the [napoloen][numpydoc-napoleon] extension).
+- [Numpy-style docstrings][numpydoc] (through the [napoleon][numpydoc-napoleon] extension).
.github/workflows/test.yaml (1)

99-103: Inconsistent indentation in check job steps.

The uses directive has 8 spaces of indentation instead of the expected 6, which is inconsistent with other steps in the workflow.

🔎 Proposed fix
     runs-on: ubuntu-latest
     steps:
-        - uses: re-actors/alls-green@release/v1
-          with:
-            jobs: ${{ toJSON(needs) }}
+      - uses: re-actors/alls-green@release/v1
+        with:
+          jobs: ${{ toJSON(needs) }}
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 461165f and bc12e1c.

📒 Files selected for processing (27)
  • .bumpversion.cfg
  • .codecov.yaml
  • .cruft.json
  • .editorconfig
  • .flake8
  • .github/ISSUE_TEMPLATE/bug_report.yml
  • .github/ISSUE_TEMPLATE/config.yml
  • .github/ISSUE_TEMPLATE/feature_request.yml
  • .github/workflows/build.yaml
  • .github/workflows/release.yaml
  • .github/workflows/test.yaml
  • .gitignore
  • .pre-commit-config.yaml
  • .readthedocs.yaml
  • .vscode/extensions.json
  • .vscode/launch.json
  • .vscode/settings.json
  • biome.jsonc
  • docs/Makefile
  • docs/_static/css/custom.css
  • docs/_templates/autosummary/class.rst
  • docs/conf.py
  • docs/contributing.md
  • docs/developer_docs.md
  • docs/extensions/typed_returns.py
  • docs/make.bat
  • pyproject.toml
💤 Files with no reviewable changes (5)
  • .bumpversion.cfg
  • docs/developer_docs.md
  • docs/Makefile
  • .flake8
  • docs/make.bat
🧰 Additional context used
🪛 LanguageTool
docs/contributing.md

[grammar] ~39-~39: Use a hyphen to join words.
Context: ... interact with hatch through its command line interface (CLI). Running one of the...

(QB_NEW_EN_HYPHEN)


[grammar] ~90-~90: Ensure spelling is correct
Context: ...y3.14-stable ``` In case you are using VScode, now open the command palette (Ctrl+Shi...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~93-~93: Ensure spelling is correct
Context: ... this may become easier through a hatch vscode extension. :::: ::::{group-tab} uv A...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~106-~106: Ensure spelling is correct
Context: ...phinx plugin pins an older version. To initalize a virtual environment in the .venv di...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[style] ~139-~139: Consider using a different verb for a more formal wording.
Context: ...commit checks will either automatically fix issues with the code, or raise an error...

(FIX_RESOLVE)


[style] ~227-~227: Consider using a different verb for a more formal wording.
Context: ...versions early on and gives you time to fix the issue or reach out to the developer...

(FIX_RESOLVE)


[style] ~239-~239: ‘in brief’ might be wordy. Consider a shorter alternative.
Context: ...dhere to [Semantic Versioning][semver], in brief > Given a version number MAJOR.MINOR.P...

(EN_WORDINESS_PREMIUM_IN_BRIEF)


[uncategorized] ~244-~244: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...version when you add functionality in a backwards compatible manner, and > 3. PATCH version when you...

(EN_COMPOUND_ADJECTIVE_INTERNAL)


[uncategorized] ~245-~245: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...r, and > 3. PATCH version when you make backwards compatible bug fixes. > > Additional labels for pr...

(EN_COMPOUND_ADJECTIVE_INTERNAL)


[uncategorized] ~252-~252: The official name of this software platform is spelled with a capital “H”.
Context: ...atically create a git tag and trigger a Github workflow that creates a release on [PyP...

(GITHUB)

🪛 markdownlint-cli2 (0.18.1)
docs/contributing.md

33-33: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


33-33: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


34-34: Link fragments should be valid

(MD051, link-fragments)


61-61: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


133-133: Link and image reference definitions should be needed
Unused link or image reference definition: "hatch environments"

(MD053, link-image-reference-definitions)


162-162: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


162-162: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)

🪛 Ruff (0.14.10)
docs/extensions/typed_returns.py

20-20: Unused function argument: section

(ARG001)

🔇 Additional comments (34)
docs/extensions/typed_returns.py (3)

3-6: LGTM! Modern typing practices applied.

The addition of from __future__ import annotations and the typing imports from collections.abc follow current Python best practices and enable better type checking.


12-17: LGTM! Clean refactoring with proper type hints.

The function now has clear type annotations and uses the walrus operator idiomatically. The generator pattern is memory-efficient and the regex logic is correct.


20-20: The section parameter is required for API compatibility with NumpyDocstring._parse_returns_section and must remain in the signature even though it is unused in the implementation. No changes needed.

.codecov.yaml (1)

1-17: LGTM! Formatting standardization with no behavioral changes.

The YAML indentation has been standardized while preserving all semantic configuration values.

.github/ISSUE_TEMPLATE/config.yml (1)

1-5: LGTM! YAML structure corrected.

The contact_links structure has been reformatted to proper YAML syntax while preserving all fields.

docs/_static/css/custom.css (1)

1-4: LGTM! Appropriate CSS styling for dataframe tables.

The CSS rule appropriately targets notebook output dataframes with a specific selector and reasonable font-size reduction.

.editorconfig (1)

11-12: LGTM! Appropriate indentation for YAML/TOML files.

The new section correctly applies 2-space indentation to YAML, TOML, and .cruft.json files, which aligns with common conventions for these file types.

.vscode/extensions.json (1)

1-18: LGTM! Well-chosen extension recommendations.

The recommended extensions align well with the repository's tooling stack (Python, Jupyter, TOML, Ruff, Biome, EditorConfig) and enhance the developer experience for contributors.

.vscode/launch.json (1)

1-33: LGTM! Well-configured debug launch settings.

Both debug configurations are appropriately set up:

  • The documentation build config correctly uses Sphinx module with standard arguments
  • The test debug config properly integrates with pytest and VSCode's test debugging features
biome.jsonc (1)

1-17: Biome is properly configured through pre-commit.

Biome is included in the project's development setup via .pre-commit-config.yaml (v2.3.10 from the biomejs/pre-commit repository). This is the appropriate mechanism for managing formatting tools in a Python project and properly supports the biome.jsonc configuration.

.readthedocs.yaml (2)

8-16: All concerns verified and confirmed valid. The build setup is correctly configured:

  • ReadTheDocs asdf support: Confirmed—ReadTheDocs supports asdf in build jobs
  • hatch docs:build script: Confirmed—properly defined in pyproject.toml (line 66) as sphinx-build -M html docs docs/_build -W {args}
  • Output directory alignment: Confirmed—both hatch and .readthedocs.yaml use docs/_build
  • UV configuration: Confirmed—UV is configured as hatch's installer and integrated throughout workflows

4-7: No issues found. ReadTheDocs officially supports Ubuntu 24.04 and Python 3.13 build environments, and the project's minimum Python version requirement (>=3.11) is fully compatible with Python 3.13, which is explicitly listed as a supported Python version in the project's configuration.

.github/workflows/build.yaml (1)

17-26: LGTM! Modern UV-based build workflow.

The migration from Python-based build tools to UV is well-implemented:

  • blob:none filter optimizes clone performance
  • fetch-depth: 0 ensures version detection works correctly
  • UV provides faster, more reliable builds
  • uvx twine check --strict validates package metadata
.pre-commit-config.yaml (1)

9-38: Excellent modernization of pre-commit hooks.

The migration from Black/isort/flake8 to Ruff+Biome is a significant improvement:

  • Ruff is significantly faster and replaces multiple tools
  • Biome provides consistent JSON/JS/TS formatting
  • pyproject-fmt keeps project metadata standardized
  • check-merge-conflict helps catch template sync issues

The exclusion of .cruft.json from biome-format is appropriate since cruft controls that file's formatting.

.cruft.json (1)

1-43: LGTM! Proper cruft configuration for template v0.7.0.

The cruft configuration correctly reflects the template update:

  • Pinned to v0.7.0 release
  • ide_integration: true enables VSCode configuration files
  • _copy_without_render prevents templating of complex workflows
  • _exclude_on_template_update protects project-specific files (docs, src, tests)
  • Jinja2 environment variables improve template rendering
docs/_templates/autosummary/class.rst (2)

12-12: No action needed. The RST heading underlines in the template are correctly formatted and match the heading text lengths exactly:

  • Line 12: "Attributes table" (16 chars) matches "~~~~~~~~~~~~~~~~" (16 tildes)
  • Line 38: "Attributes" (10 chars) matches "~~~~~~~~~~" (10 tildes)
  • Line 51: "Methods" (7 chars) matches "~~~~~~~" (7 tildes)

All underlines comply with reStructuredText formatting requirements.

Likely an incorrect or invalid review comment.


16-16: The cross-reference concern is valid, but this template was created (not changed) with ~{{ name }}.{{ item }} in the v0.7.0 update.

Using {{ name }} (the short class name) in autosummary cross-references without the module prefix may fail to resolve. Cross-references in autosummary blocks typically need fully qualified names or at minimum the module context. The template should use {{ fullname }} instead of {{ name }} on lines 16 and 29 to ensure cross-references to class attributes and methods resolve correctly.

.github/workflows/release.yaml (1)

1-27: No action needed on version pinning.

The workflow correctly uses pypa/gh-action-pypi-publish@release/v1, which is the officially recommended approach for PyPI's Trusted Publishing. This is a tagged release reference (not a branch) that automatically receives security updates within the v1.x track. For maximum immutability, SHA pinning could be considered, but the current approach aligns with official best practices for standard deployments.

.github/ISSUE_TEMPLATE/feature_request.yml (1)

3-3: GitHub issue form uses valid syntax; no changes needed.

The type field is a documented, optional root-level field in GitHub issue forms that sets the issue type applied to issues created from the form. This field is managed at the organization level and may have varying availability. The current syntax is correct and will not cause validation failures.

Likely an incorrect or invalid review comment.

docs/contributing.md (1)

1-35: Well-structured contributing guide.

The document provides comprehensive guidance covering multiple tooling options (hatch, uv, pip) which aligns well with the project's modernization efforts. The tabbed interface for different tools is a nice touch for developer flexibility.

.github/ISSUE_TEMPLATE/bug_report.yml (2)

27-41: Consider simplifying the version field description.

The instructions reference session-info2 which aligns with the dependency change in pyproject.toml. The render: python attribute will syntax-highlight user input, which is helpful.


3-3: The type field syntax is valid. GitHub issue form templates support an optional top-level type key to set the organization/repository issue type as a string. Ensure your GitHub organization/repository has issue types enabled if using this feature.

pyproject.toml (5)

17-24: Python version bump and pre-release testing.

Bumping minimum Python to 3.11 and including 3.14 in classifiers is forward-looking. Ensure downstream users are aware of the minimum version change if this is a breaking change from a previous release.


35-58: New dependency-groups structure looks correct.

The [dependency-groups] section follows PEP 735. The separation of dev, test, and doc groups aligns with the hatch environment configurations below.


60-88: Hatch environment configuration is well-structured.

The matrix configuration for testing across Python 3.11 and 3.14 with stable and pre-release dependencies is a good approach. The UV_PRERELEASE environment variable override for pre-release testing is correctly configured.


90-128: Ruff configuration is comprehensive.

Good selection of lint rules with sensible ignores. The per-file ignores for __init__.py, docs/*, and tests/* are appropriate.


130-135: The pytest configuration is correct as-is. Pytest 9.0 and later support native TOML configuration under [tool.pytest] with native types (including array syntax for addopts). Additionally, strict = true is a valid pytest configuration option that enables grouped strictness (strict_config, strict_markers, strict_parametrization_ids, strict_xfail). The proposed changes would introduce errors, not fix them.

Likely an incorrect or invalid review comment.

.github/workflows/test.yaml (3)

15-44: Dynamic hatch environment discovery is a great approach.

Extracting test environments from hatch ensures pyproject.toml remains the single source of truth. The jq transformation correctly labels pre-release environments and extracts Python versions.


46-89: Test job configuration looks solid.

Good practices observed:

  • continue-on-error for pre-release jobs prevents blocking releases on upstream issues
  • Coverage combination fallback handles edge cases
  • OIDC-based Codecov upload is more secure than token-based auth

91-98: Alls-green check job is appropriate.

Using if: always() ensures the check runs regardless of test outcomes, and alls-green simplifies branch protection configuration.

docs/conf.py (4)

22-30: Improved metadata extraction.

Using project instead of project_name and extracting URLs from package metadata is cleaner and reduces hardcoded values. Good refactoring.


60-64: New Sphinx extensions align with template updates.

The additions of sphinxcontrib.katex, sphinx_tabs.tabs, IPython highlighting, and sphinxext.opengraph enhance documentation capabilities as described in the PR objectives.


130-130: Good defensive check for KaTeX prerendering.

Checking for Node.js availability before enabling prerendering prevents build failures in environments without Node.js installed.


97-101: Intersphinx mapping updates look correct.

The TODO comment about Python 3.14 compatibility with ReadTheDocs is helpful context. Adding scanpy to intersphinx mapping enables cross-referencing with scanpy documentation.

Comment on lines +2 to +4
"[python][json][jsonc]": {
"editor.formatOnSave": true,
},
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Fix incorrect VSCode language selector syntax.

The combined language selector "[python][json][jsonc]" is not valid VSCode settings syntax. VSCode requires separate language-specific configuration blocks. This configuration will not apply formatOnSave to any of these languages.

🔎 Proposed fix
-    "[python][json][jsonc]": {
-        "editor.formatOnSave": true,
-    },
     "[python]": {
+        "editor.formatOnSave": true,
         "editor.defaultFormatter": "charliermarsh.ruff",
         "editor.codeActionsOnSave": {
             "source.fixAll": "always",
             "source.organizeImports": "always",
         },
     },
     "[json][jsonc]": {
+        "editor.formatOnSave": true,
         "editor.defaultFormatter": "biomejs.biome",
     },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"[python][json][jsonc]": {
"editor.formatOnSave": true,
},
"[python]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.codeActionsOnSave": {
"source.fixAll": "always",
"source.organizeImports": "always",
},
},
"[json][jsonc]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "biomejs.biome",
},
🤖 Prompt for AI Agents
.vscode/settings.json around lines 2 to 4: the combined language selector
"[python][json][jsonc]" is invalid and won't apply settings; replace it with
separate language-specific blocks so each language has its own key (e.g.
"[python]": {...}, "[json]": {...}, "[jsonc]": {...}) and move the
"editor.formatOnSave": true into each of those blocks; ensure trailing commas
are removed where needed to keep valid JSON.

Comment on lines +12 to +14
"[json][jsonc]": {
"editor.defaultFormatter": "biomejs.biome",
},
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix VSCode language selector for JSON/JSONC.

The selector "[json][jsonc]" should be split into two separate entries: "[json]" and "[jsonc]". While this syntax might work in some VSCode versions, the recommended approach is to use separate selectors for clarity and compatibility.

🔎 Proposed fix
-    "[json][jsonc]": {
+    "[json]": {
+        "editor.defaultFormatter": "biomejs.biome",
+    },
+    "[jsonc]": {
         "editor.defaultFormatter": "biomejs.biome",
     },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"[json][jsonc]": {
"editor.defaultFormatter": "biomejs.biome",
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome",
},
"[jsonc]": {
"editor.defaultFormatter": "biomejs.biome",
},
🤖 Prompt for AI Agents
.vscode/settings.json around lines 12 to 14: the language selector currently
uses a combined key "[json][jsonc]" which is nonstandard; replace it with two
separate entries by adding distinct keys "[json]" and "[jsonc]" each setting
"editor.defaultFormatter" to "biomejs.biome" so both JSON and JSONC are
explicitly configured and compatible across VSCode versions.

Comment on lines +22 to +23
if lines_raw[0] == ":":
del lines_raw[0]
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Guard against potential IndexError on empty lines_raw.

Accessing lines_raw[0] without checking if the list is non-empty could raise an IndexError if self._consume_to_next_section() returns an empty result. While this may be rare in practice, defensive programming suggests adding a guard.

🔎 Proposed fix
-    if lines_raw[0] == ":":
-        del lines_raw[0]
+    if lines_raw and lines_raw[0] == ":":
+        del lines_raw[0]
🤖 Prompt for AI Agents
In docs/extensions/typed_returns.py around lines 22 to 23, the code accesses
lines_raw[0] without ensuring lines_raw is non-empty which can raise IndexError;
update the condition to first check that lines_raw is truthy (non-empty) before
checking its first element (e.g., if lines_raw and lines_raw[0] == ":":) so the
deletion only runs when the list has at least one element.

Comment on lines +137 to +142
[tool.coverage.run]
source = [ "cellcharter" ]
patch = [ "subprocess" ]
omit = [
"**/test_*.py",
]
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

coverage.py run configuration options documentation

💡 Result:

Key documentation pages:

  • Configuration reference (the [run] section, .coveragerc and options). [1]
  • Command reference for coverage run (command-line flags and notes). [2]

Important run/configuration options (can be set on the command line or in [run] of .coveragerc / setup.cfg / pyproject.toml):

  • branch: measure branch coverage (boolean). [1]
  • command_line: command to run when no program args given. [1]
  • concurrency: concurrency backends (thread, multiprocessing, gevent, greenlet, eventlet). [1][2]
  • source / include / omit: which files to measure (use --source on run or set in config). [2][1]
  • parallel_mode / parallel: create separate data files for parallel runs (for later combine). [2]
  • context / dynamic contexts: set static or dynamic measurement contexts. [2][1]
  • append: accumulate data across runs (command-line flag --append). [2]
  • pylib (-L / --pylib): include Python's standard-library files. [2]
  • timid: use simpler slower tracer (--timid) when tracing issues. [2]
  • rcfile: specify alternate config file (--rcfile=FILE) or env COVERAGE_RCFILE. [2][1]
  • save-signal: save data on receipt of a signal (added v7.10). [2]

Notes:

  • Prefer putting repeated options in .coveragerc ([coverage:run] or [tool.coverage.run]) so they apply to subprocesses and subsequent commands. [1][2]
  • Some options (like concurrency=multiprocessing) require putting options in the config file so child processes inherit them. [1][2]

See the Coverage.py docs for the full option list and detailed semantics. [1][2]

Sources:
[1] Coverage.py — Configuration reference (run section).
[2] Coverage.py — Execution: coverage run (command reference).


Invalid coverage configuration option.

patch is not a valid option under [tool.coverage.run]. Valid options include source, branch, omit, include, concurrency, parallel_mode, append, and others documented in the coverage.py configuration reference. Remove this line or replace with branch = true if branch coverage measurement was intended.

 [tool.coverage.run]
 source = [ "cellcharter" ]
-patch = [ "subprocess" ]
 omit = [
   "**/test_*.py",
 ]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
[tool.coverage.run]
source = [ "cellcharter" ]
patch = [ "subprocess" ]
omit = [
"**/test_*.py",
]
[tool.coverage.run]
source = [ "cellcharter" ]
omit = [
"**/test_*..py",
]
🤖 Prompt for AI Agents
In pyproject.toml around lines 137 to 142, the coverage configuration uses an
invalid key "patch" under [tool.coverage.run]; remove the "patch = [
\"subprocess\" ]" line or, if you intended branch coverage, replace it with a
valid setting such as "branch = true" and move any concurrency/parallel settings
to supported keys; ensure only valid coverage.py options (e.g., source, branch,
omit, include, concurrency, parallel_mode, append) are present.

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.

1 participant