Skip to content

Commit 8b3a2bb

Browse files
committed
Merge branch 'scverse-bot-template-update-v2-carmonalab-pyucell-v0.7.0'
2 parents c64ed75 + e96b014 commit 8b3a2bb

11 files changed

Lines changed: 66 additions & 60 deletions

File tree

.cruft.json

Lines changed: 4 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": "9d275b8a25284cfe0b0a592374e5a75426128081",
4-
"checkout": null,
3+
"commit": "6ff5b92b5d44ea6d8a88e47538475718d467db95",
4+
"checkout": "v0.7.0",
55
"context": {
66
"cookiecutter": {
77
"project_name": "pyUCell",
@@ -36,7 +36,8 @@
3636
"trim_blocks": true
3737
},
3838
"_template": "https://github.com/scverse/cookiecutter-scverse",
39-
"_commit": "9d275b8a25284cfe0b0a592374e5a75426128081"
39+
"_commit": "6ff5b92b5d44ea6d8a88e47538475718d467db95"
40+
4041
}
4142
},
4243
"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 pyUCell
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: 12 additions & 12 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,35 +57,38 @@ 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
7774
env:
7875
MPLBACKEND: agg
7976
PLATFORM: ${{ matrix.os }}
8077
DISPLAY: :42
81-
run: uvx hatch run ${{ matrix.env.name }}:run-cov
78+
run: uvx hatch run ${{ matrix.env.name }}:run-cov -v --color=yes -n auto
8279
- name: generate coverage report
8380
run: |
84-
# See https://coverage.readthedocs.io/en/latest/config.html#config-run-parallel
81+
# See https://coverage.readthedocs.io/en/latest/config.html#run-patch
8582
test -f .coverage || uvx hatch run ${{ matrix.env.name }}:cov-combine
8683
uvx hatch run ${{ matrix.env.name }}:cov-report # report visibly
8784
uvx hatch run ${{ matrix.env.name }}:coverage xml # create report for upload
8885
- name: Upload coverage
8986
uses: codecov/codecov-action@v5
9087
with:
9188
token: ${{ secrets.CODECOV_TOKEN }}
89+
fail_ci_if_error: true
90+
use_oidc: true
91+
9292

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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ __pycache__/
1414
# Tests and coverage
1515
/data/
1616
/node_modules/
17+
/.coverage*
1718

1819
# docs
1920
/docs/generated/

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ ci:
99
autofix_prs: true
1010
repos:
1111
- repo: https://github.com/biomejs/pre-commit
12-
rev: v2.2.4
12+
rev: v2.3.10
1313
hooks:
1414
- id: biome-format
1515
exclude: ^\.cruft\.json$ # inconsistent indentation with cruft - file never to be modified manually.
1616
- repo: https://github.com/tox-dev/pyproject-fmt
17-
rev: v2.6.0
17+
rev: v2.11.1
1818
hooks:
1919
- id: pyproject-fmt
2020
- repo: https://github.com/astral-sh/ruff-pre-commit
21-
rev: v0.13.0
21+
rev: v0.14.10
2222
hooks:
2323
- id: ruff-check
2424
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: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,26 @@
66

77
# -- Path setup --------------------------------------------------------------
88

9+
import shutil
910
import sys
1011
from datetime import datetime
1112
from importlib.metadata import metadata
1213
from pathlib import Path
1314

15+
from sphinxcontrib import katex
16+
1417
HERE = Path(__file__).parent
1518
SRC = HERE.parent / "src"
16-
sys.path.insert(0, str(SRC))
19+
sys.path.insert(0, str(SRC))
1720
sys.path.insert(0, str(HERE / "extensions"))
1821

1922
# -- Project information -----------------------------------------------------
2023

2124
# NOTE: If you installed your project in editable mode, this might be stale.
2225
# If this is the case, reinstall it to refresh the metadata
23-
info = metadata("pyucell")
26+
27+
info = metadata("pyUCell")
28+
project = "pyucell"
2429
project_name = "pyucell"
2530
author = "Massimo Andreatta"
2631
copyright = f"{datetime.now():%Y}, {author}."
@@ -56,9 +61,9 @@
5661
"sphinx.ext.autosummary",
5762
"sphinx.ext.napoleon",
5863
"sphinxcontrib.bibtex",
64+
"sphinxcontrib.katex",
5965
"sphinx_autodoc_typehints",
6066
"sphinx_tabs.tabs",
61-
"sphinx.ext.mathjax",
6267
"IPython.sphinxext.ipython_console_highlighting",
6368
"sphinxext.opengraph",
6469
*[p.stem for p in (HERE / "extensions").glob("*.py")],
@@ -94,7 +99,8 @@
9499
}
95100

96101
intersphinx_mapping = {
97-
"python": ("https://docs.python.org/3", None),
102+
# TODO: replace `3.13` with `3` once ReadTheDocs supports building with Python 3.14
103+
"python": ("https://docs.python.org/3.13", None),
98104
"anndata": ("https://anndata.readthedocs.io/en/stable/", None),
99105
"scanpy": ("https://scanpy.readthedocs.io/en/stable/", None),
100106
"numpy": ("https://numpy.org/doc/stable/", None),
@@ -115,7 +121,7 @@
115121
html_static_path = ["_static"]
116122
html_css_files = ["css/custom.css"]
117123

118-
html_title = project_name
124+
html_title = project
119125

120126
html_theme_options = {
121127
"repository_url": repository_url,
@@ -125,6 +131,7 @@
125131
}
126132

127133
pygments_style = "default"
134+
katex_prerender = shutil.which(katex.NODEJS_BINARY) is not None
128135

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

0 commit comments

Comments
 (0)