diff --git a/README.md b/README.md index c0f3d3d..4505510 100644 --- a/README.md +++ b/README.md @@ -29,13 +29,12 @@ interop and upgrades. To work with Harmony, services must: supported way to receive messages, though HTTP is likely to follow. `harmony.cli` provides helpers for setting up CLI parsing while being unobtrusive to non-Harmony CLIs that may also need to exist. -2. Extend `harmony.BaseHarmonyAdapter` and implement the `#invoke` to -adapt the incoming Harmony message to a service call and adapt the service -result to call to one of the adapter's `#completed_with_*` methods. The adapter -class provides helper methods for retrieving data, staging results, and cleaning -up temporary files, though these can be overridden or ignored if a service -needs different behavior, e.g. if it operates on data in situ and does not -want to download the remote file. +2. Extend `harmony.BaseHarmonyAdapter` and either override `#invoke` to process +the message or override `#process_item` to process each individual STAC item +provided in the input STAC catalog. The adapter class provides helper methods +for retrieving data, staging results, and cleaning up temporary files, though +these can be overridden or ignored if a service needs different behavior, e.g. +if it operates on data in situ and does not want to download the remote file. A full example of these two requirements with use of helpers can be found in [example/example_service.py](example/example_service.py). Also see diff --git a/harmony_service_lib/message.py b/harmony_service_lib/message.py index a1e308f..b66720f 100644 --- a/harmony_service_lib/message.py +++ b/harmony_service_lib/message.py @@ -582,9 +582,7 @@ class Message(JsonObject): version : string The semantic version of the Harmony message contained in the provided JSON callback : string - The URL that services must POST to when their execution is complete. Services - should use the `completed_with_*` methods of a Harmony Adapter to perform - callbacks to ensure compatibility, rather than directly using this URL + (Deprecated) The URL that services must POST to when their execution is complete. stagingLocation : string An object store (S3) URL prefix under which services may elect to put their output. Services must have write access to the Harmony staging bucket for the deployed diff --git a/tests/test_cli.py b/tests/test_cli.py index 10b4a20..6545b02 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -28,9 +28,6 @@ def __init__(self, message, catalog=None): def invoke(self): return (self.message, self.result_catalog) - def completed_with_error(self, error): - MockAdapter.errors.append(error) - def cleanup(self): MockAdapter.cleaned_up.append(True)