Modernize packaging & tooling from the scverse template#215
Open
Zethson wants to merge 1 commit into
Open
Conversation
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
12a12dc to
6437c77
Compare
grst
reviewed
Jun 12, 2026
Comment on lines
123
to
192
| @@ -112,22 +143,22 @@ jobs: | |||
| shell: bash | |||
| run: | | |||
| set -euo pipefail | |||
|
|
|||
| BRANCH="${GITHUB_REF#refs/heads/}" | |||
| echo "Current branch: $BRANCH" | |||
|
|
|||
| git config user.name "github-actions[bot]" | |||
| git config user.email "github-actions[bot]@users.noreply.github.com" | |||
|
|
|||
| git add tests/pytest_results_py*.txt | |||
|
|
|||
| if git diff --cached --quiet; then | |||
| echo "No changes to commit." | |||
| exit 0 | |||
| fi | |||
|
|
|||
| git commit -m "CI: update pytest results ($BRANCH)" | |||
|
|
|||
| for attempt in 1 2 3 4 5; do | |||
| echo "Push attempt $attempt..." | |||
| git pull --rebase --autostash origin "$BRANCH" || true | |||
| @@ -136,7 +167,7 @@ jobs: | |||
| fi | |||
| sleep $((attempt * 5)) | |||
| done | |||
|
|
|||
| echo "Push failed after retries." | |||
| exit 1 | |||
|
|
|||
| @@ -159,3 +190,16 @@ jobs: | |||
| if [ "$code" != "0" ]; then | |||
| exit "$code" | |||
| fi | |||
There was a problem hiding this comment.
What's the purpose of this, @lauraluebbert?
Do we even need this?
6437c77 to
9847d39
Compare
Adopt the modern parts of the scverse cookiecutter while preserving gget's mdbook docs, bundled binaries/data, and live-API test workflow. Packaging: - Consolidate setup.py + setup.cfg + requirements.txt + dev-requirements.txt + MANIFEST.in into a single pyproject.toml (hatchling backend, static version 0.30.6). Bundled binaries (gget/bins) and data (gget/constants) stay in the wheel; the `gget` console script is preserved. - Require Python >= 3.12; classifiers and CI cover 3.12 / 3.13 / 3.14. - Declare runtime deps in [project] and a [dependency-groups] `test` group; keep cellxgene-census in a separate optional `cellxgene` group (no wheels for newer Python yet) and have its test skip itself when the dep is absent. Linting / formatting: - Add the full scverse pre-commit config (biome, pyproject-fmt, ruff lint + format, standard hygiene hooks) plus the scverse ruff config. - Run ruff format + fixes across the tree; add docstrings, `raise ... from`, isinstance checks, and targeted noqa to reach a green `prek run --all-files`. - Vendored binaries, bundled data, test fixtures, and the CI report are excluded from formatting; Markdown hard line breaks are preserved. CI: - Modernize ci.yml (uv, pull_request trigger, 3.12/3.13/3.14 matrix, codecov, alls-green gate) while preserving the scheduled pytest-report commit-back. - Add build.yml (package build check) and release.yml (PyPI trusted publishing). Also fixes two latent bugs surfaced by ruff (undefined `Optional` in gget_cbio, use-before-assignment of `seqs` in gget_muscle) and a duplicate tearDown in the muscle tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
9847d39 to
bc5b9c2
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.
What & why
ggetstill used a pre-PEP-517 stack (setup.py+setup.cfg+requirements.txt+dev-requirements.txt+MANIFEST.in, no in-repo linter config, no pre-commit). This PR adopts the good parts of the scverse cookiecutter template while keeping the mdbook docs, the bundled binaries/data, and the existing live-API test workflow working.Packaging
pyproject.toml(hatchling backend, staticversion = 0.30.6). Verified the built wheel still bundles all 17gget/bins/**binaries +gget/constants/**data and theggetconsole script;twine check --strictpasses.[project]; test deps in a PEP 735[dependency-groups]testgroup.cellxgene-censuslives in a separate optionalcellxgenegroup because it has no wheels for 3.14 yet (itstiledbsomadep fails to build) — thegget cellxgenetest nowimportorskips itself when the dep is absent, so the suite stays green on 3.14.Linting / formatting
.pre-commit-config.yaml(biome, pyproject-fmt, ruff lint+format, standard hygiene hooks) and the scverse ruff config (verbatim ruleset incl. pydocstyle).CI / CD
ci.yml:uv, apull_requesttrigger (PRs didn't run tests before), 3.12/3.13/3.14 matrix, Codecov upload, and analls-greengate job — while preserving the scheduled run that saves & commitstests/pytest_results_py3.12.txt.build.yml(package build check) andrelease.yml(PyPI trusted publishing).Also
Optionalannotation ingget_cbio, and use-before-assignment ofseqsingget_muscle; plus a duplicatetearDownin the muscle tests.release.ymluses PyPI trusted publishing — it needs a one-time trusted publisher configured on PyPI forgget(workflowrelease.yml, environmentpypi) before the first tagged release.