forked from ufs-community/ufs-srweather-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[develop] Build conda and environments in SRW. (ufs-community#938)
Modifies devbuild.sh to add the option to install miniforge (a version of miniconda that manages channels more strictly) in a user's specified location and defaults to inside the user's clone. It also installs two environments needed for SRW - srw_app, which is similar to the old workflow_tools environment, and srw_graphics, which is sufficient to support the plotting scripts in SRW. If the SRW App is being built for AQM, then another environment, srw_aqm, will also be installed. A few additional details: * Does the conda installation right away so that MacOS users have the necessary bash utilities like readlink to use the devbuild.sh script. * Adds a conda module file that points to the user-installed location of miniconda. * Modifies the GitHub Actions workflows to use the same environments that are built by devbuild.sh. --------- Co-authored-by: Gillian Petro <96886803+gspetro-NOAA@users.noreply.github.com> Co-authored-by: Michael Lueken <63728921+MichaelLueken@users.noreply.github.com> Co-authored-by: Michael Kavulich <kavulich@ucar.edu>
- Loading branch information
1 parent
327b52c
commit eecfbdd
Showing
102 changed files
with
398 additions
and
488 deletions.
There are no files selected for viewing
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Python Tests | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
- 'release/*' | ||
pull_request: | ||
branches: | ||
- develop | ||
- 'release/*' | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
shell: bash -leo pipefail {0} | ||
|
||
jobs: | ||
srw_tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Micromamba and srw_app environment | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-file: environment.yml | ||
environment-name: srw_app | ||
init-shell: bash | ||
cache-downloads: true | ||
cache-environment: true | ||
|
||
- name: Checkout externals | ||
run: | | ||
./manage_externals/checkout_externals ufs-weather-model workflow-tools | ||
- name: Lint the python code | ||
run: | | ||
micromamba activate srw_app | ||
export PYTHONPATH=$(pwd)/ush:$(pwd)/ush/python_utils/workflow-tools:$(pwd)/ush/python_utils/workflow-tools/src | ||
pylint --ignore-imports=yes tests/test_python/ | ||
pylint ush/create_*.py | ||
pylint ush/generate_FV3LAM_wflow.py | ||
- name: Run python unittests | ||
run: | | ||
# exclude test_retrieve_data that is tested in functional test | ||
micromamba activate srw_app | ||
export UNIT_TEST=True | ||
export PYTHONPATH=$(pwd)/ush:$(pwd)/ush/python_utils/workflow-tools:$(pwd)/ush/python_utils/workflow-tools/src | ||
python -m unittest -b tests/test_python/*.py | ||
- name: Run python functional tests | ||
run: | | ||
micromamba activate srw_app | ||
export CI=true | ||
export PYTHONPATH=${PWD}/ush | ||
python3 -m unittest -b tests/test_python/test_retrieve_data.py |
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: srw_aqm | ||
channels: | ||
- conda-forge | ||
- ufs-community | ||
dependencies: | ||
- esmpy | ||
- netcdf4=1.6.* | ||
- numpy=1.23.* | ||
- pylint=2.17* | ||
- pytest=7.2* | ||
- scipy=1.10.* | ||
- uwtools=1.0.0 | ||
- xarray=2022.11.* |
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
Oops, something went wrong.