readme: update MODFLOW paper and report references #2156
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: MODFLOW 6 documentation | |
on: | |
push: | |
paths-ignore: | |
- '.github/workflows/release.yml' | |
- '.hpc/**' | |
pull_request: | |
branches: | |
- master | |
- develop | |
paths-ignore: | |
- '.github/workflows/release.yml' | |
- '.hpc/**' | |
jobs: | |
rtd_build: | |
name: Build ReadTheDocs | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
shell: bash -l {0} | |
env: | |
FC: gfortran | |
FC_V: 12 | |
steps: | |
- name: Checkout modflow6 | |
uses: actions/checkout@v4 | |
with: | |
path: modflow6 | |
- name: Checkout modflow6-examples | |
uses: actions/checkout@v4 | |
with: | |
repository: MODFLOW-USGS/modflow6-examples | |
path: modflow6-examples | |
- name: Checkout usgslatex | |
uses: actions/checkout@v4 | |
with: | |
repository: MODFLOW-USGS/usgslatex | |
path: usgslatex | |
- name: Install Conda environment from environment.yml | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: modflow6/environment.yml | |
cache-environment: true | |
cache-downloads: true | |
- name: Install additional packages for Sphinx using pip | |
working-directory: modflow6/.build_rtd_docs | |
run: pip install -r requirements.rtd.txt | |
- name: Print python package versions | |
run: pip list | |
- name: Install TeX Live | |
run: | | |
sudo apt-get update | |
sudo apt install texlive-latex-extra texlive-science texlive-font-utils | |
- name: Install USGS LaTeX style files and Univers font | |
working-directory: usgslatex/usgsLaTeX | |
run: sudo ./install.sh --all-users | |
- name: Test building files from dfn's for LaTeX | |
working-directory: modflow6/autotest | |
run: pytest -v build_mfio_tex.py | |
- name: Setup ${{ env.FC }} ${{ env.FC_V }} | |
uses: fortran-lang/setup-fortran@v1 | |
with: | |
compiler: gcc | |
version: ${{ env.FC_V }} | |
- name: Cache modflow6 examples | |
id: cache-examples | |
uses: actions/cache@v4 | |
with: | |
path: modflow6-examples/examples | |
key: modflow6-examples-${{ hashFiles('modflow6-examples/scripts/**') }} | |
- name: Install extra Python packages | |
if: steps.cache-examples.outputs.cache-hit != 'true' | |
working-directory: modflow6-examples/etc | |
run: | | |
pip install -r requirements.pip.txt | |
pip install -r requirements.usgs.txt | |
- name: Update FloPy | |
if: steps.cache-examples.outputs.cache-hit != 'true' | |
working-directory: modflow6/autotest | |
run: python update_flopy.py | |
- name: Build example models | |
if: steps.cache-examples.outputs.cache-hit != 'true' | |
working-directory: modflow6-examples/autotest | |
run: | | |
pytest -v -n auto test_scripts.py --init | |
ls -lh ../examples/ | |
- name: Run benchmarks | |
working-directory: modflow6/distribution | |
run: python benchmark.py | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Show benchmarks | |
working-directory: modflow6/distribution | |
run: cat run-time-comparison.md | |
- name: Upload benchmarks | |
uses: actions/upload-artifact@v3 | |
with: | |
name: run-time-comparison | |
path: modflow6/distribution/run-time-comparison.md | |
- name: Collect deprecations | |
working-directory: modflow6/doc/mf6io/mf6ivar | |
run: python deprecations.py | |
- name: Show deprecations | |
working-directory: modflow6/doc/mf6io/mf6ivar/md | |
run: cat deprecations.md | |
- name: Upload deprecations | |
uses: actions/upload-artifact@v3 | |
with: | |
name: deprecations | |
path: modflow6/doc/mf6io/mf6ivar/md/deprecations.md | |
- name: Run sphinx | |
working-directory: modflow6/.build_rtd_docs | |
run: make html | |
- name: Upload results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: rtd-files-for-${{ github.sha }} | |
path: | | |
modflow6/.build_rtd_docs/index.rst | |
modflow6/.build_rtd_docs/mf6io.rst | |
# run-time-comparison is moved to _mf6run by conf.py | |
modflow6/.build_rtd_docs/_mf6run/ | |
modflow6/.build_rtd_docs/_mf6io/ | |
modflow6/.build_rtd_docs/_static/ | |
rtd_trigger: | |
name: rtd-trigger | |
needs: rtd_build | |
runs-on: ubuntu-22.04 | |
if: github.repository_owner == 'MODFLOW-USGS' && github.event_name == 'push' | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Trigger RTDs build on push to repo branches | |
uses: dfm/rtds-action@v1 | |
with: | |
webhook_url: ${{ secrets.MF6_RTDS_WEBHOOK_URL }} | |
webhook_token: ${{ secrets.MF6_RTDS_WEBHOOK_TOKEN }} | |
commit_ref: ${{ github.ref }} | |
doxygen_build: | |
runs-on: ubuntu-22.04 | |
env: | |
working-directory: .build_rtd_docs | |
distribution-directory: distribution | |
common-directory: .github/common | |
branch-name: ${GITHUB_REF##*/} | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Print branch name | |
run: echo ${{env.branch-name}} | |
- name: Install doxygen and graphviz | |
run: | | |
sudo apt-get update | |
sudo apt-get install doxygen graphviz | |
- name: Install Conda environment from environment.yml | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: environment.yml | |
cache-environment: true | |
cache-downloads: true | |
- name: Print python package versions | |
run: pip list | |
- name: update MODFLOW 6 version | |
run: python update_version.py | |
working-directory: ${{env.distribution-directory}} | |
- name: update MODFLOW 6 version in Doxyfile | |
run: | | |
import sys | |
import os | |
sys.path.insert(0, os.path.abspath(os.path.join("..", "doc"))) | |
from version import __version__ | |
print("Update the Doxyfile with the latest version number") | |
with open("Doxyfile", "r") as fp: | |
lines = fp.readlines() | |
tag = "PROJECT_NUMBER" | |
with open("Doxyfile", "w") as fp: | |
for line in lines: | |
if tag in line: | |
line = '{} = "version {}"\n'.format(tag, __version__) | |
fp.write(line) | |
shell: python | |
working-directory: ${{env.working-directory}} | |
- name: run doxygen | |
run: doxygen | |
working-directory: ${{env.working-directory}} | |
- name: upload pages artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: ${{env.working-directory}}/html | |
pages_deploy: | |
if: github.ref == 'refs/heads/develop' && github.event_name == 'push' | |
needs: doxygen_build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v3 |