Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release prep v0.6.0 #150

Merged
merged 6 commits into from
Sep 19, 2024
Merged

Release prep v0.6.0 #150

merged 6 commits into from
Sep 19, 2024

Conversation

ircwaves
Copy link
Member

Related Issue(s):

PR Checklist:

  • I have added my changes to the CHANGELOG or a CHANGELOG entry is not required.

@ircwaves ircwaves requested a review from pjhartzell September 18, 2024 16:10
@ircwaves ircwaves self-assigned this Sep 18, 2024
@ircwaves ircwaves requested a review from gadomski September 19, 2024 14:30
pyproject.toml Outdated Show resolved Hide resolved
@ircwaves
Copy link
Member Author

ircwaves commented Sep 19, 2024

FWIW, I think that the move to instance method here presents minimal impact to any existing implementations which upgrade to this release. @gadomski do you think this merits another Migration section like this:

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:

    @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:

    def validate(self) -> bool:
        # Check The Things™
        return isinstance(self._payload, dict)

@gadomski
Copy link
Member

@gadomski do you think this merits another Migration section like this:

Can't hurt, right? :-)

pyproject.toml Outdated Show resolved Hide resolved
@ircwaves ircwaves requested a review from gadomski September 19, 2024 17:55
@ircwaves ircwaves merged commit 436691e into stac-utils:main Sep 19, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants