Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ repos:
hooks:
- id: black-jupyter
args: ["--skip-string-normalization"]
language_version: python3.11
language_version: python3.12
4 changes: 4 additions & 0 deletions .snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.25.0
language-settings:
python: "3.12"
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## v1.2.0
### 2025-08-21

This version of HOSS updates the consa environment to support Python 3.12. This also updates the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This version of HOSS updates the consa environment to support Python 3.12. This also updates the
This version of HOSS updates the conda environment to support Python 3.12. This also updates the

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated - 62e8584

dependent packages to their latest supportable versions. Also updates harmony library version.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
dependent packages to their latest supportable versions. Also updates harmony library version.
dependent packages to their latest supportable versions. Also updates Harmony Service Library version.

But that's still not a complete sentence.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated - 62e8584


## v1.1.9
### 2025-08-013
### 2025-08-13

This version of HOSS updates fixes invalid output extents in cases where the
requested bounding area (bbox, shape) extends beyond valid locations for the native
Expand Down
2 changes: 1 addition & 1 deletion conda_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file should contain any requirements installed via Conda
hdf5==1.12.0
hdf5==1.14.6
5 changes: 2 additions & 3 deletions docker/service.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ WORKDIR "/home"
COPY ./conda_requirements.txt conda_requirements.txt

# Create Conda environment
RUN conda create -y --name hoss --file conda_requirements.txt python=3.11 -q \
--channel conda-forge \
--override-channels
RUN conda config --remove channels defaults
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is overkill since you have --override-channels on the next command, but it doesn't hurt I guess.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed it -62e8584

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need the RUN conda config --remove channels defaults if you are creating a new instance of a docker image?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no. I think it is there to remove any old ones

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed it - 62e8584

RUN conda create -y --name hoss --file conda_requirements.txt python=3.12 -q --channel conda-forge --override-channels

# Copy additional Pip dependencies into the container
COPY ./pip_requirements.txt pip_requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion docker/service_version.txt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no changes to the functionality of the service, this should be a patch version probably?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated it - bd2f805

Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.9
1.2.0
2 changes: 1 addition & 1 deletion hoss/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from argparse import ArgumentParser
from sys import argv

from harmony import is_harmony_cli, run_cli, setup_cli
from harmony_service_lib import is_harmony_cli, run_cli, setup_cli

from hoss.adapter import HossAdapter

Expand Down
6 changes: 3 additions & 3 deletions hoss/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
import shutil
from tempfile import mkdtemp

from harmony import BaseHarmonyAdapter
from harmony.message import Source
from harmony.util import HarmonyException, generate_output_filename, stage
from harmony_service_lib import BaseHarmonyAdapter
from harmony_service_lib.message import Source
from harmony_service_lib.util import HarmonyException, generate_output_filename, stage
from pystac import Asset, Item

from hoss.dimension_utilities import is_index_subset
Expand Down
4 changes: 2 additions & 2 deletions hoss/bbox_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
from typing import Dict, List, Optional, Tuple, Union

import numpy as np
from harmony.message import Message
from harmony.util import Config, download
from harmony_service_lib.message import Message
from harmony_service_lib.util import Config, download

from hoss.exceptions import InvalidInputGeoJSON, UnsupportedShapeFileFormat

Expand Down
6 changes: 3 additions & 3 deletions hoss/dimension_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
from typing import Dict, Set, Tuple

import numpy as np
from harmony.message import Message
from harmony.message_utility import rgetattr
from harmony.util import Config
from harmony_service_lib.message import Message
from harmony_service_lib.message_utility import rgetattr
from harmony_service_lib.util import Config
from netCDF4 import Dataset
from numpy.ma.core import MaskedArray
from varinfo import VariableFromDmr, VarInfoFromDmr
Expand Down
2 changes: 1 addition & 1 deletion hoss/spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

from typing import List, Set

from harmony.message import Message
from harmony_service_lib.message import Message
from netCDF4 import Dataset
from numpy.ma.core import MaskedArray
from varinfo import VariableFromDmr, VarInfoFromDmr
Expand Down
8 changes: 4 additions & 4 deletions hoss/subset.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
from logging import Logger
from typing import List, Set

from harmony.message import Message, Source
from harmony.message import Variable as HarmonyVariable
from harmony.message_utility import rgetattr
from harmony.util import Config
from harmony_service_lib.message import Message, Source
from harmony_service_lib.message import Variable as HarmonyVariable
from harmony_service_lib.message_utility import rgetattr
from harmony_service_lib.util import Config
from netCDF4 import Dataset
from numpy.ma import masked
from varinfo import VarInfoFromDmr
Expand Down
2 changes: 1 addition & 1 deletion hoss/temporal.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from typing import List, Set

from dateutil.parser import parse as parse_datetime
from harmony.message import Message
from harmony_service_lib.message import Message
from netCDF4 import Dataset
from varinfo import VarInfoFromDmr

Expand Down
6 changes: 3 additions & 3 deletions hoss/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
from urllib.parse import quote
from uuid import uuid4

from harmony.exceptions import ForbiddenException, ServerException
from harmony.util import Config
from harmony.util import download as util_download
from harmony_service_lib.exceptions import ForbiddenException, ServerException
from harmony_service_lib.util import Config
from harmony_service_lib.util import download as util_download

from hoss.exceptions import UrlAccessFailed

