Skip to content

Commit b965296

Browse files
hoxbroflying-sheeppre-commit-ci[bot]
authored
ci: zizmor and depedency-groups (#149)
Co-authored-by: Philipp A. <flying-sheep@web.de> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 34c0b25 commit b965296

3 files changed

Lines changed: 35 additions & 24 deletions

File tree

.github/workflows/build.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ jobs:
2222
permissions:
2323
id-token: write # to authenticate as Trusted Publisher to pypi.org
2424
steps:
25-
- uses: actions/checkout@v5
26-
- uses: actions/setup-python@v5
25+
- uses: actions/checkout@v6
26+
with:
27+
persist-credentials: false
28+
- uses: actions/setup-python@v6
2729
with:
2830
python-version: ${{ env.PYTHON_VERSION }}
29-
cache: "pip"
3031
- run: pip install build
3132
- run: python -m build
3233
- name: Publish to PyPI

.github/workflows/ci.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ env:
1010
FORCE_COLOR: "1"
1111
UV_CONSTRAINT: "${{ github.workspace }}/.github/constraints.txt"
1212

13+
permissions: {}
14+
1315
concurrency:
1416
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
1517
cancel-in-progress: true
@@ -24,15 +26,18 @@ jobs:
2426
python-version: ["3.12", "3.14"]
2527
steps:
2628
- uses: actions/checkout@v6
27-
with: { fetch-depth: 0, filter: blob:none }
28-
- uses: astral-sh/setup-uv@v7
29+
with:
30+
fetch-depth: 0
31+
filter: blob:none
32+
persist-credentials: false
33+
- uses: astral-sh/setup-uv@v8.1.0
2934
with:
3035
python-version: ${{ matrix.python-version }}
3136
- run: uv tool install hatch
3237
- run: hatch -v env create hatch-test.py${{ matrix.python-version }}
3338
- run: hatch test --cover --python=${{ matrix.python-version }}
3439
- run: hatch env run --env hatch-test.py${{ matrix.python-version }} -- coverage xml
35-
- uses: codecov/codecov-action@v5
40+
- uses: codecov/codecov-action@v6
3641
with:
3742
files: coverage.xml
3843
use_oidc: true

pyproject.toml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,38 +28,43 @@ dependencies = [
2828
"param",
2929
]
3030

31-
[tool.hatch]
32-
envs.default.dependencies = [ "ipykernel" ]
33-
envs.default.installer = "uv"
34-
envs.default.python = "3.13"
35-
envs.docs.scripts.build = "sphinx-build -b html docs docs/_build/html -W {args}"
36-
envs.docs.scripts.open = "python -m webbrowser {args:docs/_build/html/index.html}"
37-
envs.docs.scripts.clean = "git clean -fdX -- {args:docs}"
38-
envs.docs.scripts.install-kernel = "python -m ipykernel install --user --name=hv-anndata --display-name=hv-anndata"
39-
envs.docs.dependencies = [
31+
[dependency-groups]
32+
dev = [ { include-group = "test" } ]
33+
test = [
34+
"holoviews>=1.23.0rc0", # Can be removed from final release
35+
"nbformat-types",
36+
# for VS Code’s coverage function (not needed for `hatch test -c`)
37+
"pytest-cov",
38+
"scanpy",
39+
]
40+
docs = [
4041
"furo",
4142
"holoviews>=1.22",
4243
"ipykernel",
4344
"ipywidgets",
4445
"jupyter-bokeh",
4546
"myst-nb",
46-
"pooch",
4747
"plotly",
48+
"pooch",
4849
"scanpy[scrublet]",
4950
"scanpydoc",
5051
"sphinx",
5152
"sphinx-autodoc-typehints",
52-
"sphinx-exec-jupyter[holoviews] @ git+https://github.com/flying-sheep/sphinx-exec-jupyter.git",
5353
"sphinx-design",
54+
"sphinx-exec-jupyter[holoviews] @ git+https://github.com/flying-sheep/sphinx-exec-jupyter.git",
5455
"sphinx-issues",
5556
]
56-
envs.hatch-test.dependencies = [
57-
# for VS Code’s coverage function (not needed for `hatch test -c`)
58-
"pytest-cov",
59-
"nbformat-types",
60-
"scanpy",
61-
"holoviews>=1.23.0rc0", # Can be removed from final release
62-
]
57+
58+
[tool.hatch]
59+
envs.default.dependencies = [ "ipykernel" ]
60+
envs.default.installer = "uv"
61+
envs.default.python = "3.13"
62+
envs.docs.scripts.build = "sphinx-build -b html docs docs/_build/html -W {args}"
63+
envs.docs.scripts.open = "python -m webbrowser {args:docs/_build/html/index.html}"
64+
envs.docs.scripts.clean = "git clean -fdX -- {args:docs}"
65+
envs.docs.scripts.install-kernel = "python -m ipykernel install --user --name=hv-anndata --display-name=hv-anndata"
66+
envs.docs.dependency-groups = [ "docs" ]
67+
envs.hatch-test.dependency-groups = [ "test" ]
6368
metadata.hooks.docstring-description = {}
6469
version.source = "vcs"
6570

0 commit comments

Comments
 (0)