Skip to content

Soiling algorithm updates Quyen's branch #554

Soiling algorithm updates Quyen's branch

Soiling algorithm updates Quyen's branch #554

Workflow file for this run

name: nbval
on: [pull_request]
jobs:
notebook-check:
runs-on: ubuntu-latest
strategy:
fail-fast: false # don't cancel other matrix jobs when one fails
matrix:
notebook-file: [
'TrendAnalysis_example.ipynb',
'TrendAnalysis_example_NSRDB.ipynb',
'degradation_and_soiling_example.ipynb',
'system_availability_example.ipynb'
]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install notebook environment
run: |
python -m pip install --upgrade pip wheel
pip install --timeout=300 -r requirements.txt -r docs/notebook_requirements.txt .[test]
- name: Run notebook and check output
run: |
# --sanitize-with: pre-process text to remove irrelevant differences (e.g. warning filepaths)
pytest --nbval --sanitize-with docs/nbval_sanitization_rules.cfg docs/${{ matrix.notebook-file }}
- name: Run notebooks again, save files
run: |
pip install nbconvert[webpdf]
mkdir docs/artifacts
jupyter nbconvert --to html --execute --ExecutePreprocessor.timeout=600 --allow-errors --output artifacts/${{ matrix.notebook-file }}.html docs/${{ matrix.notebook-file }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: executed_notebook_${{ matrix.notebook-file }}
path: docs/artifacts