Skip to content

Commit

Permalink
Upgrade harmony-py to v1.0.0 for tests that use shared utilities (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
flamingbear authored Feb 28, 2025
1 parent af4c247 commit 091952a
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 13 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ versioning. Rather than a static releases, this repository contains of a number
of regression tests that are each semi-independent. This CHANGELOG file should be used
to document pull requests to this repository.

## 2025-02-28 ([#142](https://github.com/nasa/harmony-regression-tests/pull/142))

- Upgrade harmony-py to v1.0.0 for all tests that use the shared utilities. These are the nsidc-icesat2, sambah, smap-l2-gridder, subset-band-name and trajectory-subsetter tests.
- Bumps patch versions of each test.
- Adds version.txt to sambah tests.

## 2025-02-28 ([#139](https://github.com/nasa/harmony-regression-tests/pull/139))

- Add missing SAMBAH references to GitHub Actions workflow
Expand Down
2 changes: 1 addition & 1 deletion test/nsidc-icesat2/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ dependencies:
- papermill
- pip
- pip:
- harmony-py==0.4.15
- harmony-py==1.0.0
- xarray==2024.9.0
2 changes: 1 addition & 1 deletion test/nsidc-icesat2/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.7
0.0.8
2 changes: 1 addition & 1 deletion test/sambah/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ dependencies:
- numpy=2.1.3
- netCDF4=1.7.2
- xarray=2024.10.0
- harmony-py=0.4.15
- harmony-py=1.0.0
1 change: 1 addition & 0 deletions test/sambah/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.1
6 changes: 3 additions & 3 deletions test/shared_utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ To include the shared_utils directory on the regression image built by GitHub yo

## Include the necessary python packages in your test's environment.yaml

The test environment is determined by the environment.yaml in the test directory, but if you are using routines from `shared_utils` you will need to also update your test's `environment.yaml` to include the libraries that are imported in the shared modules. That means `harmony-py` to use routines from utilities.py and a recent version of `xarray` for ones from `compare.py`. As always you should look in the files to see if there are new requirements.
The test environment is determined by the environment.yaml in the test directory, but if you are using routines from `shared_utils` you will need to also update your test's `environment.yaml` to include the libraries that are imported in the shared modules. That means `harmony-py` to use routines from utilities.py and a recent version of `xarray` for ones from `compare.py`. As always you should look in the files to see if there are new requirements. Note: the harmony-py library must be >= 1.0.0 to use the shared-utilities.

For example the pip requirements in the nsidc_icesat2 environment file :
```
Expand All @@ -41,8 +41,8 @@ dependencies:
- papermill
- pip
- pip:
- harmony-py==0.4.15
- xarray==2024.9.0
- harmony-py==1.0.0
- xarray==2025.1.2
```

## Using the shared utility routines
Expand Down
2 changes: 1 addition & 1 deletion test/shared_utils/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from shutil import move

from harmony import Client, Request
from harmony.harmony import ProcessingFailedException
from harmony.client import ProcessingFailedException


def print_error(error_string: str) -> str:
Expand Down
2 changes: 1 addition & 1 deletion test/smap-l2-gridder/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ dependencies:
- papermill=2.6.0
- pip
- pip:
- harmony-py==0.4.15
- harmony-py==1.0.0
- xarray==2025.1.2
2 changes: 1 addition & 1 deletion test/smap-l2-gridder/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.3
0.0.4
2 changes: 1 addition & 1 deletion test/subset-band-name/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ dependencies:
- hdf4=4.2.15
- pyhdf=0.11.3
- pip:
- harmony-py==0.4.15
- harmony-py==1.0.0
- xarray==2024.9.0
2 changes: 1 addition & 1 deletion test/subset-band-name/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.2
0.0.3
2 changes: 1 addition & 1 deletion test/trajectory-subsetter/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ dependencies:
- numpy=2.1.2
- netCDF4=1.7.1
- pip:
- harmony-py==0.4.15
- harmony-py==1.0.0
- xarray==2024.9.0
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.8
0.1.9

0 comments on commit 091952a

Please sign in to comment.