Skip to content
Open
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
4 changes: 2 additions & 2 deletions .conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ build:

requirements:
host:
- python >=3.10
- python >=3.11
- hatchling
- hatch-vcs

run:
- python >=3.10
- python >=3.11
- anndata >=0.9
- awkward >=2.1.0
- mudata >=0.2.3
Expand Down
82 changes: 41 additions & 41 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
{
"template": "https://github.com/scverse/cookiecutter-scverse",
"commit": "d383d94fadff9e4e6fdb59d77c68cb900d7cedec",
"checkout": "v0.6.0",
"context": {
"cookiecutter": {
"project_name": "scirpy",
"package_name": "scirpy",
"project_description": "A very interesting piece of code",
"author_full_name": "Gregor Sturm",
"author_email": "mail@gregor-sturm.de",
"github_user": "grst",
"github_repo": "scirpy",
"license": "BSD 3-Clause License",
"ide_integration": true,
"_copy_without_render": [
".github/workflows/build.yaml",
".github/workflows/test.yaml",
"docs/_templates/autosummary/**.rst"
],
"_exclude_on_template_update": [
"CHANGELOG.md",
"LICENSE",
"README.md",
"docs/api.md",
"docs/index.md",
"docs/notebooks/example.ipynb",
"docs/references.bib",
"docs/references.md",
"src/**",
"tests/**"
],
"_render_devdocs": false,
"_jinja2_env_vars": {
"lstrip_blocks": true,
"trim_blocks": true
},
"_template": "https://github.com/scverse/cookiecutter-scverse",
"_commit": "d383d94fadff9e4e6fdb59d77c68cb900d7cedec"
}
},
"directory": null
"template": "https://github.com/scverse/cookiecutter-scverse",
"commit": "6ff5b92b5d44ea6d8a88e47538475718d467db95",
"checkout": "v0.7.0",
"context": {
"cookiecutter": {
"project_name": "scirpy",
"package_name": "scirpy",
"project_description": "A very interesting piece of code",
"author_full_name": "Gregor Sturm",
"author_email": "mail@gregor-sturm.de",
"github_user": "grst",
"github_repo": "scirpy",
"license": "BSD 3-Clause License",
"ide_integration": true,
"_copy_without_render": [
".github/workflows/build.yaml",
".github/workflows/test.yaml",
"docs/_templates/autosummary/**.rst"
],
"_exclude_on_template_update": [
"CHANGELOG.md",
"LICENSE",
"README.md",
"docs/api.md",
"docs/index.md",
"docs/notebooks/example.ipynb",
"docs/references.bib",
"docs/references.md",
"src/**",
"tests/**"
],
"_render_devdocs": false,
"_jinja2_env_vars": {
"lstrip_blocks": true,
"trim_blocks": true
},
"_template": "https://github.com/scverse/cookiecutter-scverse",
"_commit": "6ff5b92b5d44ea6d8a88e47538475718d467db95"
}
},
"directory": null
}
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Bug report
description: Report something that is broken or incorrect
labels: bug
type: Bug
body:
- type: markdown
attributes:
Expand All @@ -9,8 +9,7 @@ body:
detailing how to provide the necessary information for us to reproduce your bug. In brief:
* Please provide exact steps how to reproduce the bug in a clean Python environment.
* In case it's not clear what's causing this bug, please provide the data or the data generation procedure.
* Sometimes it is not possible to share the data, but usually it is possible to replicate problems on publicly
available datasets or to share a subset of your data.
* Replicate problems on public datasets or share data subsets when full sharing isn't possible.

- type: textarea
id: report
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Feature request
description: Propose a new feature for scirpy
labels: enhancement
type: Enhancement
body:
- type: textarea
id: description
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,16 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
# to fail on error in multiline statements (-e), in pipes (-o pipefail), and on unset variables (-u).
shell: bash -euo pipefail {0}

jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
filter: blob:none
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
cache-dependency-glob: pyproject.toml
uses: astral-sh/setup-uv@v7
- name: Build package
run: uv build
- name: Check package
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ on:
release:
types: [published]

defaults:
run:
# to fail on error in multiline statements (-e), in pipes (-o pipefail), and on unset variables (-u).
shell: bash -euo pipefail {0}

# Use "trusted publishing", see https://docs.pypi.org/trusted-publishers/
jobs:
release:
Expand All @@ -20,14 +15,12 @@ jobs:
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
filter: blob:none
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
cache-dependency-glob: pyproject.toml
uses: astral-sh/setup-uv@v7
- name: Build package
run: uv build
- name: Publish package distributions to PyPI
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-tutorials.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
os:
- ubuntu-latest
python:
- "3.10"
- "3.13"

env:
OS: ${{ matrix.os }}
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
# to fail on error in multiline statements (-e), in pipes (-o pipefail), and on unset variables (-u).
shell: bash -euo pipefail {0}

