-
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
Deepcopy Collection properties on clone #794
Conversation
Codecov Report
@@ Coverage Diff @@
## main #794 +/- ##
==========================================
+ Coverage 94.57% 94.59% +0.01%
==========================================
Files 79 79
Lines 11660 11690 +30
Branches 1372 1372
==========================================
+ Hits 11028 11058 +30
Misses 453 453
Partials 179 179
Continue to review full report at Codecov.
|
Mypy errors should be fixed now. I've also added a changelog entry. |
Implements `clone` method on Summaries as well.
9345fb4
to
6520bc6
Compare
Rebased the branch on main to make sure the ci uses Python 3.11.0-alpha.7. Hopefully that'll fix the failing tests on 3.11 |
Hi @duckontheweb, @gadomski! now that all the tests are passing, I'd love to get some review 🙂 |
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.
Thanks for this @sunu. I had one comment on whether we really need to deepcopy
the stac_extensions
property. Other than that it looks good to me.
deepcopy() is unnecessary on properties that are only list of strings
Thanks again for the contribution @sunu ! |
Related Issue(s): Fixes #787
Description: Makes sure that all the mutable properties of a
Collection
get deepcopied when the collection is cloned. Implementsclone
onSummaries
to make sure cloned collection will point to a new instance ofSummaries
after being cloned.I have some weird mypy errors from the tests that I added. Still trying to figure out how to fix. I would love some help on that.
PR Checklist:
pre-commit run --all-files
)scripts/test
)