Skip to content

Commit 5b8f9e0

Browse files
authored
Merge pull request #246 from scverse/pr-240
Update to template 0.6.0
2 parents 5b12274 + 28dddd2 commit 5b8f9e0

9 files changed

Lines changed: 51 additions & 49 deletions

File tree

.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": "5842d5cb8510e1d4a037a8f772630d51ec86de96",
4-
"checkout": null,
3+
"commit": "d383d94fadff9e4e6fdb59d77c68cb900d7cedec",
4+
"checkout": "v0.6.0",
55
"context": {
66
"cookiecutter": {
77
"project_name": "decoupler",
@@ -36,7 +36,7 @@
3636
"trim_blocks": true
3737
},
3838
"_template": "https://github.com/scverse/cookiecutter-scverse",
39-
"_commit": "5842d5cb8510e1d4a037a8f772630d51ec86de96"
39+
"_commit": "d383d94fadff9e4e6fdb59d77c68cb900d7cedec"
4040
}
4141
},
4242
"directory": null

.github/workflows/test.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
| {
4444
name: .key,
4545
label: (if (.key | contains("pre")) then .key + " (PRE-RELEASE DEPENDENCIES)" else .key end),
46-
python: .value.python | sub("3[.]13"; "3.13.3"), # https://github.com/numba/numba/issues/10101
46+
python: .value.python
4747
}
4848
)')
4949
echo "envs=${ENVS_JSON}" | tee $GITHUB_OUTPUT
@@ -78,14 +78,15 @@ jobs:
7878
MPLBACKEND: agg
7979
PLATFORM: ${{ matrix.os }}
8080
DISPLAY: :42
81-
run: uvx hatch run ${{ matrix.env.name }}:run-cov
81+
run: uvx hatch run ${{ matrix.env.name }}:run-cov -v --color=yes -n auto
8282
- name: generate coverage report
83-
run: uvx hatch run ${{ matrix.env.name }}:coverage xml
83+
run: |
84+
# See https://coverage.readthedocs.io/en/latest/config.html#run-patch
85+
test -f .coverage || uvx hatch run ${{ matrix.env.name }}:cov-combine
86+
uvx hatch run ${{ matrix.env.name }}:cov-report # report visibly
87+
uvx hatch run ${{ matrix.env.name }}:coverage xml # create report for upload
8488
- name: Upload coverage
85-
uses: codecov/codecov-action@v4
86-
with:
87-
token: ${{ secrets.CODECOV_TOKEN }}
88-
89+
uses: codecov/codecov-action@v5
8990

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

.gitignore

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

1819
# docs
1920
/docs/generated/
2021
/docs/_build/
21-
22-
# jupyter
23-
.ipynb_checkpoints/

.pre-commit-config.yaml

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ default_stages:
77
minimum_pre_commit_version: 2.16.0
88
repos:
99
- repo: https://github.com/biomejs/pre-commit
10-
rev: v2.3.2
10+
rev: v2.2.4
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.11.0
15+
rev: v2.6.0
1616
hooks:
1717
- id: pyproject-fmt
1818
- repo: https://github.com/astral-sh/ruff-pre-commit
19-
rev: v0.14.3
19+
rev: v0.13.2
2020
hooks:
21-
- id: ruff
21+
- id: ruff-check
2222
types_or: [python, pyi, jupyter]
2323
args: [--fix, --exit-non-zero-on-fix]
2424
- id: ruff-format
@@ -36,19 +36,3 @@ repos:
3636
# Check that there are no merge conflicts (could be generated by template sync)
3737
- id: check-merge-conflict
3838
args: [--assume-in-merge]
39-
- repo: https://github.com/pre-commit/mirrors-mypy
40-
rev: v1.18.2
41-
hooks:
42-
- id: mypy
43-
args: [--no-strict-optional, --ignore-missing-imports]
44-
additional_dependencies:
45-
["types-setuptools", "types-requests", "types-attrs"]
46-
- repo: local
47-
hooks:
48-
- id: forbid-to-commit
49-
name: Don't commit rej files
50-
entry: |
51-
Cannot commit .rej files. These indicate merge conflicts that arise during automated template updates.
52-
Fix the merge conflicts manually and remove the .rej files.
53-
language: fail
54-
files: '.*\.rej$'

.readthedocs.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1+
# https://docs.readthedocs.io/en/stable/config-file/v2.html
12
version: 2
23
build:
34
os: ubuntu-24.04
45
tools:
5-
python: "3.13"
6+
python: "3.12"
67
jobs:
78
create_environment:
89
- asdf plugin add uv
910
- asdf install uv latest
1011
- asdf global uv latest
11-
- uv venv
12-
- uv pip install .[doc,full]
1312
build:
1413
html:
15-
- UV_LINK_MODE=copy uv run sphinx-build -T -W -b html docs $READTHEDOCS_OUTPUT/html
14+
- uvx hatch run docs:build
15+
- mv docs/_build $READTHEDOCS_OUTPUT
1616

