Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI and versions #77

Merged
merged 18 commits into from
Apr 14, 2024
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
45 changes: 16 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand All @@ -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
Expand Down
23 changes: 18 additions & 5 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]"
16 changes: 9 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
Expand Down
Loading