Skip to content

Fix links in pycontrails-bada install #1009

Fix links in pycontrails-bada install

Fix links in pycontrails-bada install #1009

Workflow file for this run

# 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
# https://cloud.google.com/artifact-registry/docs/python/authentication
- name: Install pycontrails-bada
run: |
pip install keyring keyrings.google-artifactregistry-auth
pip install -U -i https://us-central1-python.pkg.dev/contrails-301217/pycontrails/simple pycontrails-bada
- 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