Skip to content

Add opt-in lossless TIFF compression writer settings #143

Add opt-in lossless TIFF compression writer settings

Add opt-in lossless TIFF compression writer settings #143

Workflow file for this run

name: Tests
on:
push:
branches: [ main, copilot/** ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
distribution:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
- name: Install distribution validators
run: python -m pip install build "twine>=7,<8" uv
- name: Verify the generated dependency lock matches declarations
run: uv lock --check --no-python-downloads
- name: Build release artifacts
run: python -m build
- name: Validate release artifacts
run: python -m twine check dist/*
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.11", "3.12"]
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# Install the package with dev dependencies
pip install -e ".[dev]"
- name: Verify installation
run: |
python -c "import polystore; print(f'polystore {polystore.__version__} installed successfully')"
python -c "from polystore import FileManager, MemoryBackend, DiskBackend; print('All imports successful')"
- name: Lint with ruff
run: |
ruff check src/ tests/ || true
- name: Format check with black
run: |
black --check src/ tests/ || true
- name: Run tests with coverage
run: |
python -m pytest --cov=polystore --cov-report=term-missing --cov-report=xml -v
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
continue-on-error: true
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
file: ./coverage.xml
fail_ci_if_error: false
zarr-minimum:
name: Zarr minimum stack (Python 3.11)
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.11"
- name: Install the minimum supported Zarr stack
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]" -c tests/constraints/zarr-minimum.txt
python -m pip check
- name: Exercise both storage formats and every configured codec
run: python -m pytest tests/test_zarr_backend.py tests/test_zarr_batch.py tests/test_ome_zarr_storage.py tests/test_ome_zarr_metadata.py --no-cov -v
imagej-runtime:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python 3.12
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
- name: Cache the declared JDK and ImageJ artifacts
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cache/polystore
key: ${{ runner.os }}-polystore-imagej-${{ hashFiles('src/polystore/imagej_distribution.py', 'src/polystore/imagej_runtime.py') }}
- name: Install the Bio-Formats integration
run: |
python -m pip install --upgrade pip
pip install -e ".[bioformats,dev]"
- name: Resolve and initialize the declared Fiji runtime
env:
POLYSTORE_LIVE_IMAGEJ_TEST: "1"
run: python -m pytest tests/integration/test_imagej_runtime_live.py --no-cov -v