-
Notifications
You must be signed in to change notification settings - Fork 122
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
Raise exception when extending object that does not have schema URI #450
Raise exception when extending object that does not have schema URI #450
Conversation
Codecov Report
@@ Coverage Diff @@
## main #450 +/- ##
==========================================
+ Coverage 90.80% 91.31% +0.51%
==========================================
Files 40 40
Lines 5120 5204 +84
==========================================
+ Hits 4649 4752 +103
+ Misses 471 452 -19
Continue to review full report at Codecov.
|
Seems straightforward to me, +1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
6604ef1
to
8e8cb56
Compare
Co-authored-by: Pete Gadomski <pete.gadomski@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for taking this on, that is a lot of boilerplate to churn through 🙇🏽.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Yeah, it would be good to look at this at some point to see if we can reduce any of this through inheritance, but I didn't see any easy way here. |
Related Issue(s):
Description:
Introduces a new
ExceptionNotImplemented
exception type and raises this when attempting to extend an object that does not include that extension's schema URI instac_extensions
. See the corresponding issue for discussion of how Assets without an owner are handled.Also adds an
add_if_missing
boolean option to the*Extension.ext
methods that will add the schema URI to the object'sstac_extension
list if it is missing (see this PR comment for original suggestion).PR Checklist:
pre-commit run --all-files
)scripts/test
)