Extend ACCF relative humidity #993
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
# Run notebook documentation tests from the ground up | |
name: Doc / Notebook tests | |
on: | |
# run on push to main | |
push: | |
branches: | |
- main | |
# run on all PRs | |
pull_request: | |
# Allows run manually from the Actions tab | |
workflow_dispatch: | |
# Run if a release is published | |
workflow_call: | |
# Global variables | |
env: | |
PYCONTRAILS_CACHE_DIR: '${{ github.workspace }}/.doc-test-cache' | |
# disable all permissions at the top level | |
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs | |
permissions: {} | |
# This allows a subsequently queued workflow run to interrupt previous runs | |
concurrency: | |
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' | |
cancel-in-progress: true | |
jobs: | |
doc-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
cache: 'pip' | |
cache-dependency-path: pyproject.toml | |
- name: 'Authenticate to Google Cloud' | |
uses: 'google-github-actions/auth@v2' | |
with: | |
credentials_json: '${{ secrets.GCP_SERVICE_ACCOUNT }}' | |
- name: 'Set up Cloud SDK' | |
uses: 'google-github-actions/setup-gcloud@v2' | |
# put bada files in the default location | |
- name: BADA files | |
run: | | |
mkdir ../bada | |
gcloud storage cp -r gs://contrails-301217-bada/bada/bada3 ${{ github.workspace }}/../bada/ | |
gcloud storage cp -r gs://contrails-301217-bada/bada/bada4 ${{ github.workspace }}/../bada/ | |
# download ERA5 data from pre-cached data on GCP | |
- name: pycontrails cache (ERA5 data) | |
run: | | |
mkdir -p ${{ env.PYCONTRAILS_CACHE_DIR }} | |
gcloud storage cp -r gs://contrails-301217-unit-test/doc-test-cache/* ${{ env.PYCONTRAILS_CACHE_DIR }}/ | |
- name: Install pycontrails (dev) | |
run: make dev-install | |
- name: Install pycontrails-bada extension | |
run: | | |
mkdir -p ~/.ssh/ && ssh-keyscan github.com > ~/.ssh/known_hosts | |
gcloud secrets versions access latest --secret="contrails-301217-github-ssh-key" > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
pip install "pycontrails-bada @ git+ssh://git@github.com/contrailcirrus/pycontrails-bada.git" | |
- name: Test notebooks | |
run: | | |
make nb-test | |
# The doctests require numpy 2.0 or higher | |
- name: Test docstrings | |
run: | | |
pip install "numpy>=2.0" | |
make doctest |