Skip to content

Commit

Permalink
[python/ci] CI job with variant dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkerl committed Feb 6, 2025
1 parent e1a0ce3 commit 379c7e9
Show file tree
Hide file tree
Showing 4 changed files with 143 additions and 31 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/libtiledb-ci.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
name: libTileDB-SOMA CodeCov

on:
pull_request:
paths-ignore:
- "apis/python/**"
- "apis/r/**"
- ".pre-commit-config.yaml"
push:
branches:
- main
- 'release-*'
# XXX TEMP
# pull_request:
# paths-ignore:
# - "apis/python/**"
# - "apis/r/**"
# - ".pre-commit-config.yaml"
# push:
# branches:
# - main
# - 'release-*'
workflow_dispatch:

jobs:
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/libtiledbsoma-asan-ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
name: libtiledbsoma ASAN

on:
pull_request:
paths-ignore:
- "apis/python/**"
- "apis/r/**"
- ".pre-commit-config.yaml"
push:
branches:
- main
- 'release-*'
workflow_dispatch:
# XXX TEMP
# pull_request:
# paths-ignore:
# - "apis/python/**"
# - "apis/r/**"
# - ".pre-commit-config.yaml"
# push:
# branches:
# - main
# - 'release-*'
# workflow_dispatch:

jobs:
asan:
Expand Down
25 changes: 13 additions & 12 deletions .github/workflows/python-ci-minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@ name: TileDB-SOMA Python CI (Minimal)
# To test the full matrix on a working branch, invoke ./python-ci-full.yml from
# https://github.com/single-cell-data/TileDB-SOMA/actions/workflows/python-ci-full.yml
on:
pull_request:
branches:
- main
- 'release-*'
paths:
- '**'
- '!**.md'
- '!apis/r/**'
- '!docs/**'
- '!.github/**'
- '.github/workflows/python-ci-minimal.yml'
- '.github/workflows/python-ci-single.yml'
# XXX TEMP
# pull_request:
# branches:
# - main
# - 'release-*'
# paths:
# - '**'
# - '!**.md'
# - '!apis/r/**'
# - '!docs/**'
# - '!.github/**'
# - '.github/workflows/python-ci-minimal.yml'
# - '.github/workflows/python-ci-single.yml'
workflow_dispatch:

jobs:
Expand Down
109 changes: 109 additions & 0 deletions .github/workflows/python-dependency-variation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: TileDB-SOMA Python CI with varying dependencies

on:
workflow_dispatch:
#
# Not for regular use:
# TEMP
pull_request:
#
# TODO: a nightly cron

env:
TILEDB_REST_TOKEN: ${{ secrets.TILEDB_REST_UNITTEST_TOKEN}}

jobs:
ci:
strategy:
fail-fast: false
matrix:
include:
- name: ensemble1
os: ubuntu-24.04
python_version: 3.9
cc: gcc-13
cxx: g++-13

anndata: 0.10.8
numba: 0.60.0
numpy: 1.25.0
pandas: 1.5.3
pyarrow: 11.0.0
scanpy: 1.9.8
scipy: 1.13.1

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Show matrix OS
run: echo "matrix.os:" ${{ matrix.os }}

- name: Linux CPU info
if: ${{ matrix.os == 'ubuntu-24.04' }}
run: cat /proc/cpuinfo

- name: MacOS CPU info
if: ${{ matrix.os == 'macOS-latest' }}
run: sysctl -a | grep cpu

- name: Select XCode version
if: startsWith(matrix.os, 'macos')
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.4'

- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
cache: pip
cache-dependency-path: ./apis/python/setup.py

- name: Show XCode version
run: clang --version

- name: Check out TileDB-SOMA
uses: actions/checkout@v4
with:
fetch-depth: 0 # ensure we get all tags to inform package version determination

- name: Log pip dependencies
run: pip list

- name: Install tiledbsoma
# If you'reiterating on the testing framework itself, install from PyPI to avoid the
# time-consuming build. If you're trying to evaluate the code modified by a PR,
# install from source.
#
# From PyPI:
run: pip install tiledbsoma==1.15.7
#
# From source:
# run: pip -v install -e apis/python[all] -C "--build-option=--no-tiledb-deprecated"
#
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}

- name: Install dependencies
run: pip install --prefer-binary pytest typeguard

- name: Install variant dependencies
run: |
pip install \
anndata==${{matrix.anndata}} \
numba==${{matrix.numba}} \
numpy==${{matrix.numpy}} \
pandas==${{matrix.pandas}} \
pyarrow==${{matrix.pyarrow}} \
scanpy==${{matrix.scanpy}} \
scipy==${{matrix.scipy}}
- name: Show package versions
run: python scripts/show-versions.py

- name: Run pytests for Python
shell: bash
run: python -m pytest apis/python/tests -v --durations=20 --maxfail=50

0 comments on commit 379c7e9

Please sign in to comment.