durandtibo/coola

View on GitHub
.github/workflows/test-deps.yaml

Summary

Maintainability
Test Coverage
name: Test - Dependencies
on:
  workflow_call:
  workflow_dispatch:  # to trigger manually

jobs:
  jax:
    runs-on: ${{ matrix.os }}
    timeout-minutes: 10
    strategy:
      max-parallel: 8
      fail-fast: false
      matrix:
        os: [ ubuntu-latest ]
        python-version: [ '3.13', '3.12', '3.11', '3.10', '3.9' ]
        jax-version: [ 0.4.38, 0.4.35, 0.4.31, 0.4.30, 0.4.17, 0.4.16, 0.4.6 ]
        # python 3.9 | jaxlib: 0.4.6 -> 0.4.30
        # python 3.10 | jaxlib: 0.4.6 ->
        # python 3.11 | jaxlib: 0.4.6 ->
        # python 3.12 | jaxlib: 0.4.17 ->
        # python 3.13 | jaxlib: 0.4.34 ->

    steps:
      - name: Checkout
        uses: actions/checkout@v4

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

      - name: Install Poetry
        uses: snok/install-poetry@v1

      - name: Set environment variable
        run: |
          echo $(poetry run poetry env info --path)/bin >> $GITHUB_PATH

      - name: Install packages
        run: |
          make install

      - name: Install valid package version
        uses: durandtibo/pip-install-package-action@v0.3.1
        with:
          package-name: 'jax'
          package-version: ${{ matrix.jax-version }}
          python-version: ${{ matrix.python-version }}

      - name: Show installed packages
        run: |
          poetry show
          poetry show --tree

      - name: Run unit tests
        run: |
          make unit-test-cov


  numpy:
    runs-on: ${{ matrix.os }}
    timeout-minutes: 10
    strategy:
      max-parallel: 8
      fail-fast: false
      matrix:
        os: [ ubuntu-latest ]
        python-version: [ '3.13', '3.12', '3.11', '3.10', '3.9' ]
        numpy-version: [
          2.2.1,
          2.1.3,
          2.0.2,
          1.26.4,
          1.25.2,
          1.24.3,
          1.23.5,
          1.22.4,
          1.21.6,
        ]

    steps:
      - name: Checkout
        uses: actions/checkout@v4

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

      - name: Install Poetry
        uses: snok/install-poetry@v1

      - name: Set environment variable
        run: |
          echo $(poetry run poetry env info --path)/bin >> $GITHUB_PATH

      - name: Install packages
        run: |
          make install

      - name: Install valid package version
        uses: durandtibo/pip-install-package-action@v0.3.1
        with:
          package-name: 'numpy'
          package-version: ${{ matrix.numpy-version }}
          python-version: ${{ matrix.python-version }}

      - name: Show installed packages
        run: |
          poetry show
          poetry show --tree

      - name: Run unit tests
        run: |
          make unit-test-cov


  packaging:
    runs-on: ${{ matrix.os }}
    timeout-minutes: 10
    strategy:
      max-parallel: 8
      fail-fast: false
      matrix:
        os: [ ubuntu-latest ]
        python-version: [ '3.13', '3.12', '3.11', '3.10', '3.9' ]
        packaging-version: [ '24.2', '23.2', '22.0', '21.3' ]

    steps:
      - name: Checkout
        uses: actions/checkout@v4

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

      - name: Install Poetry
        uses: snok/install-poetry@v1

      - name: Set environment variable
        run: |
          echo $(poetry run poetry env info --path)/bin >> $GITHUB_PATH

      - name: Install packages
        run: |
          make install

      - name: Install valid package version
        uses: durandtibo/pip-install-package-action@v0.3.1
        with:
          package-name: 'packaging'
          package-version: ${{ matrix.packaging-version }}
          python-version: ${{ matrix.python-version }}

      - name: Show installed packages
        run: |
          poetry show
          poetry show --tree

      - name: Run unit tests
        run: |
          make unit-test-cov


  pandas:
    runs-on: ${{ matrix.os }}
    timeout-minutes: 10
    strategy:
      max-parallel: 8
      fail-fast: false
      matrix:
        os: [ ubuntu-latest ]
        python-version: [ '3.13', '3.12', '3.11', '3.10', '3.9' ]
        pandas-version: [ 2.2.3, 2.1.4, 2.0.3, 1.5.3, 1.4.4, 1.3.5 ]

    steps:
      - name: Checkout
        uses: actions/checkout@v4

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

      - name: Install Poetry
        uses: snok/install-poetry@v1

      - name: Set environment variable
        run: |
          echo $(poetry run poetry env info --path)/bin >> $GITHUB_PATH

      - name: Install packages
        run: |
          make install

      - name: Install valid package version
        uses: durandtibo/pip-install-package-action@v0.3.1
        with:
          package-name: 'pandas'
          package-version: ${{ matrix.pandas-version }}
          python-version: ${{ matrix.python-version }}

      - name: Show installed packages
        run: |
          poetry show
          poetry show --tree

      - name: Run unit tests
        run: |
          make unit-test-cov


  polars:
    runs-on: ${{ matrix.os }}
    timeout-minutes: 10
    strategy:
      max-parallel: 8
      fail-fast: false
      matrix:
        os: [ ubuntu-latest ]
        python-version: [ '3.13', '3.12', '3.11', '3.10', '3.9' ]
        polars-version: [
          1.19.0,
          1.18.0,
          1.17.1,
          1.16.0,
          1.15.0,
          1.14.0,
          1.12.0,
          1.11.0,
          1.10.0,
          1.9.0,
          1.8.2,
          1.7.1,
          1.6.0,
          1.5.0,
          1.4.1,
          1.3.0,
          1.2.1,
          1.1.0,
          1.0.0,
          0.20.31,
          0.19.19,
          0.18.15,
          0.18.3,
        ]

    steps:
      - name: Checkout
        uses: actions/checkout@v4

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

      - name: Install Poetry
        uses: snok/install-poetry@v1

      - name: Set environment variable
        run: |
          echo $(poetry run poetry env info --path)/bin >> $GITHUB_PATH

      - name: Install packages
        run: |
          make install

      - name: Install valid package version
        uses: durandtibo/pip-install-package-action@v0.3.1
        with:
          package-name: 'polars'
          package-version: ${{ matrix.polars-version }}
          python-version: ${{ matrix.python-version }}

      - name: Show installed packages
        run: |
          poetry show
          poetry show --tree

      - name: Run unit tests
        run: |
          make unit-test-cov


  pyarrow:
    runs-on: ${{ matrix.os }}
    timeout-minutes: 10
    strategy:
      max-parallel: 8
      fail-fast: false
      matrix:
        os: [ ubuntu-latest ]
        python-version: [ '3.13', '3.12', '3.11', '3.10', '3.9' ]
        pyarrow-version: [
          18.1.0,
          17.0.0,
          16.1.0,
          15.0.2,
          14.0.2,
          13.0.0,
          12.0.1,
          11.0.0,
          10.0.1,
        ]

    steps:
      - name: Checkout
        uses: actions/checkout@v4

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

      - name: Install Poetry
        uses: snok/install-poetry@v1

      - name: Set environment variable
        run: |
          echo $(poetry run poetry env info --path)/bin >> $GITHUB_PATH

      - name: Install packages
        run: |
          make install

      - name: Install valid package version
        uses: durandtibo/pip-install-package-action@v0.3.1
        with:
          package-name: 'pyarrow'
          package-version: ${{ matrix.pyarrow-version }}
          python-version: ${{ matrix.python-version }}

      - name: Show installed packages
        run: |
          poetry show
          poetry show --tree

      - name: Run unit tests
        run: |
          make unit-test-cov


  torch:
    runs-on: ${{ matrix.os }}
    timeout-minutes: 10
    strategy:
      max-parallel: 8
      fail-fast: false
      matrix:
        os: [ ubuntu-latest ]
        python-version: [ '3.12', '3.11', '3.10', '3.9' ]
        torch-version: [
          2.5.1,
          2.4.1,
          2.3.1,
          2.2.2,
          2.1.2,
          2.0.1,
          1.13.1,
          1.12.1,
          1.11.0,
        ]

    steps:
      - name: Checkout
        uses: actions/checkout@v4

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

      - name: Install Poetry
        uses: snok/install-poetry@v1

      - name: Set environment variable
        run: |
          echo $(poetry run poetry env info --path)/bin >> $GITHUB_PATH

      - name: Install packages
        run: |
          make install

      - name: Install valid package version
        uses: durandtibo/pip-install-package-action@v0.3.1
        with:
          package-name: 'torch'
          package-version: ${{ matrix.torch-version }}
          python-version: ${{ matrix.python-version }}

      - name: Show installed packages
        run: |
          poetry show
          poetry show --tree

      - name: Run unit tests
        run: |
          make unit-test-cov


  xarray:
    runs-on: ${{ matrix.os }}
    timeout-minutes: 20
    strategy:
      max-parallel: 8
      fail-fast: false
      matrix:
        os: [ ubuntu-latest ]
        python-version: [ '3.13', '3.12', '3.11', '3.10', '3.9' ]
        xarray-version: [
          '2025.1.0',
          '2024.11.0',
          '2024.10',
          '2024.9',
          '2024.7',
          '2024.6',
          '2024.5',
          '2024.3',
          '2024.2',
          '2024.1',
          '2023.12',
          '2023.11',
          '2023.10',
          '2023.9',
          '2023.8',
          '2023.1',
        ]

    steps:
      - name: Checkout
        uses: actions/checkout@v4

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

      - name: Install Poetry
        uses: snok/install-poetry@v1

      - name: Set environment variable
        run: |
          echo $(poetry run poetry env info --path)/bin >> $GITHUB_PATH

      - name: Install packages
        run: |
          make install

      - name: Install valid package version
        uses: durandtibo/pip-install-package-action@v0.3.1
        with:
          package-name: 'xarray'
          package-version: ${{ matrix.xarray-version }}
          python-version: ${{ matrix.python-version }}

      - name: Show installed packages
        run: |
          poetry show
          poetry show --tree

      - name: Run unit tests
        run: |
          make unit-test-cov