Skip to content

chore: bump cookiecutter-scverse template to v0.7.0#20

Merged
Marius1311 merged 2 commits into
mainfrom
template/v0.7.0
Apr 30, 2026
Merged

chore: bump cookiecutter-scverse template to v0.7.0#20
Marius1311 merged 2 commits into
mainfrom
template/v0.7.0

Conversation

@Marius1311
Copy link
Copy Markdown
Member

Summary

Apply the still-relevant diffs from cookiecutter-scverse v0.7.0 on top of
current main. Replaces the stale auto-PR #18 (which is now far enough
behind that a clean cherry-pick is simpler than a rebase).

Behavior or invariants changed

  • [project.optional-dependencies].test is removed. Test tooling now
    lives in [dependency-groups].test (PEP 735). The hatch-test env keeps
    CPU + GPU coverage via features = ["cpu", "gpu"] plus
    dependency-groups = ["dev", "test"]. Anyone previously running
    pip install scembed[test] should switch to uv sync --group test (or
    install cpu / gpu extras directly).
  • Hatch test matrix: Python ["3.11", "3.13"]["3.11", "3.14"].
  • Pre-release matrix runs no longer block CI (continue-on-error: true
    when the env name contains pre).
  • KaTeX replaces MathJax for docs math rendering (RTD now has Node.js).

Out of scope (intentionally not adopted)

  • Codecov OIDC: kept on the existing token. Will be a separate change if/when
    we want it.
  • Pre-commit hook autoupdates (biome, pyproject-fmt, ruff): handled in a
    follow-up PR that branches off this one.
  • Agent-neutral repo guides / .github/copilot-instructions.md rewrite:
    separate docs PR.

Tests run

  • uvx hatch env show -i lists the new hatch-test.py3.11 and
    hatch-test.py3.14 envs with features = [cpu, gpu] and
    dependency-groups = [dev, test].
  • uvx hatch run docs:build succeeds locally (KaTeX + sphinxcontrib-katex
    install correctly into the docs env).
  • Pre-commit hooks pass (current versions; the autoupdate PR will reformat
    the new pyproject.toml once merged).

Reviewer focus

  • pyproject.toml: the optional-dependencies.test removal and the
    hatch-test env layout (CPU+GPU features + dev/test groups).
  • docs/conf.py: KaTeX swap and the katex_prerender guard.
  • Workflows: confirm the dropped defaults.run.shell block doesn't break
    any multi-line run: step.

Closes

Supersedes #18.

Apply the still-relevant diffs from the v0.7.0 template update on top of
current main (replaces the stale auto-PR #18).

- `.cruft.json`: bump commit + checkout to `v0.7.0`.
- Issue templates: `labels:` → `type:` (Bug, Enhancement); collapse one
  bug-report bullet onto a single line.
- Workflows: drop the redundant top-level `defaults.run.shell` block,
  bump `actions/checkout@v4` → `@v5` and `astral-sh/setup-uv@v5` → `@v7`,
  drop `cache-dependency-glob` (uv handles it). Add
  `continue-on-error: ${{ contains(matrix.env.name, 'pre') }}` to the
  test matrix so pre-release runs do not block CI.
- `.readthedocs.yaml`: python `3.12` → `3.13`, add `nodejs: latest` for
  KaTeX prerendering.
- `docs/conf.py`: replace `sphinx.ext.mathjax` with `sphinxcontrib.katex`,
  enable `katex_prerender` when a Node binary is available, rename the
  local `project_name` to `project`. Pin the python intersphinx target
  to `3.13` until RTD ships 3.14.
- `docs/contributing.md`: bump example versions (`py3.10`/`py3.13` →
  `py3.11`/`py3.14`).
- `pyproject.toml`: migrate `dev`, `doc`, `test` from
  `[project.optional-dependencies]` to `[dependency-groups]` (PEP 735).
  Drop the `optional-dependencies.test` extra entirely; CPU+GPU coverage
  in CI now comes from `features = ["cpu", "gpu"]` on the hatch-test env
  combined with `dependency-groups = ["dev", "test"]`. Bump matrix
  Python to `["3.11", "3.14"]`. Add `sphinxcontrib-katex` to the doc
  group.

Codecov upload stays token-based (intentionally not switching to OIDC
in this PR).
PyPI has quarantined the `lightning` distribution
(https://pypi.org/simple/lightning/ -> project-status: quarantined,
zero installable files). `scvi-tools>=1.3` depends on
`lightning>=2.0`, so any hatch-test env that includes the `[gpu]`
extra fails uv resolution with 'no versions of lightning'.

This is independent of the v0.7.0 template bump but blocks PR #20
because the new test matrix exercises a fresh resolve on Python 3.11
and 3.14. Pre-existing main CI only passed on cached envs.

Add a [tool.uv.sources] redirect to the upstream GitHub monorepo at
tag 2.6.2 (>=2.0, satisfies scvi-tools). The override only takes
effect for direct deps, so list `lightning` explicitly in the
[gpu] extra.

Drop both lines once PyPI restores the package.
Marius1311 added a commit that referenced this pull request Apr 30, 2026
Bump pinned hook versions and run `pre-commit run --all-files`. Replaces
the stale auto-PR #19. Stacked on top of #20 since pyproject-fmt v2.21
reformats the `[dependency-groups]` layout introduced there.

- biomejs/pre-commit v2.3.10 → v2.4.13
- tox-dev/pyproject-fmt v2.11.1 → v2.21.1
- astral-sh/ruff-pre-commit v0.14.10 → v0.15.12

The `pyproject.toml` reformat (flatten `[tool.pytest.ini_options]` into
`ini_options.*` keys under `[tool.pytest]`, same for `[tool.coverage]`)
is purely the new pyproject-fmt's preferred layout.
Marius1311 added a commit that referenced this pull request Apr 30, 2026
PyPI has quarantined the `lightning` distribution; `scvi-tools`
depends on `lightning>=2.0`, so any hatch-test env with the
`[gpu]` extra fails uv resolution. Cherry of the fix that lands on
PR #20; included so this PR's CI is green independently. Drop once
PyPI restores the package.
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.51%. Comparing base (1135120) to head (6af4787).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #20   +/-   ##
=======================================
  Coverage   78.51%   78.51%           
=======================================
  Files          11       11           
  Lines        1303     1303           
=======================================
  Hits         1023     1023           
  Misses        280      280           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Marius1311 Marius1311 merged commit b46f85c into main Apr 30, 2026
8 checks passed
Marius1311 added a commit that referenced this pull request Apr 30, 2026
* chore: pre-commit autoupdate

Bump pinned hook versions and run `pre-commit run --all-files`. Replaces
the stale auto-PR #19. Stacked on top of #20 since pyproject-fmt v2.21
reformats the `[dependency-groups]` layout introduced there.

- biomejs/pre-commit v2.3.10 → v2.4.13
- tox-dev/pyproject-fmt v2.11.1 → v2.21.1
- astral-sh/ruff-pre-commit v0.14.10 → v0.15.12

The `pyproject.toml` reformat (flatten `[tool.pytest.ini_options]` into
`ini_options.*` keys under `[tool.pytest]`, same for `[tool.coverage]`)
is purely the new pyproject-fmt's preferred layout.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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