Skip to content

Commit

Permalink
ci: manually run tests with latest AmpForm version (#410)
Browse files Browse the repository at this point in the history
* ci: include doctests in test coverage
* ci: test tensorwaves with latest version of AmpForm
* ci: test notebooks with nbmake on GitHub Actions
* docs: unfold right sidebar unto second level
* fix: remove tf from scipy URL
* fix: remap scipy 1.7.3 to 1.7.1
  https://github.com/ComPWA/tensorwaves/runs/5085332721
  • Loading branch information
redeboer committed Feb 6, 2022
1 parent 90e582a commit 921f7d4
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 3 deletions.
36 changes: 34 additions & 2 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ on:
branches:
- main
- epic/*
workflow_dispatch:
latest-ampform-version:
description: Test against latest version of AmpForm
required: false
type: boolean

jobs:
codecov:
Expand All @@ -28,9 +33,11 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -c .constraints/py${{ matrix.python-version }}.txt -e .[test,all]
pip install .
- name: Install latest version of AmpForm
if: ${{ github.event.inputs.latest-ampform-version }}
run: pip install git+https://github.com/ComPWA/ampform@main
- name: Test with pytest-cov
run: pytest tests -n auto --cov=tensorwaves --cov-report=xml
run: pytest --cov=tensorwaves --cov-report=xml
- uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
Expand Down Expand Up @@ -67,6 +74,9 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -c .constraints/py${{ matrix.python-version }}.txt -e .[test,all]
- name: Install latest version of AmpForm
if: ${{ github.event.inputs.latest-ampform-version }}
run: pip install git+https://github.com/ComPWA/ampform@main
- name: Run unit tests and doctests with pytest
env:
CUDA_VISIBLE_DEVICES: "-1"
Expand All @@ -90,5 +100,27 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -c .constraints/py3.9.txt -e .[test,jax] tox
- name: Install latest version of AmpForm
if: ${{ github.event.inputs.latest-ampform-version }}
run: pip install git+https://github.com/ComPWA/ampform@main
- name: Run unit tests and doctests with pytest
run: tox -e jax

pytest-notebook:
name: Run all notebooks
if: ${{ github.event.inputs.latest-ampform-version }}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -c .constraints/py3.8.txt -e .[doc,test] tox
- name: Install latest version of AmpForm
run: pip install git+https://github.com/ComPWA/ampform@main
- name: Run all notebooks with pytest
run: tox -e nb
4 changes: 3 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ def fetch_logo(url: str, output_path: str) -> None:
"thebelab": True,
},
"show_navbar_depth": 2,
"show_toc_level": 2,
"theme_dev_mode": True,
}
html_title = "TensorWaves"
Expand All @@ -190,6 +191,7 @@ def fetch_logo(url: str, output_path: str) -> None:
# Intersphinx settings
version_remapping = {
"matplotlib": {"3.5.1": "3.5.0"},
"scipy": {"1.7.3": "1.7.1"},
}


Expand Down Expand Up @@ -233,7 +235,7 @@ def get_minor_version(package_name: str) -> str:


__SCIPY_URL = f"https://docs.scipy.org/doc/scipy-{get_version('scipy')}"
r = requests.get(__SCIPY_URL + "/tf")
r = requests.get(__SCIPY_URL)
if r.status_code == 404:
__SCIPY_URL = "https://docs.scipy.org/doc/scipy/reference"

Expand Down

0 comments on commit 921f7d4

Please sign in to comment.