Expand Down
12 changes: 6 additions & 6 deletions pip_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# This file should contain requirements to be installed via Pip.
# Open source packages available from PyPI
earthdata-varinfo ~= 3.0.1
harmony-service-lib ~= 1.0.25
netCDF4 ~= 1.6.4
numpy ~= 1.24.2
pyproj ~= 3.6.1
shapely ~= 2.0.1
earthdata-varinfo ~= 3.1.0
harmony-service-lib ~= 2.7.0
netCDF4 ~= 1.7.2
numpy ~= 2.2.6
pyproj ~= 3.7.1
shapely ~= 2.1.1
9 changes: 5 additions & 4 deletions tests/pip_test_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
coverage~=7.2.2
pre-commit~=3.7.0
pycodestyle~=2.10.0
pylint~=2.17.2
coverage~=7.9.2
pre-commit~=4.2.0
pycodestyle~=2.14.0
pylint ~= 3.3.7
astroid ~= 3.3.10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you need to add asteroid? seems like we don't import it anywhere and you can build and run the tests without it explicitly added here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought I needed it. will recheck.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed it. - 62e8584

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I notice that astroid is now listed in pip_test_requirements as an explicit dependency. I think we could remove it and allow pylint to handle it unless there is a specific need for it that I'm not aware of.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will recheck.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed it - 62e8584

unittest-xml-reporting~=3.2.0
4 changes: 2 additions & 2 deletions tests/test_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from unittest import TestCase
from unittest.mock import ANY, Mock, call, patch

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 netCDF4 import Dataset
from numpy.testing import assert_array_equal
from pystac import Catalog
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,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 hoss.adapter import HossAdapter
from hoss.bbox_utilities import BBox
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_bbox_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
from unittest import TestCase
from unittest.mock import 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 hoss.bbox_utilities import (
BBox,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_coordinate_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from unittest.mock import ANY, patch

import numpy as np
from harmony.util import config
from harmony_service_lib.util import config
from netCDF4 import Dataset
from numpy.testing import assert_array_equal
from pyproj import CRS
Expand Down
16 changes: 8 additions & 8 deletions tests/unit/test_dimension_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from unittest.mock import ANY, patch

import numpy as np
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 netCDF4 import Dataset
from numpy.ma import masked_array
from numpy.testing import assert_array_equal
Expand Down Expand Up @@ -148,7 +148,7 @@ def test_get_dimension_index_range(self, mock_get_indices_from_values):
get_dimension_index_range(
self.ascending_dimension, requested_min_value, requested_max_value
)
mock_get_indices_from_values.called_once_with(
mock_get_indices_from_values.assert_called_once_with(
self.ascending_dimension, requested_min_value, requested_max_value
)
mock_get_indices_from_values.reset_mock()
Expand All @@ -157,7 +157,7 @@ def test_get_dimension_index_range(self, mock_get_indices_from_values):
get_dimension_index_range(
self.ascending_dimension, requested_min_value, None
)
mock_get_indices_from_values.called_once_with(
mock_get_indices_from_values.assert_called_once_with(
self.ascending_dimension,
requested_min_value,
self.ascending_dimension[:][-1],
Expand All @@ -168,7 +168,7 @@ def test_get_dimension_index_range(self, mock_get_indices_from_values):
get_dimension_index_range(
self.ascending_dimension, None, requested_max_value
)
mock_get_indices_from_values.called_once_with(
mock_get_indices_from_values.assert_called_once_with(
self.ascending_dimension,
self.ascending_dimension[:][0],
requested_max_value,
Expand All @@ -179,7 +179,7 @@ def test_get_dimension_index_range(self, mock_get_indices_from_values):
get_dimension_index_range(
self.descending_dimension, requested_min_value, requested_max_value
)
mock_get_indices_from_values.called_once_with(
mock_get_indices_from_values.assert_called_once_with(
self.descending_dimension, requested_max_value, requested_min_value
)
mock_get_indices_from_values.reset_mock()
Expand All @@ -188,7 +188,7 @@ def test_get_dimension_index_range(self, mock_get_indices_from_values):
get_dimension_index_range(
self.descending_dimension, requested_min_value, None
)
mock_get_indices_from_values.called_once_with(
mock_get_indices_from_values.assert_called_once_with(
self.descending_dimension,
self.descending_dimension[:][0],
requested_min_value,
Expand All @@ -199,7 +199,7 @@ def test_get_dimension_index_range(self, mock_get_indices_from_values):
get_dimension_index_range(
self.descending_dimension, None, requested_max_value
)
mock_get_indices_from_values.called_once_with(
mock_get_indices_from_values.assert_called_once_with(
self.descending_dimension,
requested_max_value,
self.descending_dimension[:][-1],
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from unittest.mock import ANY, call, patch

import numpy as np
from harmony.message import Message
from harmony_service_lib.message import Message
from netCDF4 import Dataset
from numpy.testing import assert_array_equal
from pyproj import CRS
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_subset.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from unittest.mock import call, patch

import numpy as np
from harmony.message import Message, Source
from harmony.message import Variable as HarmonyVariable
from harmony.util import config
from harmony_service_lib.message import Message, Source
from harmony_service_lib.message import Variable as HarmonyVariable
from harmony_service_lib.util import config
from netCDF4 import Dataset
from varinfo import VarInfoFromDmr

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_temporal.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from unittest.mock import ANY, patch

import numpy as np
from harmony.message import Message
from harmony_service_lib.message import Message
from netCDF4 import Dataset
from numpy.testing import assert_array_equal
from varinfo import VarInfoFromDmr
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from unittest import TestCase
from unittest.mock import Mock, patch

from harmony.exceptions import ForbiddenException, ServerException
from harmony.util import config
from harmony_service_lib.exceptions import ForbiddenException, ServerException
from harmony_service_lib.util import config

from hoss.exceptions import UrlAccessFailed
from hoss.utilities import (
Expand Down
2 changes: 1 addition & 1 deletion tests/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import List
from unittest.mock import MagicMock

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'])
Expand Down