Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"template": "https://github.com/scverse/cookiecutter-scverse",
"commit": "5842d5cb8510e1d4a037a8f772630d51ec86de96",
"checkout": null,
"commit": "d383d94fadff9e4e6fdb59d77c68cb900d7cedec",
"checkout": "v0.6.0",
"context": {
"cookiecutter": {
"project_name": "decoupler",
Expand Down Expand Up @@ -36,7 +36,7 @@
"trim_blocks": true
},
"_template": "https://github.com/scverse/cookiecutter-scverse",
"_commit": "5842d5cb8510e1d4a037a8f772630d51ec86de96"
"_commit": "d383d94fadff9e4e6fdb59d77c68cb900d7cedec"
}
},
"directory": null
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
| {
name: .key,
label: (if (.key | contains("pre")) then .key + " (PRE-RELEASE DEPENDENCIES)" else .key end),
python: .value.python | sub("3[.]13"; "3.13.3"), # https://github.com/numba/numba/issues/10101
python: .value.python
}
)')
echo "envs=${ENVS_JSON}" | tee $GITHUB_OUTPUT
Expand Down Expand Up @@ -78,14 +78,15 @@ jobs:
MPLBACKEND: agg
PLATFORM: ${{ matrix.os }}
DISPLAY: :42
run: uvx hatch run ${{ matrix.env.name }}:run-cov
run: uvx hatch run ${{ matrix.env.name }}:run-cov -v --color=yes -n auto
- name: generate coverage report
run: uvx hatch run ${{ matrix.env.name }}:coverage xml
run: |
# See https://coverage.readthedocs.io/en/latest/config.html#run-patch
test -f .coverage || uvx hatch run ${{ matrix.env.name }}:cov-combine
uvx hatch run ${{ matrix.env.name }}:cov-report # report visibly
uvx hatch run ${{ matrix.env.name }}:coverage xml # create report for upload
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}

uses: codecov/codecov-action@v5

# Check that all tests defined above pass. This makes it easy to set a single "required" test in branch
# protection instead of having to update it frequently. See https://github.com/re-actors/alls-green#why.
Expand Down
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ __pycache__/
# Tests and coverage
/data/
/node_modules/
/.coverage*

# docs
/docs/generated/
/docs/_build/

# jupyter
.ipynb_checkpoints/
24 changes: 4 additions & 20 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ default_stages:
minimum_pre_commit_version: 2.16.0
repos:
- repo: https://github.com/biomejs/pre-commit
rev: v2.3.2
rev: v2.2.4
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.11.0
rev: v2.6.0
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.3
rev: v0.13.2
hooks:
- id: ruff
- id: ruff-check
types_or: [python, pyi, jupyter]
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
Expand All @@ -36,19 +36,3 @@ repos:
# Check that there are no merge conflicts (could be generated by template sync)
- id: check-merge-conflict
args: [--assume-in-merge]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.18.2
hooks:
- id: mypy
args: [--no-strict-optional, --ignore-missing-imports]
additional_dependencies:
["types-setuptools", "types-requests", "types-attrs"]
- repo: local
hooks:
- id: forbid-to-commit
name: Don't commit rej files
entry: |
Cannot commit .rej files. These indicate merge conflicts that arise during automated template updates.
Fix the merge conflicts manually and remove the .rej files.
language: fail
files: '.*\.rej$'
10 changes: 5 additions & 5 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# https://docs.readthedocs.io/en/stable/config-file/v2.html
version: 2
build:
os: ubuntu-24.04
tools:
python: "3.13"
python: "3.12"
jobs:
create_environment:
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
- uv venv
- uv pip install .[doc,full]
build:
html:
- UV_LINK_MODE=copy uv run sphinx-build -T -W -b html docs $READTHEDOCS_OUTPUT/html
- uvx hatch run docs:build
- mv docs/_build $READTHEDOCS_OUTPUT

