Skip to content

Commit

Permalink
DAS-2255: Re-renames docker images (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
flamingbear authored Dec 4, 2024
1 parent c019441 commit 2381718
Show file tree
Hide file tree
Showing 21 changed files with 68 additions and 61 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -15,7 +15,7 @@ on:
workflow_dispatch:

env:
IMAGE_NAME: ${{ github.repository }}
IMAGE_NAME: harmony-smap-l2-gridder
REGISTRY: ghcr.io

jobs:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_lib_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/run_service_tests.yml
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributing to SMAP-L2-Gridding-Service
# Contributing to Harmony-SMAP-L2-Gridding-Service

Thanks for contributing!

Expand Down Expand Up @@ -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.
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions bin/build-image
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions bin/build-test
Original file line number Diff line number Diff line change
@@ -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}


Expand Down
10 changes: 4 additions & 6 deletions bin/clean-images
Original file line number Diff line number Diff line change
@@ -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}}")
Expand All @@ -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"
Expand Down
7 changes: 3 additions & 4 deletions bin/extract-release-notes.sh
Original file line number Diff line number Diff line change
@@ -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"

Expand Down
4 changes: 2 additions & 2 deletions bin/run-test
Original file line number Diff line number Diff line change
@@ -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
#
###############################################################################

Expand All @@ -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 "$@"
11 changes: 6 additions & 5 deletions docker/service.Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker/service_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.2
0.0.3
10 changes: 5 additions & 5 deletions docker/tests.Dockerfile
Original file line number Diff line number Diff line change
@@ -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 .
Expand Down
6 changes: 4 additions & 2 deletions harmony_service/__main__.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:])
Expand Down
2 changes: 1 addition & 1 deletion harmony_service/adapter.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions harmony_service/exceptions.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
2 changes: 1 addition & 1 deletion smap_l2_gridder/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
4 changes: 2 additions & 2 deletions smap_l2_gridder/reference/README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 1 addition & 2 deletions tests/run_tests.sh
Original file line number Diff line number Diff line change
@@ -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.
###############################################################################

Expand Down
2 changes: 1 addition & 1 deletion tests/test_service/test_adapter.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 2381718

Please sign in to comment.