From afe28a4e4873608d2e51661a18509375cbd69eae Mon Sep 17 00:00:00 2001 From: Owen Littlejohns Date: Mon, 30 Sep 2024 11:15:08 -0400 Subject: [PATCH] HARMONY-1781 - Update to harmony-service-lib-py==2.0.0. --- CHANGELOG.md | 10 ++++++++++ docker/service_version.txt | 2 +- harmony_regridding_service/__main__.py | 2 +- harmony_regridding_service/adapter.py | 13 +++++++++---- harmony_regridding_service/exceptions.py | 2 +- harmony_regridding_service/regridding_service.py | 6 +++--- harmony_regridding_service/utilities.py | 4 ++-- pip_requirements.txt | 10 +++++----- tests/pip_test_requirements.txt | 8 ++++---- tests/test_adapter.py | 4 ++-- tests/unit/test_adapter.py | 4 ++-- tests/unit/test_regridding_service.py | 2 +- tests/unit/test_utilities.py | 2 +- tests/utilities.py | 2 +- 14 files changed, 43 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d836094..e02fd8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ The Harmony Regridding Service follows semantic versioning. All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). +## [v1.0.4] - 2024-09-30 + +## Changed +This version of the Harmony Regridding Service updates most dependency versions, +most notably updating to `harmony-service-lib-py==2.0.0`. This is a breaking +change in the package, requiring the renaming of imports in the Harmony +Regridding Service. + ## [v1.0.3] - 2024-09-26 ## Changed @@ -42,6 +50,8 @@ include updated documentation and files outlined by the For more information on internal releases prior to NASA open-source approval, see legacy-CHANGELOG.md. +[v1.0.4]: https://github.com/nasa/harmony-regridding-service/releases/tag/1.0.4 +[v1.0.3]: https://github.com/nasa/harmony-regridding-service/releases/tag/1.0.3 [v1.0.2]: https://github.com/nasa/harmony-regridding-service/releases/tag/1.0.2 [v1.0.1]: https://github.com/nasa/harmony-regridding-service/releases/tag/1.0.1 [v1.0.0]: https://github.com/nasa/harmony-regridding-service/releases/tag/1.0.0 diff --git a/docker/service_version.txt b/docker/service_version.txt index 21e8796..ee90284 100644 --- a/docker/service_version.txt +++ b/docker/service_version.txt @@ -1 +1 @@ -1.0.3 +1.0.4 diff --git a/harmony_regridding_service/__main__.py b/harmony_regridding_service/__main__.py index 958ffb2..7870e48 100644 --- a/harmony_regridding_service/__main__.py +++ b/harmony_regridding_service/__main__.py @@ -4,7 +4,7 @@ from sys import argv from typing import List -from harmony import is_harmony_cli, run_cli, setup_cli +from harmony_service_lib import is_harmony_cli, run_cli, setup_cli from harmony_regridding_service.adapter import RegriddingServiceAdapter diff --git a/harmony_regridding_service/adapter.py b/harmony_regridding_service/adapter.py index 6307e3c..55bb5bc 100644 --- a/harmony_regridding_service/adapter.py +++ b/harmony_regridding_service/adapter.py @@ -11,10 +11,15 @@ from tempfile import mkdtemp from typing import Optional -from harmony import BaseHarmonyAdapter -from harmony.message import Source as HarmonySource -from harmony.message_utility import has_self_consistent_grid -from harmony.util import bbox_to_geometry, download, generate_output_filename, stage +from harmony_service_lib import BaseHarmonyAdapter +from harmony_service_lib.message import Source as HarmonySource +from harmony_service_lib.message_utility import has_self_consistent_grid +from harmony_service_lib.util import ( + bbox_to_geometry, + download, + generate_output_filename, + stage, +) from pystac import Asset, Catalog, Item from harmony_regridding_service.exceptions import ( diff --git a/harmony_regridding_service/exceptions.py b/harmony_regridding_service/exceptions.py index e4ed1e5..f8fcb08 100644 --- a/harmony_regridding_service/exceptions.py +++ b/harmony_regridding_service/exceptions.py @@ -4,7 +4,7 @@ """ -from harmony.util import HarmonyException +from harmony_service_lib.util import HarmonyException class RegridderException(HarmonyException): diff --git a/harmony_regridding_service/regridding_service.py b/harmony_regridding_service/regridding_service.py index efa1fc7..1e134d8 100644 --- a/harmony_regridding_service/regridding_service.py +++ b/harmony_regridding_service/regridding_service.py @@ -19,9 +19,9 @@ from typing import TYPE_CHECKING, Dict, Iterable, List, Set, Tuple import numpy as np -from harmony.message import Message, Source -from harmony.message_utility import has_dimensions -from harmony.util import generate_output_filename +from harmony_service_lib.message import Message, Source +from harmony_service_lib.message_utility import has_dimensions +from harmony_service_lib.util import generate_output_filename from netCDF4 import Dataset, Dimension, Group, Variable from pyresample.ewa import DaskEWAResampler from pyresample.geometry import AreaDefinition, SwathDefinition diff --git a/harmony_regridding_service/utilities.py b/harmony_regridding_service/utilities.py index e437c8c..7cdca8f 100644 --- a/harmony_regridding_service/utilities.py +++ b/harmony_regridding_service/utilities.py @@ -7,8 +7,8 @@ from os.path import splitext from typing import Optional -from harmony.message import Message -from harmony.message_utility import rgetattr +from harmony_service_lib.message import Message +from harmony_service_lib.message_utility import rgetattr from pyproj import CRS from pyproj.exceptions import CRSError diff --git a/pip_requirements.txt b/pip_requirements.txt index 94dcbe3..a5487a5 100644 --- a/pip_requirements.txt +++ b/pip_requirements.txt @@ -1,8 +1,8 @@ # Open source packages available from PyPI +dask ~= 2024.9.1 earthdata-varinfo ~= 3.0.0 -harmony-service-lib ~= 1.1.0 +harmony-service-lib ~= 2.0.0 +netCDF4 ~= 1.6.5 numpy ~= 1.24.2 -netCDF4 ~= 1.6.3 -pyproj ~= 3.4.1 -pyresample ~= 1.26.1 -dask ~= 2023.3.0 +pyproj ~= 3.6.1 +pyresample ~= 1.30.0 diff --git a/tests/pip_test_requirements.txt b/tests/pip_test_requirements.txt index 4b2bb55..be61bff 100644 --- a/tests/pip_test_requirements.txt +++ b/tests/pip_test_requirements.txt @@ -1,5 +1,5 @@ -coverage~=7.2.2 -pre-commit~=3.7.0 -pycodestyle~=2.10.0 -pylint~=2.17.2 +coverage~=7.6.1 +pre-commit~=3.8.0 +pycodestyle~=2.12.1 +pylint~=3.3.1 unittest-xml-reporting~=3.2.0 diff --git a/tests/test_adapter.py b/tests/test_adapter.py index 28de29b..2bab3e0 100644 --- a/tests/test_adapter.py +++ b/tests/test_adapter.py @@ -7,8 +7,8 @@ from unittest import TestCase from unittest.mock import ANY, patch -from harmony.message import Message -from harmony.util import config +from harmony_service_lib.message import Message +from harmony_service_lib.util import config from pystac import Catalog from harmony_regridding_service.adapter import RegriddingServiceAdapter diff --git a/tests/unit/test_adapter.py b/tests/unit/test_adapter.py index 0b9a244..7df7387 100644 --- a/tests/unit/test_adapter.py +++ b/tests/unit/test_adapter.py @@ -1,7 +1,7 @@ from unittest import TestCase -from harmony.message import Message -from harmony.util import HarmonyException, config +from harmony_service_lib.message import Message +from harmony_service_lib.util import HarmonyException, config from harmony_regridding_service.adapter import RegriddingServiceAdapter from harmony_regridding_service.exceptions import ( diff --git a/tests/unit/test_regridding_service.py b/tests/unit/test_regridding_service.py index 139bd53..179d59d 100644 --- a/tests/unit/test_regridding_service.py +++ b/tests/unit/test_regridding_service.py @@ -8,7 +8,7 @@ from uuid import uuid4 import numpy as np -from harmony.message import Message +from harmony_service_lib.message import Message from netCDF4 import Dataset, Variable from numpy.testing import assert_array_equal from pyresample.geometry import AreaDefinition diff --git a/tests/unit/test_utilities.py b/tests/unit/test_utilities.py index 34feb2a..874a2cb 100644 --- a/tests/unit/test_utilities.py +++ b/tests/unit/test_utilities.py @@ -1,6 +1,6 @@ from unittest import TestCase -from harmony.message import Message +from harmony_service_lib.message import Message from harmony_regridding_service.exceptions import InvalidTargetCRS from harmony_regridding_service.utilities import ( diff --git a/tests/utilities.py b/tests/utilities.py index f992283..39f2747 100644 --- a/tests/utilities.py +++ b/tests/utilities.py @@ -3,7 +3,7 @@ from collections import namedtuple from datetime import datetime -from harmony.util import bbox_to_geometry +from harmony_service_lib.util import bbox_to_geometry from pystac import Asset, Catalog, Item Granule = namedtuple('Granule', ['url', 'media_type', 'roles'])