submodules:
include: all
include: all
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# decoupler - Ensemble of methods to infer enrichment scores
<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" />

<img src="https://raw.githubusercontent.com/scverse/decoupler/refs/heads/main/docs/_static/images/logo.svg" align="right" width="120" class="no-scaled-link" />

[![Tests][badge-tests]][tests]
[![Documentation][badge-docs]][documentation]
Expand Down
5 changes: 3 additions & 2 deletions biome.jsonc
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"$schema": "https://biomejs.dev/schemas/2.2.0/schema.json",
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
"formatter": { "useEditorconfig": true },
"overrides": [
{
"include": ["./.vscode/*.json", "**/*.jsonc"],
"includes": ["./.vscode/*.json", "**/*.jsonc"],
"json": {
"formatter": { "trailingCommas": "all" },
"parser": {
Expand Down
5 changes: 3 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
info = metadata("decoupler")
project_name = info["Name"]
author = info["Author"]
copyright = f"{datetime.now():%Y}, scverse"
copyright = f"{datetime.now():%Y}, scverse."
version = info["Version"]
urls = dict(pu.split(", ") for pu in info.get_all("Project-URL"))
repository_url = urls["Source"]
Expand Down Expand Up @@ -114,6 +114,7 @@
html_theme = "sphinx_book_theme"
html_static_path = ["_static"]
html_css_files = ["css/custom.css"]

html_title = project_name
html_logo = "_static/images/logo.png"
html_favicon = "_static/images/logo.png"
Expand All @@ -127,7 +128,7 @@

pygments_style = "default"

nitpick_ignore: list = [
nitpick_ignore = [
# If building the documentation fails because of a missing link that is outside your control,
# you can add an exception to this list.
# ("py:class", "igraph.Graph"),
Expand Down
28 changes: 23 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dependencies = [
"adjusttext",
Expand All @@ -47,7 +46,7 @@ optional-dependencies.doc = [
"pandas",
# Until pybtex >0.24.0 releases: https://bitbucket.org/pybtex-devs/pybtex/issues/169/
"setuptools",
"sphinx>=4",
"sphinx>=8.1",
"sphinx-autodoc-typehints",
"sphinx-book-theme>=1",
"sphinx-copybutton",
Expand All @@ -59,17 +58,20 @@ optional-dependencies.full = [
"dcor",
"igraph",
"ipywidgets",
"pydeseq2",
"scanpy",
"xgboost",
]
optional-dependencies.test = [
"coverage",
"coverage>=7.10",
"dcor",
"gseapy",
"igraph",
"ipywidgets",
"memory-profiler",
"pydeseq2",
"pytest",
"pytest-cov", # For VS Code’s coverage functionality
"scanpy",
"statsmodels",
"xgboost",
Expand All @@ -85,14 +87,29 @@ features = [ "dev" ]

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

# Test the lowest and highest supported Python versions with normal deps
[[tool.hatch.envs.hatch-test.matrix]]
deps = [ "stable" ]
python = [ "3.10", "3.13" ]

# Test the newest supported Python version also with pre-release deps
[[tool.hatch.envs.hatch-test.matrix]]
deps = [ "pre" ]
python = [ "3.13" ]

[tool.hatch.envs.hatch-test]
features = [ "test" ]
features = [ "dev", "test" ]

[tool.hatch.envs.hatch-test.overrides]
# If the matrix variable `deps` is set to "pre",
# set the environment variable `UV_PRERELEASE` to "allow".
matrix.deps.env-vars = [
{ key = "UV_PRERELEASE", value = "allow", if = [ "pre" ] },
]

[tool.ruff]
line-length = 120
Expand Down Expand Up @@ -143,6 +160,7 @@ addopts = [

[tool.coverage.run]
source = [ "decoupler" ]
patch = [ "subprocess" ]
omit = [
"**/test_*.py",
]
Expand Down
Loading