From 38f15ff0183c0bdfbeb98677b8734faa3f51533e Mon Sep 17 00:00:00 2001 From: "scverse-pr-creator[bot]" <272303624+scverse-pr-creator[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 06:14:59 +0000 Subject: [PATCH 1/3] Update instance repo from cookiecutter template --- .cruft.json | 4 ++-- docs/contributing.md | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.cruft.json b/.cruft.json index 0931545..846cb62 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "/home/runner/work/cookiecutter-scverse/cookiecutter-scverse", - "commit": "6cc246194b7f1e940721bade4aad5fb6c469dcd2", + "commit": "3c6cd0e0aed6a91d5b9bd2868bac050c129e1994", "checkout": null, "context": { "cookiecutter": { @@ -37,7 +37,7 @@ "trim_blocks": true }, "_template": "/home/runner/work/cookiecutter-scverse/cookiecutter-scverse", - "_commit": "6cc246194b7f1e940721bade4aad5fb6c469dcd2" + "_commit": "3c6cd0e0aed6a91d5b9bd2868bac050c129e1994" } }, "directory": null diff --git a/docs/contributing.md b/docs/contributing.md index d802d34..58511f4 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -82,16 +82,18 @@ Next, create the environment with hatch env create hatch-test.py3.14-stable ``` -Then, obtain the path to the environment using +If you are using VScode, install the [hatch-code][] extension. +Now, open the command palette (Ctrl+Shift+P) and search for `Python: Select Interpreter`. +Choose `hatch-test.py3.14-stable` (or your preferred environment) from the dropdown list. + +For other IDEs, you can obtain the path to the virtual environments using ```bash hatch env find hatch-test.py3.14-stable ``` -In case you are using VScode, 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. +and manually point it to the python binary. -In this future, this may become easier through a hatch vscode extension. :::: @@ -134,6 +136,7 @@ The `.venv` directory is typically automatically discovered by IDEs such as VS C ::::: [hatch environments]: https://hatch.pypa.io/latest/tutorials/environment/basic-usage/ +[hatch-code]: https://marketplace.visualstudio.com/items?itemName=PyPA.hatch [uv]: https://docs.astral.sh/uv/ ## Code-style From a1aa04a2b8ffb941f701b3be488166a7d7f320ec Mon Sep 17 00:00:00 2001 From: "scverse-pr-creator[bot]" <272303624+scverse-pr-creator[bot]@users.noreply.github.com> Date: Tue, 14 Jul 2026 07:05:02 +0000 Subject: [PATCH 2/3] Update instance repo from cookiecutter template --- .cruft.json | 4 ++-- .pre-commit-config.yaml | 6 +++--- docs/contributing.md | 25 ++++++++++++++++--------- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/.cruft.json b/.cruft.json index 846cb62..cd79374 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "/home/runner/work/cookiecutter-scverse/cookiecutter-scverse", - "commit": "3c6cd0e0aed6a91d5b9bd2868bac050c129e1994", + "commit": "429e0768f20ec94a0e37920faacb0525a9f9a7ce", "checkout": null, "context": { "cookiecutter": { @@ -37,7 +37,7 @@ "trim_blocks": true }, "_template": "/home/runner/work/cookiecutter-scverse/cookiecutter-scverse", - "_commit": "3c6cd0e0aed6a91d5b9bd2868bac050c129e1994" + "_commit": "429e0768f20ec94a0e37920faacb0525a9f9a7ce" } }, "directory": null diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5f74d36..9320c3a 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.5.1 + rev: v2.5.3 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.25.1 + rev: v2.25.3 hooks: - id: pyproject-fmt - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.20 + rev: v0.15.21 hooks: - id: ruff-check types_or: [python, pyi, jupyter] diff --git a/docs/contributing.md b/docs/contributing.md index 58511f4..fd1d004 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -46,11 +46,21 @@ hatch test # defined in the table [tool.hatch.envs.hatch-test] in pyproject.tom hatch run docs:build # defined in the table [tool.hatch.envs.docs] ``` -When using an IDE such as VS Code, -you’ll have to point the editor at the paths to the virtual environments manually. -The environment you typically want to use as your main development environment is the `hatch-test` -environment with the latest Python version. +### VScode +If you are using VScode, install the [hatch-code][] extension. +Additionally, make sure that the `vscode-python-environments` extension is installed +and `"python.useEnvironmentsExtension": true` is activated in your `settings.json` (both should be the default). + +Next, open the "Python Environment Managers" sidebar. +You can do so by opening the command palette (Ctrl+Shift+P) and searching for `Python: Focus on Environment Managers View`. +It will show a collapsible list where you can expand "Hatch" +and activate an environment by clicking on the checkmark next to it. +As the main development environment, we recommend to use `hatch-test` with the latest supported Python version. + +### Other IDEs + +For other IDEs, you’ll have to point the editor at the paths to the virtual environments manually. To get a list of all environments for your projects, run ```bash @@ -74,6 +84,7 @@ This will list “Standalone” environments and a table of “Matrix” environ ``` From the `Envs` column, select the environment name you want to use for development. +As the main development environment, we recommend to use `hatch-test` with the latest supported Python version. In this example, it would be `hatch-test.py3.14-stable`. Next, create the environment with @@ -82,11 +93,7 @@ Next, create the environment with hatch env create hatch-test.py3.14-stable ``` -If you are using VScode, install the [hatch-code][] extension. -Now, open the command palette (Ctrl+Shift+P) and search for `Python: Select Interpreter`. -Choose `hatch-test.py3.14-stable` (or your preferred environment) from the dropdown list. - -For other IDEs, you can obtain the path to the virtual environments using +Then, obtain the path to the environment using ```bash hatch env find hatch-test.py3.14-stable From 19874358771d8a224b9f04700dcfea74463f70cc Mon Sep 17 00:00:00 2001 From: "scverse-pr-creator[bot]" <272303624+scverse-pr-creator[bot]@users.noreply.github.com> Date: Tue, 14 Jul 2026 07:10:15 +0000 Subject: [PATCH 3/3] Update instance repo from cookiecutter template --- docs/contributing.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/contributing.md b/docs/contributing.md index fd1d004..e8f17dd 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -191,12 +191,8 @@ This package uses [pytest][] for automated testing. Please write {doc}`scanpy:dev/testing` for every function added to the package. Most IDEs integrate with pytest and provide a GUI to run tests. -Just point yours to one of the environments returned by - -```bash -hatch env create hatch-test # create test environments for all supported versions -hatch env find hatch-test # list all possible test environment paths -``` +If you set up your virtual environments as described in [installing dev dependencies](#installing-dev-dependencies), +test cases should be automatically discovered by your IDE. Alternatively, you can run all tests from the command line by executing