Fix jax.config
related CI errors
#150
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
jobs: | |
code-style: | |
name: Code Style | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
cache-dependency-path: 'formatting-requirements.txt' | |
- name: Install formatting dependencies | |
id: fmt-deps | |
run: pip install -r formatting-requirements.txt | |
- name: Check code style with `black` | |
run: black --check --diff . | |
- name: Check import order with `isort` | |
run: isort --check --diff . | |
if: success() || steps.fmt-deps.outcome == 'success' | |
linting: | |
name: Linting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
cache-dependency-path: | | |
pyproject.toml | |
probnum/pyproject.toml | |
tests/requirements.txt | |
linting-requirements.txt | |
- name: Install probnum from submodule | |
working-directory: ./probnum | |
# The git fetch is needed because probnum reads its version information from the SCM | |
run: | | |
git fetch --tags --unshallow | |
pip install . | |
- name: Install linting dependencies | |
id: lint-deps | |
run: | | |
pip install ".[plotting]" | |
pip install -r tests/requirements.txt | |
pip install -r linting-requirements.txt | |
- name: Lint code with `pylint` | |
run: pylint src --jobs 0 | |
- name: Lint tests with `pylint` | |
run: pylint tests/**/*.py --disable="redefined-outer-name" | |
if: success() || steps.lint-deps.outcome == 'success' | |
tests: | |
name: Tests | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- '3.10' | |
- '3.11' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: | | |
pyproject.toml | |
probnum/pyproject.toml | |
tests/requirements.txt | |
- name: Install probnum from submodule | |
working-directory: ./probnum | |
# The git fetch is needed because probnum reads its version information from the SCM | |
run: | | |
git fetch --tags --unshallow | |
pip install . | |
- name: Install test dependencies | |
run: | | |
pip install . | |
pip install -r tests/requirements.txt | |
- name: Run tests with `pytest` | |
run: pytest | |
experiments: | |
name: Experiments | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- '3.10' | |
- '3.11' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Set up LaTeX | |
run: | | |
sudo apt-get update | |
sudo apt-get install $(cat probnum/apt.txt) | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: | | |
pyproject.toml | |
probnum/pyproject.toml | |
experiments/requirements.txt | |
.github/workflows/experiment-requirements.txt | |
- name: Install probnum from submodule | |
working-directory: ./probnum | |
# The git fetch is needed because probnum reads its version information from the SCM | |
run: | | |
git fetch --tags --unshallow | |
pip install . | |
- name: Install experiment dependencies | |
run: | | |
pip install . | |
pip install -r experiments/requirements.txt | |
pip install -r .github/workflows/experiment-requirements.txt | |
- name: Run all experiment notebooks with `nbconvert` | |
run: | | |
for file in $(find -wholename "./experiments/*.ipynb") | |
do | |
echo "Running ${file}..." | |
jupyter nbconvert --to notebook --execute --ExecutePreprocessor.kernel_name=python3 $file | |
done |