Skip to content

Add ty type checker #259

Add ty type checker

Add ty type checker #259

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
pull_request:
permissions:
contents: read
env:
FORCE_COLOR: 1
jobs:
test:
strategy:
fail-fast: false
matrix:
python: ["3.9", "3.14"]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
version: "0.9.26"
- name: Test script with `uv run`
run: |
uv run src/promdens/promdens.py --help
uv run src/promdens/promdens.py --plot --omega 0.2 --fwhm 5.0 -lch 0.001 -ns 3 -eu "eV" --npsamples 5 tests/test_data.txt
uv run src/promdens/promdens.py --plot --method=pdaw -lch 0.001 --omega 0.2 --fwhm 5.0 -ns 3 -eu "eV" --npsamples 5 tests/test_data.txt
- name: Type check with ty
run: uvx --with-editable .[tests] ty@0.0.31 check
- name: Install package
run: uv pip install --system -e .[tests]
- name: Run unit tests
run: pytest -v
- name: Run smoke tests from installed package
run: |
promdens --help
promdens --plot --omega 0.2 --fwhm 5.0 -lch 0.001 -ns 3 -eu "eV" --npsamples 5 tests/test_data.txt
promdens --plot --method=pdaw -lch 0.001 --omega 0.2 --fwhm 5.0 -ns 3 -eu "eV" --npsamples 5 tests/test_data.txt
python supplementary/envelopes_analysis/field_envelopes.py