Skip to content

Commit

Permalink
Migrate regression tests' default environment. (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
flamingbear committed May 25, 2023
1 parent 3f60004 commit db5e2fe
Show file tree
Hide file tree
Showing 21 changed files with 26 additions and 25 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ To run the tests:
use the environment.yml of the test to [create the environment with
conda](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-from-an-environment-yml-file)
or you can create the environment with another virtual env, just ensure all of
the requirement from the environment.yml file are installed. (Be careful, This
will always create a conda environment named papermill, so delete any existing
environment before installing from the environment.yml).
the requirement from the environment.yml file are installed. They will create
conda environments named `papermill-<image>`, and you should delete any existing
environment before installing from the environment.yml.

1. Start the jupyter server: `jupyter notebook`.
1. Browse and open the jupyter notebook file for the test. (`<image>_Regression.ipynb`)
1. Update the `harmony_host_url` in the notebook.
Expand All @@ -90,7 +91,7 @@ For example, in the `harmony` directory we have
subdirectory. The `name` field in the file should be `papermill`. For example:

```yaml
name: papermill
name: papermill-<IMAGE>
channels:
- conda-forge
- defaults
Expand Down
4 changes: 2 additions & 2 deletions test/harmony-regression/HarmonyRegression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"\n",
"## Prerequisites\n",
"\n",
" The dependencies for this notebook are listed in the [environment.yaml](./environment.yaml). To test or install locally, create the papermill environment used in the automated regression testing suite: \n",
" The dependencies for this notebook are listed in the [environment.yaml](./environment.yaml). To test or install locally, create the papermill-<IMAGE> environment used in the automated regression testing suite: \n",
"\n",
"`conda env create -f ./environment.yaml && conda activate papermill`\n",
"`conda env create -f ./environment.yaml && conda activate papermill-<IMAGE>`\n",
"\n",
"Also ensure you have a `.netrc` file located in the `test` directory of this repository."
]
Expand Down
2 changes: 1 addition & 1 deletion test/harmony-regression/environment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: papermill
name: papermill-harmony-regression
channels:
- conda-forge
- defaults
Expand Down
2 changes: 1 addition & 1 deletion test/harmony-regression/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.2
0.1.3
2 changes: 1 addition & 1 deletion test/harmony/environment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: papermill
name: papermill-harmony
channels:
- conda-forge
- defaults
Expand Down
2 changes: 1 addition & 1 deletion test/harmony/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.2
0.1.3
2 changes: 1 addition & 1 deletion test/hga/environment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: papermill
name: papermill-hga
channels:
- conda-forge
- defaults
Expand Down
2 changes: 1 addition & 1 deletion test/hga/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.2
0.1.3
2 changes: 1 addition & 1 deletion test/hoss/environment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: papermill
name: papermill-hoss
channels:
- conda-forge
- defaults
Expand Down
2 changes: 1 addition & 1 deletion test/hoss/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.2
0.1.3
2 changes: 1 addition & 1 deletion test/n2z/environment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: papermill
name: papermill-n2z
channels:
- conda-forge
- defaults
Expand Down
2 changes: 1 addition & 1 deletion test/n2z/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.2
0.1.3
2 changes: 1 addition & 1 deletion test/notebook-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# script to act as the entrypoint for running harmony regression tests in their containers.

export PATH=/opt/conda/envs/papermill/bin:$PATH
export PATH=/opt/conda/envs/papermill-${env_sub_dir}/bin:$PATH

/bin/bash /workdir/build-netrc.sh

Expand Down
2 changes: 1 addition & 1 deletion test/regridder/environment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: papermill
name: papermill-regridder
channels:
- conda-forge
- defaults
Expand Down
2 changes: 1 addition & 1 deletion test/regridder/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.2
0.1.3
2 changes: 1 addition & 1 deletion test/swath-projector/environment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: papermill
name: papermill-swath-projector
channels:
- conda-forge
- defaults
Expand Down
2 changes: 1 addition & 1 deletion test/swath-projector/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.2
0.1.3
2 changes: 1 addition & 1 deletion test/trajectory-subsetter/environment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: papermill
name: papermill-trajectory-subsetter
channels:
- conda-forge
- defaults
Expand Down
2 changes: 1 addition & 1 deletion test/trajectory-subsetter/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.2
0.1.3
2 changes: 1 addition & 1 deletion test/variable-subsetter/environment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: papermill
name: papermill-variable-subsetter
channels:
- conda-forge
- defaults
Expand Down
2 changes: 1 addition & 1 deletion test/variable-subsetter/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.2
0.1.3

0 comments on commit db5e2fe

Please sign in to comment.