jobs:
# Get the test environment from hatch as defined in pyproject.toml.
# This ensures that the pyproject.toml is the single point of truth for test definitions and the same tests are
Expand All @@ -28,12 +23,12 @@ jobs:
outputs:
envs: ${{ steps.get-envs.outputs.envs }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
filter: blob:none
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v7
- name: Get test environments
id: get-envs
run: |
Expand All @@ -51,6 +46,8 @@ jobs:
# Run tests through hatch. Spawns a separate runner for each environment defined in the hatch matrix obtained above.
test:
needs: get-environments
permissions:
id-token: write # for codecov OIDC

strategy:
fail-fast: false
Expand All @@ -63,15 +60,14 @@ jobs:
continue-on-error: ${{ contains(matrix.env.name, 'pre') }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
filter: blob:none
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.env.python }}
cache-dependency-glob: pyproject.toml
- name: create hatch environment
run: uvx hatch env create ${{ matrix.env.name }}
- name: run tests using hatch
Expand All @@ -88,6 +84,9 @@ jobs:
uvx hatch run ${{ matrix.env.name }}:coverage xml # create report for upload
- name: Upload coverage
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
use_oidc: true

# 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: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ default_stages:
minimum_pre_commit_version: 2.16.0
repos:
- repo: https://github.com/biomejs/pre-commit
rev: v2.3.8
rev: v2.3.10
hooks:
- id: biome-format
exclude: ^\.cruft\.json$ # inconsistent indentation with cruft - file never to be modified manually.
Expand All @@ -16,7 +16,7 @@ repos:
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.9
rev: v0.14.10
hooks:
- id: ruff-check
types_or: [python, pyi, jupyter]
Expand Down
3 changes: 2 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ version: 2
build:
os: ubuntu-24.04
tools:
python: "3.12"
python: "3.13"
nodejs: latest
jobs:
create_environment:
- asdf plugin add uv
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Please refer to the [documentation][link-docs]. In particular, the

## Installation

You need to have Python 3.10 or newer installed on your system. If you don't have
You need to have Python 3.11 or newer installed on your system. If you don't have
Python installed, we recommend installing [Mambaforge](https://github.com/conda-forge/miniforge#mambaforge).

There are several alternative options to install scirpy:
Expand Down
22 changes: 13 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------
import os
import shutil
import sys
from datetime import datetime
from importlib.metadata import metadata
from pathlib import Path
import os

from sphinxcontrib import katex

HERE = Path(__file__).parent
sys.path.insert(0, str(HERE / "extensions"))
Expand All @@ -19,7 +22,7 @@
# NOTE: If you installed your project in editable mode, this might be stale.
# If this is the case, reinstall it to refresh the metadata
info = metadata("scirpy")
project_name = info["Name"]
project = info["Name"]
author = info["Author"]
copyright = f"{datetime.now():%Y}, {author}."
version = info["Version"]
Expand All @@ -39,10 +42,10 @@

html_context = {
"display_github": True, # Integrate GitHub
"github_user": "scverse", # Username
"github_repo": project_name, # Repo name
"github_version": "main", # Version
"conf_py_path": "/docs/", # Path in the checkout to the docs root
"github_user": "scverse",
"github_repo": project,
"github_version": "main",
"conf_py_path": "/docs/",
}

# Set canonical URL from the Read the Docs Domain
Expand All @@ -63,9 +66,9 @@
"sphinx.ext.autosummary",
"sphinx.ext.napoleon",
"sphinxcontrib.bibtex",
"sphinxcontrib.katex",
"sphinx_autodoc_typehints",
"sphinx_tabs.tabs",
"sphinx.ext.mathjax",
"IPython.sphinxext.ipython_console_highlighting",
"sphinxext.opengraph",
*[p.stem for p in (HERE / "extensions").glob("*.py")],
Expand Down Expand Up @@ -139,9 +142,9 @@
#
html_theme = "sphinx_book_theme"
html_static_path = ["_static"]
html_title = project_name
html_logo = "img/scirpy_logo.png"
html_css_files = ["css/custom.css"]
html_title = project
html_logo = "img/scirpy_logo.png"

html_theme_options = {
"repository_url": repository_url,
Expand All @@ -151,6 +154,7 @@
}

pygments_style = "default"
katex_prerender = shutil.which(katex.NODEJS_BINARY) is not None

# -- nbsphinx Tutorials ----------------------------------------------------------------

Expand Down
12 changes: 6 additions & 6 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ This will list “Standalone” environments and a table of “Matrix” environ
+------------+---------+--------------------------+----------+---------------------------------+-------------+
| Name | Type | Envs | Features | Dependencies | Scripts |
+------------+---------+--------------------------+----------+---------------------------------+-------------+
| hatch-test | virtual | hatch-test.py3.10-stable | dev | coverage-enable-subprocess==1.0 | cov-combine |
| | | hatch-test.py3.13-stable | test | coverage[toml]~=7.4 | cov-report |
| | | hatch-test.py3.13-pre | | pytest-mock~=3.12 | run |
| hatch-test | virtual | hatch-test.py3.11-stable | dev | coverage-enable-subprocess==1.0 | cov-combine |
| | | hatch-test.py3.14-stable | test | coverage[toml]~=7.4 | cov-report |
| | | hatch-test.py3.14-pre | | pytest-mock~=3.12 | run |
| | | | | pytest-randomly~=3.15 | run-cov |
| | | | | pytest-rerunfailures~=14.0 | |
| | | | | pytest-xdist[psutil]~=3.5 | |
Expand All @@ -73,18 +73,18 @@ This will list “Standalone” environments and a table of “Matrix” environ
```

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

Next, create the environment with

```bash
hatch env create hatch-test.py3.13-stable
hatch env create hatch-test.py3.14-stable
```

Then, obtain the path to the environment using

```bash
hatch env find hatch-test.py3.13-stable
hatch env find hatch-test.py3.14-stable
```

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