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]: 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: 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 diff --git a/pyproject.toml b/pyproject.toml index edc9a78..c02aabd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,8 @@ [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" }] +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"