1717
submodules:
18-
include: all
18+
include: all

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# decoupler - Ensemble of methods to infer enrichment scores
2-
<img src="https://raw.githubusercontent.com/scverse/decoupler/refs/heads/2.0.8/docs/_static/images/logo.svg" align="right" width="120" class="no-scaled-link" />
3-
2+
<img src="https://raw.githubusercontent.com/scverse/decoupler/refs/heads/main/docs/_static/images/logo.svg" align="right" width="120" class="no-scaled-link" />
43

54
[![Tests][badge-tests]][tests]
65
[![Documentation][badge-docs]][documentation]

biome.jsonc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.2.0/schema.json",
3+
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
34
"formatter": { "useEditorconfig": true },
45
"overrides": [
56
{
6-
"include": ["./.vscode/*.json", "**/*.jsonc"],
7+
"includes": ["./.vscode/*.json", "**/*.jsonc"],
78
"json": {
89
"formatter": { "trailingCommas": "all" },
910
"parser": {

docs/conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
info = metadata("decoupler")
2222
project_name = info["Name"]
2323
author = info["Author"]
24-
copyright = f"{datetime.now():%Y}, scverse"
24+
copyright = f"{datetime.now():%Y}, scverse."
2525
version = info["Version"]
2626
urls = dict(pu.split(", ") for pu in info.get_all("Project-URL"))
2727
repository_url = urls["Source"]
@@ -114,6 +114,7 @@
114114
html_theme = "sphinx_book_theme"
115115
html_static_path = ["_static"]
116116
html_css_files = ["css/custom.css"]
117+
117118
html_title = project_name
118119
html_logo = "_static/images/logo.png"
119120
html_favicon = "_static/images/logo.png"
@@ -127,7 +128,7 @@
127128

128129
pygments_style = "default"
129130

130-
nitpick_ignore: list = [
131+
nitpick_ignore = [
131132
# If building the documentation fails because of a missing link that is outside your control,
132133
# you can add an exception to this list.
133134
# ("py:class", "igraph.Graph"),

pyproject.toml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ classifiers = [
2121
"Programming Language :: Python :: 3.11",
2222
"Programming Language :: Python :: 3.12",
2323
"Programming Language :: Python :: 3.13",
24-
"Programming Language :: Python :: 3.14",
2524
]
2625
dependencies = [
2726
"adjusttext",
@@ -47,7 +46,7 @@ optional-dependencies.doc = [
4746
"pandas",
4847
# Until pybtex >0.24.0 releases: https://bitbucket.org/pybtex-devs/pybtex/issues/169/
4948
"setuptools",
50-
"sphinx>=4",
49+
"sphinx>=8.1",
5150
"sphinx-autodoc-typehints",
5251
"sphinx-book-theme>=1",
5352
"sphinx-copybutton",
@@ -59,17 +58,20 @@ optional-dependencies.full = [
5958
"dcor",
6059
"igraph",
6160
"ipywidgets",
61+
"pydeseq2",
62+
"scanpy",
6263
"xgboost",
6364
]
6465
optional-dependencies.test = [
65-
"coverage",
66+
"coverage>=7.10",
6667
"dcor",
6768
"gseapy",
6869
"igraph",
6970
"ipywidgets",
7071
"memory-profiler",
7172
"pydeseq2",
7273
"pytest",
74+
"pytest-cov", # For VS Code’s coverage functionality
7375
"scanpy",
7476
"statsmodels",
7577
"xgboost",
@@ -85,14 +87,29 @@ features = [ "dev" ]
8587

8688
[tool.hatch.envs.docs]
8789
features = [ "doc" ]
88-
scripts.build = "sphinx-build -M html docs docs/_build {args}"
90+
scripts.build = "sphinx-build -M html docs docs/_build -W {args}"
8991
scripts.open = "python -m webbrowser -t docs/_build/html/index.html"
9092
scripts.clean = "git clean -fdX -- {args:docs}"
9193

94+
# Test the lowest and highest supported Python versions with normal deps
9295
[[tool.hatch.envs.hatch-test.matrix]]
96+
deps = [ "stable" ]
9397
python = [ "3.10", "3.13" ]
98+
99+
# Test the newest supported Python version also with pre-release deps
100+
[[tool.hatch.envs.hatch-test.matrix]]
101+
deps = [ "pre" ]
102+
python = [ "3.13" ]
103+
94104
[tool.hatch.envs.hatch-test]
95-
features = [ "test" ]
105+
features = [ "dev", "test" ]
106+
107+
[tool.hatch.envs.hatch-test.overrides]
108+
# If the matrix variable `deps` is set to "pre",
109+
# set the environment variable `UV_PRERELEASE` to "allow".
110+
matrix.deps.env-vars = [
111+
{ key = "UV_PRERELEASE", value = "allow", if = [ "pre" ] },
112+
]
96113

97114
[tool.ruff]
98115
line-length = 120
@@ -143,6 +160,7 @@ addopts = [
143160

144161
[tool.coverage.run]
145162
source = [ "decoupler" ]
163+
patch = [ "subprocess" ]
146164
omit = [
147165
"**/test_*.py",
148166
]

0 commit comments

Comments
 (0)