Repository navigation
Update template to v0.8.0 - #140
Merged
Merged
Conversation
Applies the cookiecutter-scverse v0.8.0 template update (#137) via `cruft update`, resolving conflicts by hand since the automated PR was based on the pristine template baseline instead of current main. - Pin GitHub Actions to immutable commit hashes and add zizmor as a pre-commit hook to harden CI against supply-chain attacks - Migrate from pre-commit to prek, and add mypy type checking (with overrides for currently-untyped third-party deps and pre-existing type errors, to be cleaned up incrementally) - Migrate docs from sphinx-tabs to sphinx-design and move shared sphinx extensions into scverse-misc - Add an autofix.ci workflow, list installed packages in test CI output, and other minor CI/docs housekeeping from the template release Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #140 +/- ##
==========================================
- Coverage 83.61% 83.60% -0.01%
==========================================
Files 23 23
Lines 1001 1025 +24
==========================================
+ Hits 837 857 +20
- Misses 164 168 +4
🚀 New features to boost your workflow:
|
Removes the blanket ignore_errors overrides added when wiring up mypy from the template and actually resolves the 15 real type errors they were masking, across _cmap, _generative_mixin, _module, _metrics, _interpretability, _latent, and porting. Only the ignore_missing_imports override for untyped third-party deps (scanpy/scipy/scvi/sklearn) remains. Notable fixes: - _cmap.py: give each colormap dict its own name and a Literal-keyed type instead of reusing one dynamically-retyped `cmap_data` variable - _generative_mixin.py: declare the attributes SparseLatentMixin expects from the model classes it's combined with, under TYPE_CHECKING - _metrics.py: annotate torchmetrics state/buffer attributes so they're seen as Tensor rather than the generic Module fallback - _latent.py: add an _as_frame() helper to narrow anndata's `DataFrame | Dataset2D` to a concrete DataFrame, since this module's operations (groupby/query/sort_values/mutation) require an in-memory AnnData anyway Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Reworks the previous commit's type fixes to be less intrusive and more honest about what is actually known: - _latent.py: `_as_df`/`_as_array` now narrow anndata's `.obs`/`.var`/`.X` annotations with `typing.cast` instead of an isinstance check that raised. The raise added an untested error path (and a repeated name string at every call site) for a change that is only about types. - _generative_mixin.py: declare the attributes the mixin expects from its sibling base class as `Callable`, rather than fabricating full signatures for an upstream (untyped) scvi API that mypy cannot verify them against. - _cmap.py: keep the per-colormap data dicts private; `plotting.cmap` is a public module, so they should not become API. - _interpretability.py: lift `_dim_number` out of the plotting function body and raise `ValueError` rather than assert. - porting.py: express the terminal chain entry as `if migration := ...` (None means "no parameter change"), which the dict already means, instead of asserting it away. - Drop the two `# type: ignore` comments and the bare asserts these replace. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The hook shells out to `hatch`, which pre-commit.ci cannot provide: mypy needs the project's dependencies installed, and pre-commit.ci has no network access while running hooks. It failed there with "Executable `hatch` not found" while every other hook passed. mypy still runs locally through prek and on CI in the `Pre-commit checks` job, which installs hatch first. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
moinfar
force-pushed
the
fix-template-update-v0.8.0
branch
from
September 16, 2026 22:04
bc8505e to
66a051a
Compare
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.
Applies the cookiecutter-scverse v0.8.0 template update (#137) via
cruft update, resolving conflicts by hand since the automated PR was based on the pristine template baseline instead of current main.