Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
labels:
- no milestone
- skip-gpu-ci
8 changes: 6 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ env:

defaults:
run:
shell: bash -el {0}
# Add `-l` to GitHub’s default bash options to activate mamba environments
# https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#exit-codes-and-error-action-preference
# https://github.com/mamba-org/setup-micromamba/#readme
shell: bash -elo pipefail {0}

jobs:
benchmark:
Expand All @@ -29,9 +32,10 @@ jobs:
ASV_DIR: "./benchmarks"

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0
# no blob filter so asv can checkout other commits

- run: git fetch origin main:main
if: ${{ github.ref_name != 'main' }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ env:

jobs:
check-milestone:
name: "Triage: Check Milestone"
name: "Triage: Check PR title, milestone, and labels"
runs-on: ubuntu-latest
steps:
- name: Check if merging isn’t blocked
Expand All @@ -35,3 +35,7 @@ jobs:
uses: flying-sheep/check@v1
with:
success: ${{ github.event.pull_request.user.login == 'pre-commit-ci[bot]' || github.event.pull_request.milestone != null || contains(env.LABELS, 'no milestone') }}
- name: Check if PR title is valid
uses: amannn/action-semantic-pull-request@v6
env: # Needs repo options: “Squash and merge” with commit message set to “PR title”
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
permissions:
id-token: write # to authenticate as Trusted Publisher to pypi.org
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0
filter: blob:none
Expand Down
47 changes: 24 additions & 23 deletions .github/workflows/test-cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@ on:
env:
FORCE_COLOR: "1"

defaults:
run:
shell: bash -el {0}

# Cancel the job if new commits are pushed
# https://stackoverflow.com/questions/66335225/how-to-cancel-previous-runs-in-the-pr-when-you-push-new-commitsupdate-the-curre
# Cancel the job if new commits are pushed: https://stackoverflow.com/q/66335225/247482
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -26,11 +21,11 @@ jobs:
outputs:
envs: ${{ steps.get-envs.outputs.envs }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
filter: blob:none
fetch-depth: 0
- uses: astral-sh/setup-uv@v5
- uses: astral-sh/setup-uv@v6
with:
enable-cache: false
- id: get-envs
Expand All @@ -41,6 +36,7 @@ jobs:
| { name: .key, python: .value.python, args: (.value."extra-args" // [] | join(" ")) }
)')
echo "envs=${ENVS_JSON}" | tee $GITHUB_OUTPUT

test:
needs: get-environments
runs-on: ubuntu-latest
Expand All @@ -51,31 +47,35 @@ jobs:
env: # environment variable for use in codecov’s env_vars tagging
ENV_NAME: ${{ matrix.env.name }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0
filter: blob:none

- name: Install system dependencies
run: sudo apt install -y hdf5-tools

- name: Set up Python ${{ matrix.env.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.env.python }}

- name: Install UV
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: pyproject.toml
python-version: ${{ matrix.env.python }}

- name: Install dependencies
run: uvx hatch -v env create ${{ matrix.env.name }}

- name: Run tests
run: uvx hatch run ${{ matrix.env.name }}:run-cov -v --color=yes -n auto --cov --cov-report=xml --junitxml=test-data/test-results.xml -m "${{ matrix.io_mark }}" ${{ matrix.env.args }}

- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: ENV_NAME
fail_ci_if_error: true
file: test-data/test-results.xml

- name: Upload coverage data
uses: codecov/codecov-action@v5
with:
Expand All @@ -85,17 +85,18 @@ jobs:
files: test-data/coverage.xml

build:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0
filter: blob:none

- name: Set up Python 3.13
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
python-version: '3.x'
cache: pip

- name: Install build tools and requirements
run: |
Expand Down Expand Up @@ -123,6 +124,6 @@ jobs:
- build
runs-on: ubuntu-latest
steps:
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
20 changes: 5 additions & 15 deletions .github/workflows/test-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ env:
PYTEST_ADDOPTS: "-v --color=yes"
FORCE_COLOR: "1"

defaults:
run:
shell: bash -el {0}

# Cancel the job if new commits are pushed
# https://stackoverflow.com/questions/66335225/how-to-cancel-previous-runs-in-the-pr-when-you-push-new-commitsupdate-the-curre
concurrency:
Expand Down Expand Up @@ -48,7 +44,7 @@ jobs:
timeout-minutes: 30

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0
filter: blob:none
Expand All @@ -66,28 +62,22 @@ jobs:
max_version=$(echo "$classifiers" | sort -V | tail -1)
echo "max_python_version=$max_version" >> $GITHUB_ENV

- name: Install Python
uses: actions/setup-python@v5
with:
# https://github.com/cupy/cupy/issues/8651 cupy does not support python3.13 yet
python-version: "3.12"

- name: Install UV
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: pyproject.toml
python-version: ${{ env.max_python_version }}

- name: Install AnnData
run: uv pip install --system -e ".[dev,test,cu12]" -c ci/constraints.txt

- name: Env list
run: pip list
run: uv pip list

- name: Run test
run: coverage run -m pytest -m gpu -n auto --cov --cov-report=xml

- uses: codecov/codecov-action@v4
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
build:
os: ubuntu-20.04
os: ubuntu-24.04
tools:
python: "3.13"
jobs:
Expand Down
File renamed without changes.
17 changes: 10 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,13 @@ single_file = false
package_dir = "src"
issue_format = "{{pr}}`{issue}`"
title_format = "(v{version})=\n### {version} {{small}}`{project_date}`"
fragment.bugfix.name = "Bug fixes"
fragment.doc.name = "Documentation"
fragment.feature.name = "Features"
fragment.misc.name = "Miscellaneous improvements"
fragment.performance.name = "Performance"
fragment.breaking.name = "Breaking changes"
fragment.dev.name = "Development Process"
# Valid fragments should be a subset of conventional commit types (except for `breaking`):
# https://github.com/commitizen/conventional-commit-types/blob/master/index.json
# style, refactor, test, build, ci: should not go into changelog
fragment.feat.name = "Features"
fragment.fix.name = "Bug fixes"
fragment.docs.name = "Documentation"
fragment.perf.name = "Performance"
fragment.chore.name = "Miscellaneous changes"
fragment.revert.name = "Revert"
fragment.breaking.name = "Breaking changes" # add `!` to commit type (e.g. “feature!:”)
Comment on lines +253 to +262
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please double-check if I got them all right. I didn’t add a test, but these don’t change so it should be fine.

Loading