Skip to content

feat(gh-135): Smoothed Powerlaw and Gaussian with sage scripts #480

feat(gh-135): Smoothed Powerlaw and Gaussian with sage scripts

feat(gh-135): Smoothed Powerlaw and Gaussian with sage scripts #480

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: CI
on:
push:
branches: ["main", "dev"]
paths:
- "**/*.py"
- ".github/workflows/ci.yml"
pull_request:
branches: ["main", "dev"]
paths:
- "**/*.py"
- ".github/workflows/ci.yml"
jobs:
lint:
name: Lint with ruff (py ${{ matrix.python-version }} on ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
python-version:
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/[email protected]
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ruff
pip freeze
- name: Lint with ruff
run: |
ruff check .
ruff format . --check
test:
name: "build (py ${{ matrix.python-version }} on ${{ matrix.os }})"
runs-on: ${{ matrix.os }}
needs:
- lint
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
python-version:
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/[email protected]
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
python -m pip install ".[test]"
pip freeze
- name: Test with pytest
env:
PY_COLORS: 1
run: |
pytest -vs tests
documentation:
name: Documentation
runs-on: ubuntu-latest
timeout-minutes: 10
needs:
- lint
strategy:
matrix:
python-version:
- "3.11"
steps:
- uses: actions/[email protected]
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt install pandoc
python -m pip install -r docs/requirements.txt
pip freeze
- name: Test documentation
env:
XLA_FLAGS: "--xla_force_host_platform_device_count=8"
JAX_TRACEBACK_FILTERING: "off"
JAX_ARRAY: 1
PY_COLORS: 1
run: |
pytest -n auto --tb=short --doctest-glob='*.md' --doctest-glob='*.rst' docs --doctest-continue-on-failure
- name: Render documentation
run: |
cd docs
make html