Skip to content

Dirghayu AI Models & WGS Support #16

Dirghayu AI Models & WGS Support

Dirghayu AI Models & WGS Support #16

Workflow file for this run

name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
test:
name: Test Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Install uv (10-100x faster than pip!)
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies with uv
run: |
export PATH="$HOME/.cargo/bin:$PATH"
uv pip install --system -r requirements.txt
uv pip install --system pytest pytest-cov ruff
# Takes ~10 seconds vs 2-3 minutes with pip!
- name: Lint with ruff
run: |
ruff check src/ scripts/ demo.py --output-format=github
continue-on-error: true # Don't fail on lint warnings
- name: Run tests
run: |
pytest tests/ -v --cov=src --cov-report=xml --cov-report=term
continue-on-error: true # Tests don't exist yet
- name: Test VCF parser
run: |
python scripts/download_data.py
python -c "from src.data import parse_vcf_file; df = parse_vcf_file('data/sample.vcf'); print(f'Parsed {len(df)} variants')"
- name: Upload coverage
uses: codecov/codecov-action@v4
if: matrix.python-version == '3.11'
with:
file: ./coverage.xml
flags: unittests
continue-on-error: true
lint:
name: Code Quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install ruff
run: |
export PATH="$HOME/.cargo/bin:$PATH"
uv pip install --system ruff
- name: Check formatting
run: ruff format --check src/ scripts/ demo.py
- name: Lint
run: ruff check src/ scripts/ demo.py
build:
name: Build Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Build package
run: |
export PATH="$HOME/.cargo/bin:$PATH"
uv pip install --system build
python -m build
- name: Check package
run: |
export PATH="$HOME/.cargo/bin:$PATH"
uv pip install --system twine
twine check dist/*