Skip to content

Commit bc12e1c

Browse files
committed
Automated template update to v0.7.0
1 parent bbfe9eb commit bc12e1c

File tree

11 files changed

+64
-73
lines changed

11 files changed

+64
-73
lines changed

.cruft.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"template": "https://github.com/scverse/cookiecutter-scverse",
3-
"commit": "d383d94fadff9e4e6fdb59d77c68cb900d7cedec",
4-
"checkout": "v0.6.0",
3+
"commit": "6ff5b92b5d44ea6d8a88e47538475718d467db95",
4+
"checkout": "v0.7.0",
55
"context": {
66
"cookiecutter": {
77
"project_name": "cellcharter",
@@ -36,7 +36,7 @@
3636
"trim_blocks": true
3737
},
3838
"_template": "https://github.com/scverse/cookiecutter-scverse",
39-
"_commit": "d383d94fadff9e4e6fdb59d77c68cb900d7cedec"
39+
"_commit": "6ff5b92b5d44ea6d8a88e47538475718d467db95"
4040
}
4141
},
4242
"directory": null

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Bug report
22
description: Report something that is broken or incorrect
3-
labels: bug
3+
type: Bug
44
body:
55
- type: markdown
66
attributes:
@@ -9,8 +9,7 @@ body:
99
detailing how to provide the necessary information for us to reproduce your bug. In brief:
1010
* Please provide exact steps how to reproduce the bug in a clean Python environment.
1111
* In case it's not clear what's causing this bug, please provide the data or the data generation procedure.
12-
* Sometimes it is not possible to share the data, but usually it is possible to replicate problems on publicly
13-
available datasets or to share a subset of your data.
12+
* Replicate problems on public datasets or share data subsets when full sharing isn't possible.
1413
1514
- type: textarea
1615
id: report

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Feature request
22
description: Propose a new feature for cellcharter
3-
labels: enhancement
3+
type: Enhancement
44
body:
55
- type: textarea
66
id: description

.github/workflows/build.yaml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,16 @@ concurrency:
1010
group: ${{ github.workflow }}-${{ github.ref }}
1111
cancel-in-progress: true
1212

13-
defaults:
14-
run:
15-
# to fail on error in multiline statements (-e), in pipes (-o pipefail), and on unset variables (-u).
16-
shell: bash -euo pipefail {0}
17-
1813
jobs:
1914
package:
2015
runs-on: ubuntu-latest
2116
steps:
22-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v5
2318
with:
2419
filter: blob:none
2520
fetch-depth: 0
2621
- name: Install uv
27-
uses: astral-sh/setup-uv@v5
28-
with:
29-
cache-dependency-glob: pyproject.toml
22+
uses: astral-sh/setup-uv@v7
3023
- name: Build package
3124
run: uv build
3225
- name: Check package

.github/workflows/release.yaml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ on:
44
release:
55
types: [published]
66

7-
defaults:
8-
run:
9-
# to fail on error in multiline statements (-e), in pipes (-o pipefail), and on unset variables (-u).
10-
shell: bash -euo pipefail {0}
11-
127
# Use "trusted publishing", see https://docs.pypi.org/trusted-publishers/
138
jobs:
149
release:
@@ -20,14 +15,12 @@ jobs:
2015
permissions:
2116
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
2217
steps:
23-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v5
2419
with:
2520
filter: blob:none
2621
fetch-depth: 0
2722
- name: Install uv
28-
uses: astral-sh/setup-uv@v5
29-
with:
30-
cache-dependency-glob: pyproject.toml
23+
uses: astral-sh/setup-uv@v7
3124
- name: Build package
3225
run: uv build
3326
- name: Publish package distributions to PyPI

.github/workflows/test.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ concurrency:
1212
group: ${{ github.workflow }}-${{ github.ref }}
1313
cancel-in-progress: true
1414

