From ec361046d3ffc6376cfbec9362a63464ebe6917b Mon Sep 17 00:00:00 2001 From: Ian Cooke Date: Wed, 18 Sep 2024 11:56:12 -0400 Subject: [PATCH 1/6] update CHANGELOG.md --- CHANGELOG.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c89b477..5c6cdb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +5,12 @@ 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/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [0.6.0] ### ⚠️ Breaking Change -- ([#147](https://github.com/stac-utils/stac-task/pull/147)) Moved `Task.validate` from class method to instance method, availing +- ([#147](https://github.com/stac-utils/stac-task/pull/147)) Moved + `Task.validate` from class method to instance method, availing implementers of other instance convenience methods (i.e. `self.parameters`). ## [0.5.1] - 2024-05-23 @@ -118,7 +119,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. Initial release. -[unreleased]: +[unreleased]: +[0.6.0]: [0.5.1]: [0.5.0]: [v0.4.2]: From 3e86c46050b9041d177041ededfd52aaeea80a4f Mon Sep 17 00:00:00 2001 From: Ian Cooke Date: Wed, 18 Sep 2024 11:57:45 -0400 Subject: [PATCH 2/6] update docs/source/conf.py --- docs/source/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 3be7656..9f706bc 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -12,8 +12,8 @@ project = "STAC Task" copyright = "2021, Element 84, Inc." -release = "0.5" -version = "0.5.1" +release = "0.6" +version = "0.6.0" # -- General configuration From a0ff0a359a2d6fdeb5d695ccd3f700beda65d9fd Mon Sep 17 00:00:00 2001 From: Ian Cooke Date: Wed, 18 Sep 2024 11:59:01 -0400 Subject: [PATCH 3/6] update version string in pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index edc9a78..6d4c7ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "stactask" -version = "0.5.1" +version = "0.6.0" authors = [{ name = "Matthew Hanson", email = "matt.a.hanson@gmail.com" }] maintainers = [{ name = "Pete Gadomski", email = "pete.gadomski@gmail.com" }] description = "Class interface for running custom algorithms and workflows on STAC Items" From 90f9eee8ddfb788f339a4bf8dbb3a15b80b035ae Mon Sep 17 00:00:00 2001 From: Ian Cooke Date: Thu, 19 Sep 2024 10:49:55 -0400 Subject: [PATCH 4/6] update maintainer per PGad req --- pyproject.toml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6d4c7ec..fe8b8b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,11 @@ [project] name = "stactask" version = "0.6.0" -authors = [{ name = "Matthew Hanson", email = "matt.a.hanson@gmail.com" }] -maintainers = [{ name = "Pete Gadomski", email = "pete.gadomski@gmail.com" }] +authors = [ + { name = "Matthew Hanson", email = "matt.a.hanson@gmail.com" }, + { name = "Pete Gadomski", email = "pete.gadomski@gmail.com" }, +] +maintainers = [{ name = "Ian Cooke", email = "ircwaves@gmail.com" }] description = "Class interface for running custom algorithms and workflows on STAC Items" readme = "README.md" requires-python = ">=3.9" From 7ef2a99d2c9052fe4cebed7831b7bb8718087721 Mon Sep 17 00:00:00 2001 From: Ian Cooke Date: Thu, 19 Sep 2024 10:54:07 -0400 Subject: [PATCH 5/6] add migration doc section to readme --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 31525af..5cee28e 100644 --- a/README.md +++ b/README.md @@ -242,6 +242,32 @@ Migration of these various parameters to `DownloadConfig` are as follows: - `absolute_path`: none. To create or retrieve the Asset hrefs as absolute paths, use either `Item#make_all_asset_hrefs_absolute()` or `Asset#get_absolute_href()` +### 0.5.x -> 0.6.0 + +Previously, the `validate` method was a _classmethod_, validating the payload +argument passed. This has now been made an instance method, which validates +the `self._payload` copy of the payload, from which the `Task` instance is +constructed. This is behaviorally the same, in that construction will fail if +validation fails, but allows implementers to utilize the instance method's +convenience functions. + +Previous implementations of `validate` would have been similar to this: + +```python + @classmethod + def validate(payload: dict[str, Any]) -> bool: + # Check The Things™ + return isinstance(payload, dict) +``` + +And will now need to be updated to this form: + +```python + def validate(self) -> bool: + # Check The Things™ + return isinstance(self._payload, dict) +``` + ## Development Clone, install in editable mode with development requirements, and install the **pre-commit** hooks: From 0c4e4128b64aad578975c643ab65ed62ff225e89 Mon Sep 17 00:00:00 2001 From: Ian Cooke Date: Thu, 19 Sep 2024 13:02:23 -0400 Subject: [PATCH 6/6] pete claims non-authorship --- pyproject.toml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index fe8b8b0..c02aabd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,7 @@ [project] name = "stactask" version = "0.6.0" -authors = [ - { name = "Matthew Hanson", email = "matt.a.hanson@gmail.com" }, - { name = "Pete Gadomski", email = "pete.gadomski@gmail.com" }, -] +authors = [{ name = "Matthew Hanson", email = "matt.a.hanson@gmail.com" }] maintainers = [{ name = "Ian Cooke", email = "ircwaves@gmail.com" }] description = "Class interface for running custom algorithms and workflows on STAC Items" readme = "README.md"