From 4bcda05d5a0cc971a0df12bd4900f4aceef61dbc Mon Sep 17 00:00:00 2001 From: John Kerl Date: Thu, 6 Feb 2025 13:48:20 -0500 Subject: [PATCH] [python/ci] Test against older dependency versions (#3680) * [python/ci] CI job with variant dependencies * remove extraneities --- .../workflows/python-dependency-variation.yml | 123 ++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 .github/workflows/python-dependency-variation.yml diff --git a/.github/workflows/python-dependency-variation.yml b/.github/workflows/python-dependency-variation.yml new file mode 100644 index 0000000000..db6417013d --- /dev/null +++ b/.github/workflows/python-dependency-variation.yml @@ -0,0 +1,123 @@ +name: TileDB-SOMA Python CI with varying dependencies + +on: + push: + branches: + - main + - 'release-*' + pull_request: + paths-ignore: + - '**.md' + - 'apis/r/**' + - 'docs/**' + workflow_dispatch: + +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 + + - name: ensemble2 + os: ubuntu-24.04 + python_version: 3.9 + cc: gcc-13 + cxx: g++-13 + + anndata: 0.10.9 + numba: 0.60.0 + numpy: 1.25.0 + pandas: 1.5.3 + pyarrow: 12.0.1 + scanpy: 1.10.3 + 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 + 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: Obtain test data + shell: bash + run: | + cd test + rm -rf soco + tar zxf soco.tgz + cd .. + + - name: Run pytests for Python + shell: bash + run: python -m pytest apis/python/tests/*.py -v --durations=20 --maxfail=50