Add pandas pin to install commands in docs #454
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
name: CI | |
on: | |
push: | |
branches: [main, develop] | |
pull_request: | |
branches: [main, develop] | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
matrix: | |
monet: [cf, dev] | |
fail-fast: false # just until cf versions are working | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python (micromamba) | |
uses: mamba-org/provision-with-micromamba@v15 | |
with: | |
environment-file: docs/environment-docs.yml | |
cache-env: true | |
extra-specs: | | |
pytest | |
- if: ${{ matrix.monet == 'dev' }} | |
name: Install development versions of monet and monetio | |
run: | | |
python -m pip list | grep monet | |
python -m pip install --force-reinstall --no-deps https://github.com/noaa-oar-arl/monetio/archive/develop.zip | |
python -m pip install --force-reinstall --no-deps https://github.com/noaa-oar-arl/monet/archive/develop.zip | |
- name: Versions | |
run: | | |
which python | |
python -m pip list | grep monet | |
micromamba list | grep monet | |
python -c "import monetio; print('monetio.__version__', getattr(monetio, '__version__', '?'))" | |
python -c "import monet; print('monet.__version__', getattr(monet, '__version__', '?'))" | |
- name: pytest | |
run: python -m pytest -v melodies_monet | |
- name: Run docs/examples notebooks as scripts | |
run: | | |
cd docs/examples | |
for f in *.ipynb; do | |
if [ "$f" == 'idealized.ipynb' ]; then | |
jupytext --to py $f -o t.py | |
python t.py | |
fi | |
done | |
cd - | |
- name: Check CLI works | |
run: | | |
cd docs/examples | |
melodies-monet --version | |
python -m melodies_monet --version | |
melodies-monet run control_idealized.yaml | |
cd - | |
docs: | |
name: Check docs build | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python (micromamba) | |
uses: mamba-org/provision-with-micromamba@v15 | |
with: | |
environment-file: docs/environment-docs.yml | |
cache-env: true | |
- 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 | |
- name: Check Sphinx failure log | |
if: ${{ failure() }} | |
run: | | |
if [ -e /tmp/sphinx-err* ]; then | |
for f in /tmp/sphinx-err*; do | |
echo $f | |
cat $f | |
done | |
fi | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check that .py files have the license header | |
run: python3 ci/check-for-license-header.py |