Skip to content

Commit 4d5a482

Browse files
Zethsonilan-gold
andauthored
Add pertpy & decoupler to test matrix (#17)
* Add pertpy to test matrix * add decoupler & extras Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * parallel Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * fix Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * simplify Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * simplify Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * simplify Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * polish Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Add extras comment Co-authored-by: Ilan Gold <ilanbassgold@gmail.com> * Extras Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> --------- Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> Co-authored-by: Ilan Gold <ilanbassgold@gmail.com>
1 parent 3e717f3 commit 4d5a482

2 files changed

Lines changed: 61 additions & 12 deletions

File tree

.github/workflows/integration-test.yml

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,18 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
python: ["3.11", "3.12"]
21-
package: ["mudata", "spatialdata", "scirpy", "muon", "scanpy", "squidpy", "scvi-tools"]
21+
package:
22+
# extras should be a comma seperated list of strings, like `extras: "lazy,accelerated"`
23+
# The 'test' extra is always installed
24+
- {name: "mudata", extras: ""}
25+
- {name: "spatialdata", extras: ""}
26+
- {name: "scirpy", extras: ""}
27+
- {name: "muon", extras: ""}
28+
- {name: "scanpy", extras: ""}
29+
- {name: "squidpy", extras: ""}
30+
- {name: "scvi-tools", extras: ""}
31+
- {name: "pertpy", extras: "de"}
32+
- {name: "decoupler", extras: ""}
2233

2334
defaults:
2435
run:
@@ -40,10 +51,10 @@ jobs:
4051

4152
- uses: actions/checkout@v4
4253
with:
43-
repository: scverse/${{ matrix.package }}
54+
repository: scverse/${{ matrix.package.name }}
4455
fetch-depth: 0
4556
filter: blob:none
46-
path: ${{ matrix.package }}
57+
path: ${{ matrix.package.name }}
4758

4859
- name: Install Python
4960
uses: actions/setup-python@v5
@@ -53,15 +64,19 @@ jobs:
5364
- name: Install UV
5465
uses: hynek/setup-cached-uv@v2
5566

56-
- name: Install AnnData + test dep
67+
- name: Install AnnData and scverse package
5768
run: |
58-
uv pip install --compile --system ".[test]" git+https://github.com/scverse/anndata -c ../integration-testing/constraints.txt -v
59-
working-directory: ${{ matrix.package }}
69+
EXTRAS="test"
70+
if [ -n "${{ matrix.package.extras }}" ]; then
71+
EXTRAS="$EXTRAS,${{ matrix.package.extras }}"
72+
fi
73+
uv pip install --compile --system ".[$EXTRAS]" git+https://github.com/scverse/anndata -c ../integration-testing/constraints.txt -v
74+
working-directory: ${{ matrix.package.name }}
6075

6176
- name: Set failure type for install
6277
if: failure()
6378
run: |
64-
echo "Installation failed for ${{ matrix.package }}"
79+
echo "Installation failed for ${{ matrix.package.name }}"
6580
echo "failure_type=install" >> $GITHUB_ENV
6681
6782
- name: Env list
@@ -70,12 +85,12 @@ jobs:
7085
- name: Run test
7186
run: |
7287
pytest
73-
working-directory: ${{ matrix.package }}
88+
working-directory: ${{ matrix.package.name }}
7489

7590
- name: Set failure type for test
7691
if: failure() && env.failure_type != 'install'
7792
run: |
78-
echo "Test failed for ${{ matrix.package }}"
93+
echo "Test failed for ${{ matrix.package.name }}"
7994
echo "failure_type=test" >> $GITHUB_ENV
8095
8196
- name: Check for open failure issue
@@ -84,7 +99,7 @@ jobs:
8499
run: |
85100
ISSUE_TITLE="Integration Testing CI ${failure_type^} Failure on python ${{ matrix.python }}"
86101
echo "Checking for existing issue: $ISSUE_TITLE"
87-
ISSUE_COUNT=$(gh issue list --repo scverse/${{ matrix.package }} --state open --search "${ISSUE_TITLE}" --json number --jq 'length')
102+
ISSUE_COUNT=$(gh issue list --repo scverse/${{ matrix.package.name }} --state open --search "${ISSUE_TITLE}" --json number --jq 'length')
88103
if [[ "$ISSUE_COUNT" -gt 0 ]]; then
89104
echo "${failure_type^} failure issue already exists for today."
90105
echo "issue_exists=true" >> $GITHUB_ENV
@@ -97,8 +112,8 @@ jobs:
97112
if: failure() && env.issue_exists == 'false' && github.event_name == 'schedule'
98113
run: |
99114
RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
100-
ISSUE_BODY="The daily CI failed on ${failure_type} for ${{ matrix.package }} failed. Please go to [the logs of the integration testing repo](${RUN_URL}) to review. @scverse/anndata"
101-
gh issue create --repo scverse/${{ matrix.package }} --title "${{ env.issue_title }}" --body "${ISSUE_BODY}"
115+
ISSUE_BODY="The daily CI failed on ${failure_type} for ${{ matrix.package.name }} failed. Please go to [the logs of the integration testing repo](${RUN_URL}) to review. @scverse/anndata"
116+
gh issue create --repo scverse/${{ matrix.package.name }} --title "${{ env.issue_title }}" --body "${ISSUE_BODY}"
102117
103118
keepalive-job:
104119
name: Keepalive Workflow

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# scverse-integration-testing
2+
3+
This repository contains integration tests for the [scverse](https://github.com/scverse) core packages.
4+
We currently do not accept ecosystem packages but may change our mind in the future.
5+
6+
## Overview
7+
8+
The integration tests are run automatically via GitHub Actions on a daily schedule, as well as on pushes and pull requests to the `main` branch. The workflow installs each package, applies constraints, and runs the test suite to detect breaking changes early.
9+
10+
## Tested Packages
11+
12+
The following packages are tested:
13+
- mudata
14+
- spatialdata
15+
- scirpy
16+
- muon
17+
- scanpy
18+
- squidpy
19+
- scvi-tools
20+
- pertpy
21+
- decoupler
22+
23+
## How it Works
24+
25+
- Each package is checked out and tested in isolation.
26+
- AnnData (from the main branch) is installed with test dependencies.
27+
- Constraints from [`constraints.txt`](constraints.txt) are applied to avoid known incompatibilities.
28+
- Failures are reported automatically, and issues are opened if the daily scheduled run fails.
29+
30+
See the workflow file at [`.github/workflows/integration-test.yml`](.github/workflows/integration-test.yml) for details.
31+
32+
## License
33+
34+
This project is licensed under the [MIT License](LICENSE).

0 commit comments

Comments
 (0)