preping updates to reader #1
This file contains hidden or 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: [stable, develop] | |
| pull_request: | |
| branches: [stable, develop] | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 12 * * 1" | |
| env: | |
| OPENAQ_API_KEY: "${{ secrets.OPENAQ_API_KEY }}" | |
| jobs: | |
| test: | |
| name: Test (Py ${{ matrix.python-version }}, pd ${{ matrix.pandas-version }}) | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'noaa-oar-arl/monetio' | |
| env: | |
| AERONET_TEST_FILE: tests/test_aeronet.py | |
| OPENAQ_WEB_API_TEST_FILES: tests/test_openaq_v2.py tests/test_openaq_v3.py | |
| strategy: | |
| matrix: | |
| include: | |
| - python-version: "3.9" | |
| pandas-version: "1" | |
| - python-version: "3.11" | |
| pandas-version: "1" | |
| - python-version: "3.11" | |
| pandas-version: "2" | |
| - python-version: "3.13" | |
| pandas-version: "2" | |
| - python-version: "3.13" | |
| pandas-version: "3" | |
| fail-fast: false | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python (micromamba) | |
| uses: mamba-org/setup-micromamba@v3 | |
| with: | |
| environment-file: environment-dev.yml | |
| cache-environment: true | |
| create-args: >- | |
| python=${{ matrix.python-version }} | |
| pandas=${{ matrix.pandas-version }} | |
| - name: Install the package (editable) | |
| run: pip install -e . --no-deps -vv | |
| - name: Set test flags | |
| run: | | |
| if [[ "${{ matrix.python-version }}" == "3.11" && "${{ matrix.pandas-version }}" == "2" ]]; then | |
| echo "AERONET_IGNORE=" >> $GITHUB_ENV | |
| echo "OPENAQ_IGNORE=" >> $GITHUB_ENV | |
| else | |
| echo "AERONET_IGNORE=--ignore=${AERONET_TEST_FILE}" >> $GITHUB_ENV | |
| OPENAQ_IGNORE_ARGS="" | |
| for f in $OPENAQ_WEB_API_TEST_FILES; do | |
| OPENAQ_IGNORE_ARGS="$OPENAQ_IGNORE_ARGS --ignore=$f" | |
| done | |
| echo "OPENAQ_IGNORE=${OPENAQ_IGNORE_ARGS}" >> $GITHUB_ENV | |
| fi | |
| - name: Test with pytest (main run) | |
| run: >- | |
| pytest -n auto --dist loadgroup -v -ra $AERONET_IGNORE $OPENAQ_IGNORE | |
| -W "ignore:Downloading test file:UserWarning::" | |
| -W "ignore:API key length is 0:UserWarning::" | |
| - name: Test AERONET non-web | |
| run: | | |
| if [[ -n "$AERONET_IGNORE" ]]; then | |
| pytest -m "not web" -n auto --dist loadgroup -v -ra "$AERONET_TEST_FILE" | |
| fi | |
| - name: Test with pytspack | |
| run: | | |
| if [[ -z "$AERONET_IGNORE" ]]; then | |
| pip install https://github.com/noaa-oar-arl/pytspack/archive/master.zip | |
| pytest -k with_pytspack -n auto -v -ra -W "ignore:API key length is 0:UserWarning::" | |
| fi | |
| docs: | |
| name: Check docs build | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'noaa-oar-arl/monetio' | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python (micromamba) | |
| uses: mamba-org/setup-micromamba@v3 | |
| with: | |
| environment-file: docs/environment-docs.yml | |
| cache-environment: true | |
| - name: Install the package (editable) | |
| run: pip install -e . --no-deps -vv | |
| - name: linkcheck | |
| run: sphinx-build -b linkcheck docs docs/_build/linkcheck | |
| - name: sphinx-build -W | |
| run: sphinx-build -b html -W docs docs/_build/html |