Add collection to ExtensionManagementMixin type params where appropriate#547
Conversation
It isn't necessarily the case that the extensions in question can be applied to collections (in the sense that their fields mean anything on collection properties) but they _can_ show up in summaries (inferred from th presence of `SummariesFooExtension`).
Codecov Report
@@ Coverage Diff @@
## main #547 +/- ##
==========================================
+ Coverage 94.27% 94.33% +0.05%
==========================================
Files 71 71
Lines 10290 10378 +88
Branches 1077 1085 +8
==========================================
+ Hits 9701 9790 +89
+ Misses 420 419 -1
Partials 169 169
Continue to review full report at Codecov.
|
duckontheweb
left a comment
There was a problem hiding this comment.
This looks great, thanks for getting it in!
Originally I was thinking we should add test cases for using add_to and remove_from on Collection instances to make sure it actually works at runtime, but I'm pretty confident that we are covering our bases with the typing. What do you think @jisantuc?
|
How to test was going to be my next question -- conditions are:
? |
Yeah, and: |
duckontheweb
left a comment
There was a problem hiding this comment.
Looks good overall.
I'm curious to get other input on how we handle automatically adding schema URIs to objects when summarizing (see review comment for more detail) before merging.
tests should fail
the add_if_missing params happen not to be necessary all over the test file here, but they make the tests resilient to changes in the test data, which I think is nice
duckontheweb
left a comment
There was a problem hiding this comment.
Awesome, thanks for getting this in!
Related Issue(s): #525
Description: This PR adds
pystac.Collectionto theExtensionManagementMixintype params (via aUnion) for all extensions that provide concrete implementations ofSummariesExtension.PR Checklist:
pre-commit run --all-files)scripts/test)Documentation has been updated to reflect changes, if applicable