From 03e125f0e0481cf3a902eef3ec02b86671a69054 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 18:29:47 +0000 Subject: [PATCH 1/3] Update instance repo from cookiecutter template --- .cruft.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cruft.json b/.cruft.json index 9d44c3f..028bdb9 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "/home/runner/work/cookiecutter-scverse/cookiecutter-scverse", - "commit": "1da1d71043735a63d87f13e16caf5d9b90b3ba56", + "commit": "45549125510194beb56768c1a5d873b12a7c74d8", "checkout": null, "context": { "cookiecutter": { @@ -36,7 +36,7 @@ "trim_blocks": true }, "_template": "/home/runner/work/cookiecutter-scverse/cookiecutter-scverse", - "_commit": "1da1d71043735a63d87f13e16caf5d9b90b3ba56" + "_commit": "45549125510194beb56768c1a5d873b12a7c74d8" } }, "directory": null From c5f671155111d42a2c1c484570dcf543117d702f Mon Sep 17 00:00:00 2001 From: "scverse-pr-creator[bot]" <272303624+scverse-pr-creator[bot]@users.noreply.github.com> Date: Mon, 8 Jun 2026 06:49:58 +0000 Subject: [PATCH 2/3] Update instance repo from cookiecutter template --- .cruft.json | 4 ++-- .pre-commit-config.yaml | 6 +++--- docs/template_usage.md | 7 ++++++- pyproject.toml | 12 ++++++------ src/cookiecutter_scverse_instance/__init__.py | 4 ---- tests/test_basic.py | 4 ---- 6 files changed, 17 insertions(+), 20 deletions(-) diff --git a/.cruft.json b/.cruft.json index 028bdb9..b19a7a0 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "/home/runner/work/cookiecutter-scverse/cookiecutter-scverse", - "commit": "45549125510194beb56768c1a5d873b12a7c74d8", + "commit": "11bdeb24d67f40ba7b30badadd5f665f1fc94d6c", "checkout": null, "context": { "cookiecutter": { @@ -36,7 +36,7 @@ "trim_blocks": true }, "_template": "/home/runner/work/cookiecutter-scverse/cookiecutter-scverse", - "_commit": "45549125510194beb56768c1a5d873b12a7c74d8" + "_commit": "11bdeb24d67f40ba7b30badadd5f665f1fc94d6c" } }, "directory": null diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e5325f7..cca0b46 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,16 +7,16 @@ default_stages: minimum_pre_commit_version: 2.16.0 repos: - repo: https://github.com/biomejs/pre-commit - rev: v2.4.6 + rev: v2.4.16 hooks: - id: biome-format exclude: ^\.cruft\.json$ # inconsistent indentation with cruft - file never to be modified manually. - repo: https://github.com/tox-dev/pyproject-fmt - rev: v2.16.2 + rev: v2.23.0 hooks: - id: pyproject-fmt - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.5 + rev: v0.15.15 hooks: - id: ruff-check types_or: [python, pyi, jupyter] diff --git a/docs/template_usage.md b/docs/template_usage.md index 793a62c..09df61b 100644 --- a/docs/template_usage.md +++ b/docs/template_usage.md @@ -147,7 +147,8 @@ There you can see the execution history, logs, and (re-)trigger workflows manual ## Automating the PyPI release using GitHub actions -Tags adhering to `"*.*.*"` that are pushed to the `main` branch will trigger the release Github workflow that automatically builds and uploads the Python package to [PyPI][]. +Releases created via the [Github releases UI][github-releases] +will trigger the release Github workflow that automatically builds and uploads the Python package to [PyPI][]. For this to work, you'll need to setup GitHub as a [trusted publisher][] on PyPI. To set this up, login to [PyPI][], and proceed depending on whether you already have your project on there or not: @@ -159,6 +160,10 @@ The "Workflow name" needs to bet set to `release.yaml`. Set "Environment name" to “pypi” to match `environment: pypi` in `.github/workflows/release.yaml`. For more details, please refer to the official [PyPI guide for setting up trusted publishing][trusted publisher]. +If you added a new pending publisher to set up your project, +the project will be published only once you release your package for the first time (see above). + +[github-releases]: https://docs.github.com/en/repositories/releasing-projects-on-github/about-releases [pypi-trusted-publishing-guide]: https://docs.pypi.org/trusted-publishers/adding-a-publisher/ [PyPI]: https://pypi.org/ diff --git a/pyproject.toml b/pyproject.toml index e1b18d7..98dfc84 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,11 +60,10 @@ doc = [ [tool.hatch] envs.default.installer = "uv" envs.default.dependency-groups = [ "dev" ] -envs.docs.dependency-groups = [ "doc" ] envs.docs.scripts.build = "sphinx-build -M html docs docs/_build -W {args}" -envs.docs.scripts.open = "python -m webbrowser -t docs/_build/html/index.html" envs.docs.scripts.clean = "git clean -fdX -- {args:docs}" -envs.hatch-test.dependency-groups = [ "dev", "test" ] +envs.docs.scripts.open = "python -m webbrowser -t docs/_build/html/index.html" +envs.docs.dependency-groups = [ "doc" ] envs.hatch-test.matrix = [ # Test the lowest and highest supported Python versions with normal deps { deps = [ "stable" ], python = [ "3.11", "3.14" ] }, @@ -74,8 +73,9 @@ envs.hatch-test.matrix = [ # If the matrix variable `deps` is set to "pre", # set the environment variable `UV_PRERELEASE` to "allow". envs.hatch-test.overrides.matrix.deps.env-vars = [ - { key = "UV_PRERELEASE", value = "allow", if = [ "pre" ] }, + { value = "allow", key = "UV_PRERELEASE", if = [ "pre" ] }, ] +envs.hatch-test.dependency-groups = [ "dev", "test" ] [tool.ruff] line-length = 120 @@ -116,11 +116,11 @@ lint.per-file-ignores."tests/*" = [ "D" ] lint.pydocstyle.convention = "numpy" [tool.pytest] -strict = true -testpaths = [ "tests" ] addopts = [ "--import-mode=importlib", # allow using test files with same name ] +strict = true +testpaths = [ "tests" ] [tool.coverage] run.omit = [ diff --git a/src/cookiecutter_scverse_instance/__init__.py b/src/cookiecutter_scverse_instance/__init__.py index 5e47ae9..199a50d 100644 --- a/src/cookiecutter_scverse_instance/__init__.py +++ b/src/cookiecutter_scverse_instance/__init__.py @@ -1,7 +1,3 @@ -from importlib.metadata import version - from . import pl, pp, tl __all__ = ["pl", "pp", "tl"] - -__version__ = version("cookiecutter-scverse-instance") diff --git a/tests/test_basic.py b/tests/test_basic.py index 8204867..9ce99e1 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -3,10 +3,6 @@ import cookiecutter_scverse_instance -def test_package_has_version(): - assert cookiecutter_scverse_instance.__version__ is not None - - @pytest.mark.skip(reason="This decorator should be removed when test passes.") def test_example(): assert 1 == 0 # This test is designed to fail. From 681c019eccd5e3262ac154959d4160fc3ed4b6fc Mon Sep 17 00:00:00 2001 From: "scverse-pr-creator[bot]" <272303624+scverse-pr-creator[bot]@users.noreply.github.com> Date: Mon, 8 Jun 2026 08:26:20 +0000 Subject: [PATCH 3/3] Update instance repo from cookiecutter template --- .cruft.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cruft.json b/.cruft.json index b19a7a0..1045f49 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "/home/runner/work/cookiecutter-scverse/cookiecutter-scverse", - "commit": "11bdeb24d67f40ba7b30badadd5f665f1fc94d6c", + "commit": "e785bea9964e82b593f4aa7d45a28237f8b37b8a", "checkout": null, "context": { "cookiecutter": { @@ -36,7 +36,7 @@ "trim_blocks": true }, "_template": "/home/runner/work/cookiecutter-scverse/cookiecutter-scverse", - "_commit": "11bdeb24d67f40ba7b30badadd5f665f1fc94d6c" + "_commit": "e785bea9964e82b593f4aa7d45a28237f8b37b8a" } }, "directory": null