diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml index 5532b6a..df55e84 100644 --- a/.github/workflows/publish_release.yml +++ b/.github/workflows/publish_release.yml @@ -6,7 +6,7 @@ # IF all pre-requisite tests pass, this workflow will build the docker images, # push them to ghcr.io and publish a GitHub release. -name: Publish SMAP L2 Gridding Service +name: Publish Harmony SMAP L2 Gridding Service on: push: @@ -15,7 +15,7 @@ on: workflow_dispatch: env: - IMAGE_NAME: ${{ github.repository }} + IMAGE_NAME: harmony-smap-l2-gridder REGISTRY: ghcr.io jobs: @@ -41,7 +41,7 @@ jobs: fail-fast: false steps: - - name: Checkout harmony-smap-l2-gridding-service repository + - name: Checkout Harmony-SMAP-L2-gridding-service repository uses: actions/checkout@v4 with: lfs: true diff --git a/.github/workflows/run_lib_tests.yml b/.github/workflows/run_lib_tests.yml index 32e7222..6fb6608 100644 --- a/.github/workflows/run_lib_tests.yml +++ b/.github/workflows/run_lib_tests.yml @@ -13,7 +13,7 @@ jobs: python-version: ['3.10', '3.11', '3.12'] steps: - - name: Checkout harmony-smap-l2-gridding-service repository + - name: Checkout Harmony-SMAP-L2-gridding-service repository uses: actions/checkout@v4 with: lfs: true diff --git a/.github/workflows/run_service_tests.yml b/.github/workflows/run_service_tests.yml index 8174097..82c657e 100644 --- a/.github/workflows/run_service_tests.yml +++ b/.github/workflows/run_service_tests.yml @@ -1,8 +1,9 @@ -# This workflow will build the service and test Docker images for harmony-smap-l2-gridding-service, -# then run the `pytest` suite within a test Docker container, reporting -# test results and code coverage as artefacts. It will be called by the -# workflow that run tests against new PRs and as a first step in the workflow -# that publishes new Docker images. +# This workflow will: +# Build the service and test Docker images for Harmony SMAP L2 gridding service. +# Run the `pytest` suite within a test Docker container. +# Report test results and code coverage as artefacts. +# It is called by the workflow that runs tests against new PRs and as a +# first step in the workflow that publishes new Docker images. name: Run Python Service Tests @@ -16,7 +17,7 @@ jobs: fail-fast: false steps: - - name: Checkout harmony-smap-l2-gridding-service repository + - name: Checkout Harmony-SMAP-L2-gridding-service repository uses: actions/checkout@v4 with: lfs: true diff --git a/CHANGELOG.md b/CHANGELOG.md index dfce45c..615e36f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v0.0.3] - 2024-12-04 + +### Changed + +- Docker images are renamed to `harmony-smap-l2-gridder` [#8](https://github.com/nasa/harmony-SMAP-L2-gridding-service/pull/8) + ## [v0.0.2] - 2024-12-03 ### Changed @@ -19,5 +25,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Code and configuration to wrap gridding logic into a Harmony Service [#3](https://github.com/nasa/harmony-SMAP-L2-gridding-service/pull/3 ) - GitHub actions CI configuration [#4](https://github.com/nasa/harmony-SMAP-L2-gridding-service/pull/4 ) +[v0.0.3]: https://github.com/nasa/harmony-SMAP-L2-gridding-service/releases/tag/0.0.3 [v0.0.2]: https://github.com/nasa/harmony-SMAP-L2-gridding-service/releases/tag/0.0.2 [v0.0.1]: https://github.com/nasa/harmony-SMAP-L2-gridding-service/releases/tag/0.0.1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a49d08d..f0cdff5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Contributing to SMAP-L2-Gridding-Service +# Contributing to Harmony-SMAP-L2-Gridding-Service Thanks for contributing! @@ -38,7 +38,7 @@ of the code. ## Disclaimer -SMAP-L2-Gridding-Service maintainers will review all pull requests submitted. Only requests that +Harmony-SMAP-L2-Gridding-Service maintainers will review all pull requests submitted. Only requests that meet the standard of quality set forth by existing code, following the patterns set forth by existing code, and adhering to existing design patterns will be considered and/or accepted. diff --git a/README.md b/README.md index 41db0bb..ab87936 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# SMAP L2 Gridding Service +# Harmony SMAP L2 Gridding Service -This repository contains the code for the SMAP-L2-Gridding-Service, which is a python service that transforms NASA level 2 gridded trajectory data into gridded NetCDF4-CF output files. +This repository contains the code for the Harmony-SMAP-L2-Gridding-Service, which is a python service that transforms NASA level 2 gridded trajectory data into gridded NetCDF4-CF output files. This code currently works on `SPL2SMP_E` data and will be adapted for other SMAP collections of gridded trajectory data. @@ -35,7 +35,7 @@ python -m smap_l2_gridder --input path/to/granule.h5 --output path/to/output_gra └── 📁 tests ``` -* `CHANGELOG.md` - Contains a record of changes applied to each new release of the SMAP-L2-Gridding-Service. +* `CHANGELOG.md` - Contains a record of changes applied to each new release of the Harmony-SMAP-L2-Gridding-Service. * `CONTRIBUTING.md` - Instructions on how to contribute to the repository. * `LICENSE` - Required for distribution under NASA open-source approval. Details conditions for use, reproduction and distribution. * `README.md` - This file, containing guidance on developing the library and service. @@ -106,7 +106,7 @@ pre-commit install ## Versioning -Docker service images for the `smap_l2_gridder` adhere to [semantic +Docker service images for the `harmony-smap-l2-gridder` adhere to [semantic version](https://semver.org/) numbers: major.minor.patch. * Major increments: These are non-backwards compatible API changes. @@ -115,8 +115,8 @@ version](https://semver.org/) numbers: major.minor.patch. ## CI/CD -The CI/CD for SMAP-L2-Gridding-Service is run on github actions with the workflows in the -`.github/workflows` directory: +The CI/CD for Harmony-SMAP-L2-Gridding-Service is run on github actions with +the workflows in the `.github/workflows` directory: * `run_lib_tests.yml` - A reusable workflow that tests the library functions against the supported python versions. @@ -141,7 +141,7 @@ The CI/CD for SMAP-L2-Gridding-Service is run on github actions with the workflo ## Releasing -A release consists of a new Docker image for the harmony-SMAP-L2-gridding-service +A release consists of a new Docker image for the Harmony SMAP L2 gridding service published to github's container repository. A release is made automatically when a commit to the main branch contains a diff --git a/bin/build-image b/bin/build-image index ec098fe..6fcfb17 100755 --- a/bin/build-image +++ b/bin/build-image @@ -1,11 +1,11 @@ #!/bin/bash ############################################################################### # -# Build a Docker image of the HARMONY SMAP L2 Gridding Service +# Build a Docker image of the Harmony SMAP L2 Gridding Service # ############################################################################### -image="ghcr.io/nasa/harmony-smap-l2-gridding-service" +image="ghcr.io/nasa/harmony-smap-l2-gridder" # Retrieve the tag from the script arguments, or default to "latest". Bamboo # will pass the contents of `docker/service_version.txt` as this argument, @@ -14,8 +14,8 @@ image="ghcr.io/nasa/harmony-smap-l2-gridding-service" tag=${1:-latest} -# Remove old versions of: ghcr.io/nasa/harmony-smap-l2-gridding-service and -# ghcr.io/nasa/harmony-smap-l2-gridding-service-test images +# Remove old versions of: ghcr.io/nasa/harmony-smap-l2-gridder and +# ghcr.io/nasa/harmony-smap-l2-gridder-test images ./bin/clean-images # Build the image diff --git a/bin/build-test b/bin/build-test index cf3137d..e62b3b6 100755 --- a/bin/build-test +++ b/bin/build-test @@ -1,15 +1,15 @@ #!/bin/bash ############################################################################### # -# Build a Docker container to run the test suite for the SMAP-L2-Gridding-Service +# Build a Docker container test the Harmony-SMAP-L2-Gridding-Service # -# To build the ghcr.io/nasa/harmony-smap-l2-gridding-service-test image, the -# ghcr.io/nasa/harmony-smap-l2-gridding-service image must also be present +# To build the ghcr.io/nasa/harmony-smap-l2-gridder-test image, the +# ghcr.io/nasa/harmony-smap-l2-gridder image must also be present # locally, as it is used as the base image in `docker/tests.Dockerfile`. # ############################################################################### -image="ghcr.io/nasa/harmony-smap-l2-gridding-service-test" +image="ghcr.io/nasa/harmony-smap-l2-gridder-test" tag=${1:-latest} diff --git a/bin/clean-images b/bin/clean-images index 801cd77..3125892 100755 --- a/bin/clean-images +++ b/bin/clean-images @@ -1,11 +1,9 @@ #!/bin/bash -############################################################################### +################################################################################ # -# remove all images containing the string -# "ghcr.io/nasa/harmony-smap-l2-gridding-service" and remove them. -# This is used for clean-up after development. +# Remove all images containing the string "ghcr.io/nasa/harmony-smap-l2-gridder" # -############################################################################### +################################################################################ remove_image_by_name() { echo "Removing images for: $1" matching_images=$(docker images --filter reference="$1" --format="{{.ID}}") @@ -15,7 +13,7 @@ remove_image_by_name() { fi } -image_base_name="ghcr.io/nasa/harmony-smap-l2-gridding-service" +image_base_name="ghcr.io/nasa/harmony-smap-l2-gridder" # First remove test images: remove_image_by_name "${image_base_name}-test" diff --git a/bin/extract-release-notes.sh b/bin/extract-release-notes.sh index bd61467..cf9c46e 100755 --- a/bin/extract-release-notes.sh +++ b/bin/extract-release-notes.sh @@ -1,10 +1,9 @@ #!/bin/bash -############################################################################### +################################################################################## # -# A bash script to extract only the notes related to the most recent version of -# SMAP L2 Gridding Service from CHANGELOG.md +# Extract release notes for the latest version of Harmony SMAP L2 gridding service # -############################################################################### +################################################################################## CHANGELOG_FILE="CHANGELOG.md" diff --git a/bin/run-test b/bin/run-test index 7fbd1a7..589ed21 100755 --- a/bin/run-test +++ b/bin/run-test @@ -1,7 +1,7 @@ #!/bin/bash ############################################################################### # -# Execute the ghcr.io/nasa/harmony-smap-l2-gridding-service Docker image +# Execute the ghcr.io/nasa/harmony-smap-l2-gridder Docker image # ############################################################################### @@ -21,4 +21,4 @@ mkdir -p reports/coverage docker run --rm \ -v $(pwd)/reports/test-reports:/home/reports/test-reports \ -v $(pwd)/reports/coverage:/home/reports/coverage \ - ghcr.io/nasa/harmony-smap-l2-gridding-service-test "$@" + ghcr.io/nasa/harmony-smap-l2-gridder-test "$@" diff --git a/docker/service.Dockerfile b/docker/service.Dockerfile index bc8f194..5f34089 100644 --- a/docker/service.Dockerfile +++ b/docker/service.Dockerfile @@ -1,12 +1,13 @@ ############################################################################### # -# Service image for ghcr.io/nasa/harmony-smap-l2-gridding-service +# Service image for Harmony SMAP L2 gridding service +# ghcr.io/nasa/harmony-smap-l2-gridder # -# Harmony-SMAP-L2-Gridding-Service backend that transforms L2G (gridded -# trajectory) data into actual gridded data. +# Transforms L2G (gridded trajectory) data into actual gridded data. # -# This image installs dependencies via Pip. The service code is then copied -# into the Docker image. +# This image: +# Installs dependencies via pip. +# Copies the service code into the Docker image. # ############################################################################### FROM python:3.12-slim-bookworm diff --git a/docker/service_version.txt b/docker/service_version.txt index 4e379d2..bcab45a 100644 --- a/docker/service_version.txt +++ b/docker/service_version.txt @@ -1 +1 @@ -0.0.2 +0.0.3 diff --git a/docker/tests.Dockerfile b/docker/tests.Dockerfile index 96f909e..d546250 100644 --- a/docker/tests.Dockerfile +++ b/docker/tests.Dockerfile @@ -1,11 +1,11 @@ ############################################################################### +# Harmony SMAP L2 gridding test image +# +# Built on the main service image to ensure test environment matches production +# environment # -# Test image for the Harmony-SMAP-L2-Gridding-Service. This test image uses the -# main service image as a base layer for the tests. This ensures that the -# contents of the service image are tested, preventing discrepancies between -# the service and test environments. ############################################################################### -FROM ghcr.io/nasa/harmony-smap-l2-gridding-service +FROM ghcr.io/nasa/harmony-smap-l2-gridder # Install additional Pip requirements (for testing) COPY tests/pip_test_requirements.txt . diff --git a/harmony_service/__main__.py b/harmony_service/__main__.py index 4b0d972..f19ebee 100644 --- a/harmony_service/__main__.py +++ b/harmony_service/__main__.py @@ -1,4 +1,4 @@ -"""Run the Harmony-SMAP-L2-Gridding-Service via the Harmony CLI.""" +"""Run the Harmony SMAP L2 gridding service via the Harmony CLI.""" from argparse import ArgumentParser from sys import argv @@ -11,7 +11,9 @@ def main(arguments: list[str]): """Parse command line arguments and invoke the appropriate method.""" - parser = ArgumentParser(prog=SERVICE_NAME, description='Run SMAP L2 Gridder.') + parser = ArgumentParser( + prog=SERVICE_NAME, description='Run Harmony SMAP L2 Gridder.' + ) setup_cli(parser) harmony_arguments, _ = parser.parse_known_args(arguments[1:]) diff --git a/harmony_service/adapter.py b/harmony_service/adapter.py index e3125c7..4e21182 100644 --- a/harmony_service/adapter.py +++ b/harmony_service/adapter.py @@ -1,4 +1,4 @@ -"""`HarmonyAdapter` for SMAP-L2-Gridding-Service. +"""`HarmonyAdapter` for Harmony SMAP L2 gridding service. The class in this file is the top level of abstraction for a service that will accept an input L2G input granule and transform it into a fully gridded diff --git a/harmony_service/exceptions.py b/harmony_service/exceptions.py index ae8badd..9b2f6dc 100644 --- a/harmony_service/exceptions.py +++ b/harmony_service/exceptions.py @@ -1,8 +1,8 @@ -"""Define harmony service errors raised by SMAP-L2-Gridding-Service.""" +"""Define harmony service errors raised by Harmony SMAP L2 gridding service.""" from harmony_service_lib.util import HarmonyException -SERVICE_NAME = 'harmony-smap-l2-gridding-service' +SERVICE_NAME = 'harmony-smap-l2-gridder' class SMAPL2GridderServiceError(HarmonyException): diff --git a/smap_l2_gridder/exceptions.py b/smap_l2_gridder/exceptions.py index 9bfd792..ca941fb 100644 --- a/smap_l2_gridder/exceptions.py +++ b/smap_l2_gridder/exceptions.py @@ -5,7 +5,7 @@ class SMAPL2GridderError(Exception): """Base error class for exceptions raised by smap_l2_gridder library.""" def __init__(self, message=None): - """All Harmony-SMAP-L2-Gridding-Service errors have a message field.""" + """All Harmony SMAP L2 gridding service errors have a message field.""" self.message = message diff --git a/smap_l2_gridder/reference/README.md b/smap_l2_gridder/reference/README.md index 0b1baee..0c753c3 100644 --- a/smap_l2_gridder/reference/README.md +++ b/smap_l2_gridder/reference/README.md @@ -1,6 +1,6 @@ -# Reference files for smap l2 gridder +# Reference files for Harmony SMAP L2 gridding service -These are copies of the gpd files describing the EASE2 grids copied directly from the [maxmaps NSIDC repository](https://github.com/nsidc/mapxmaps). +These are copies of the gpd files describing the EASE2 grids copied directly from the [mapxmaps NSIDC repository](https://github.com/nsidc/mapxmaps). These files are stable and do not change regularly (over 13 years for M09 and N09). Rather than use a gitsubmodule, I have chosen to copy the files to diff --git a/tests/run_tests.sh b/tests/run_tests.sh index 0c29666..4565dde 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -1,8 +1,7 @@ #!/bin/sh ############################################################################### -# # A script invoked by the test Dockerfile to run the Python `unittest` suite -# for the SMAP-L2-Gridding-Service. The script first runs the test suite, +# for the Harmony SMAP L2 Gridding Service. The script first runs the test suite, # then it checks for linting errors. ############################################################################### diff --git a/tests/test_service/test_adapter.py b/tests/test_service/test_adapter.py index 8a3dc81..e33a595 100644 --- a/tests/test_service/test_adapter.py +++ b/tests/test_service/test_adapter.py @@ -1,4 +1,4 @@ -"""End-to-end tests of the SMAP-L2-Gridding-Service.""" +"""End-to-end tests of the Harmony SMAP L2 gridding service.""" import pytest from harmony_service_lib.message import Message as HarmonyMessage