15-
defaults:
16-
run:
17-
# to fail on error in multiline statements (-e), in pipes (-o pipefail), and on unset variables (-u).
18-
shell: bash -euo pipefail {0}
19-
2015
jobs:
2116
# Get the test environment from hatch as defined in pyproject.toml.
2217
# This ensures that the pyproject.toml is the single point of truth for test definitions and the same tests are
@@ -28,12 +23,12 @@ jobs:
2823
outputs:
2924
envs: ${{ steps.get-envs.outputs.envs }}
3025
steps:
31-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@v5
3227
with:
3328
filter: blob:none
3429
fetch-depth: 0
3530
- name: Install uv
36-
uses: astral-sh/setup-uv@v5
31+
uses: astral-sh/setup-uv@v7
3732
- name: Get test environments
3833
id: get-envs
3934
run: |
@@ -51,6 +46,8 @@ jobs:
5146
# Run tests through hatch. Spawns a separate runner for each environment defined in the hatch matrix obtained above.
5247
test:
5348
needs: get-environments
49+
permissions:
50+
id-token: write # for codecov OIDC
5451

5552
strategy:
5653
fail-fast: false
@@ -60,17 +57,17 @@ jobs:
6057

6158
name: ${{ matrix.env.label }}
6259
runs-on: ${{ matrix.os }}
60+
continue-on-error: ${{ contains(matrix.env.name, 'pre') }} # make "all-green" pass even if pre-release job fails
6361

6462
steps:
65-
- uses: actions/checkout@v4
63+
- uses: actions/checkout@v5
6664
with:
6765
filter: blob:none
6866
fetch-depth: 0
6967
- name: Install uv
70-
uses: astral-sh/setup-uv@v5
68+
uses: astral-sh/setup-uv@v7
7169
with:
7270
python-version: ${{ matrix.env.python }}
73-
cache-dependency-glob: pyproject.toml
7471
- name: create hatch environment
7572
run: uvx hatch env create ${{ matrix.env.name }}
7673
- name: run tests using hatch
@@ -87,6 +84,9 @@ jobs:
8784
uvx hatch run ${{ matrix.env.name }}:coverage xml # create report for upload
8885
- name: Upload coverage
8986
uses: codecov/codecov-action@v5
87+
with:
88+
fail_ci_if_error: true
89+
use_oidc: true
9090

9191
# Check that all tests defined above pass. This makes it easy to set a single "required" test in branch
9292
# protection instead of having to update it frequently. See https://github.com/re-actors/alls-green#why.

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ default_stages:
77
minimum_pre_commit_version: 2.16.0
88
repos:
99
- repo: https://github.com/biomejs/pre-commit
10-
rev: v2.2.4
10+
rev: v2.3.10
1111
hooks:
1212
- id: biome-format
1313
exclude: ^\.cruft\.json$ # inconsistent indentation with cruft - file never to be modified manually.
1414
- repo: https://github.com/tox-dev/pyproject-fmt
15-
rev: v2.6.0
15+
rev: v2.11.1
1616
hooks:
1717
- id: pyproject-fmt
1818
- repo: https://github.com/astral-sh/ruff-pre-commit
19-
rev: v0.13.2
19+
rev: v0.14.10
2020
hooks:
2121
- id: ruff-check
2222
types_or: [python, pyi, jupyter]

.readthedocs.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ version: 2
33
build:
44
os: ubuntu-24.04
55
tools:
6-
python: "3.12"
6+
python: "3.13"
7+
nodejs: latest
78
jobs:
89
create_environment:
910
- asdf plugin add uv

docs/conf.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@
55
# https://www.sphinx-doc.org/en/master/usage/configuration.html
66

77
# -- Path setup --------------------------------------------------------------
8+
import shutil
89
import sys
910
from datetime import datetime
1011
from importlib.metadata import metadata
1112
from pathlib import Path
1213

14+
from sphinxcontrib import katex
15+
1316
HERE = Path(__file__).parent
1417
sys.path.insert(0, str(HERE / "extensions"))
1518

