diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5dec379e..7e249b74 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,12 +17,12 @@ jobs: steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: "3.12" - name: Install dependencies run: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f3bc1724..7bcc18f8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,16 +29,16 @@ jobs: # Note: This uses Google-style docstring convention # Ref: https://google.github.io/styleguide/pyguide.html name: Lint - runs-on: "ubuntu-22.04" + runs-on: "ubuntu-latest" steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: "3.12" - name: Install dependencies run: | @@ -57,35 +57,30 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-latest", "windows-latest", "macos-latest"] - python: [3.7, 3.9] + os: ["ubuntu-latest", "windows-latest", "macos-14"] + python: ["3.8", "3.12"] name: Tests (${{ matrix.os }}, Python ${{ matrix.python }}) runs-on: ${{ matrix.os }} - steps: - name: Checkout repo uses: actions/checkout@v3 - - name: Setup Micromamba - # https://github.com/mamba-org/setup-micromamba - # Note: Set channel-priority in .condarc if needed - uses: mamba-org/setup-micromamba@v1 + - name: Setup Conda + uses: conda-incubator/setup-miniconda@v3 with: + miniforge-version: latest + conda-solver: "libmamba" environment-file: environment.yml - cache-environment: true - cache-environment-key: environment-${{ hashFiles('environment.yml') }}-${{ hashFiles('pyproject.toml') }} - init-shell: >- - bash - powershell - post-cleanup: all + activate-environment: sleap-io + python-version: ${{ matrix.python }} - name: Print environment info shell: bash -l {0} run: | which python - micromamba info - micromamba list + conda info + conda list pip freeze - name: Install graphics dependencies on Ubuntu @@ -95,21 +90,13 @@ jobs: run: | sudo apt-get update && sudo apt-get install libglapi-mesa libegl-mesa0 libegl1 libopengl0 libgl1-mesa-glx - - name: Test with pytest - if: ${{ !(startsWith(matrix.os, 'ubuntu') && matrix.python == 3.9) }} - shell: bash -l {0} - run: | - pytest - - name: Test with pytest (with coverage) - if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.python == 3.9 }} shell: bash -l {0} run: | - pytest --cov=sleap_io --cov-report=xml tests/ + pytest --cov=sleap_io --cov-report=xml --durations=-1 tests/ - name: Upload coverage - uses: codecov/codecov-action@v3 - if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.python == 3.9 }} + uses: codecov/codecov-action@v4 with: fail_ci_if_error: true verbose: false diff --git a/environment.yml b/environment.yml index 251b5006..7908b6e6 100644 --- a/environment.yml +++ b/environment.yml @@ -2,16 +2,29 @@ name: sleap-io channels: - conda-forge - - defaults dependencies: - - python=3.9 - - ffmpeg + - python + - ffmpeg<6.1.0 - imageio + - imageio-ffmpeg + - av - attrs - - h5py + - pandas + - simplejson + - h5py>=3.8.0 + - hdmf - numpy - - conda-forge::opencv + - opencv<4.9.0 + - pynwb + - ndx-pose + - pytest + - pytest-cov + - black + - pydocstyle + - toml + - twine + - build - pip - pip: - "--editable=.[dev]" diff --git a/pyproject.toml b/pyproject.toml index 1c385f2c..43278a5e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,23 +10,25 @@ authors = [ {name = "Talmo Pereira", email = "talmo@salk.edu"} ] description="Standalone utilities for working with pose data from SLEAP and other tools." -requires-python = ">=3.7" +requires-python = ">=3.8" keywords = ["sleap", "pose tracking", "pose estimation", "behavior"] license = {text = "BSD-3-Clause"} classifiers = [ - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12" ] dependencies = [ - "numpy>=1.19.2", - "attrs>=21.2.0", - "h5py>=3.1.0", + "numpy", + "attrs", + "h5py>=3.8.0", "pynwb", "ndx-pose", "pandas", "simplejson", - "imageio>=2.26.0", + "imageio", "imageio-ffmpeg", "av" ]