@@ -19,7 +22,7 @@
1922
# NOTE: If you installed your project in editable mode, this might be stale.
2023
# If this is the case, reinstall it to refresh the metadata
2124
info = metadata("cellcharter")
22-
project_name = info["Name"]
25+
project = info["Name"]
2326
author = info["Author"]
2427
copyright = f"{datetime.now():%Y}, {author}."
2528
version = info["Version"]
@@ -37,7 +40,7 @@
3740
html_context = {
3841
"display_github": True, # Integrate GitHub
3942
"github_user": "marcovarrone",
40-
"github_repo": project_name,
43+
"github_repo": project,
4144
"github_version": "main",
4245
"conf_py_path": "/docs/",
4346
}
@@ -54,9 +57,9 @@
5457
"sphinx.ext.autosummary",
5558
"sphinx.ext.napoleon",
5659
"sphinxcontrib.bibtex",
60+
"sphinxcontrib.katex",
5761
"sphinx_autodoc_typehints",
5862
"sphinx_tabs.tabs",
59-
"sphinx.ext.mathjax",
6063
"IPython.sphinxext.ipython_console_highlighting",
6164
"sphinxext.opengraph",
6265
*[p.stem for p in (HERE / "extensions").glob("*.py")],
@@ -92,7 +95,8 @@
9295
}
9396

9497
intersphinx_mapping = {
95-
"python": ("https://docs.python.org/3", None),
98+
# TODO: replace `3.13` with `3` once ReadTheDocs supports building with Python 3.14
99+
"python": ("https://docs.python.org/3.13", None),
96100
"anndata": ("https://anndata.readthedocs.io/en/stable/", None),
97101
"scanpy": ("https://scanpy.readthedocs.io/en/stable/", None),
98102
"numpy": ("https://numpy.org/doc/stable/", None),
@@ -113,7 +117,7 @@
113117
html_static_path = ["_static"]
114118
html_css_files = ["css/custom.css"]
115119

116-
html_title = project_name
120+
html_title = project
117121

118122
html_theme_options = {
119123
"repository_url": repository_url,
@@ -123,6 +127,7 @@
123127
}
124128

125129
pygments_style = "default"
130+
katex_prerender = shutil.which(katex.NODEJS_BINARY) is not None
126131

127132
nitpick_ignore = [
128133
# If building the documentation fails because of a missing link that is outside your control,

docs/contributing.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ This will list “Standalone” environments and a table of “Matrix” environ
6262
+------------+---------+--------------------------+----------+---------------------------------+-------------+
6363
| Name | Type | Envs | Features | Dependencies | Scripts |
6464
+------------+---------+--------------------------+----------+---------------------------------+-------------+
65-
| hatch-test | virtual | hatch-test.py3.10-stable | dev | coverage-enable-subprocess==1.0 | cov-combine |
66-
| | | hatch-test.py3.13-stable | test | coverage[toml]~=7.4 | cov-report |
67-
| | | hatch-test.py3.13-pre | | pytest-mock~=3.12 | run |
65+
| hatch-test | virtual | hatch-test.py3.11-stable | dev | coverage-enable-subprocess==1.0 | cov-combine |
66+
| | | hatch-test.py3.14-stable | test | coverage[toml]~=7.4 | cov-report |
67+
| | | hatch-test.py3.14-pre | | pytest-mock~=3.12 | run |
6868
| | | | | pytest-randomly~=3.15 | run-cov |
6969
| | | | | pytest-rerunfailures~=14.0 | |
7070
| | | | | pytest-xdist[psutil]~=3.5 | |
@@ -73,18 +73,18 @@ This will list “Standalone” environments and a table of “Matrix” environ
7373
```
7474

7575
From the `Envs` column, select the environment name you want to use for development.
76-
In this example, it would be `hatch-test.py3.13-stable`.
76+
In this example, it would be `hatch-test.py3.14-stable`.
7777

7878
Next, create the environment with
7979

8080
```bash
81-
hatch env create hatch-test.py3.13-stable
81+
hatch env create hatch-test.py3.14-stable
8282
```
8383

8484
Then, obtain the path to the environment using
8585

8686
```bash
87-
hatch env find hatch-test.py3.13-stable
87+
hatch env find hatch-test.py3.14-stable
8888
```
8989

9090
In case you are using VScode, now open the command palette (Ctrl+Shift+P) and search for `Python: Select Interpreter`.

0 commit comments

Comments
 (0)