Skip to content

Use extension-like API for CommonMetadata #563

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

Merged

Conversation

duckontheweb
Copy link
Contributor

@duckontheweb duckontheweb commented Jul 16, 2021

Related Issue(s):

Description:

  • Moves CommonMetadata and Provider to their own modules
  • Defines equality for Provider objects
  • Changes CommonMetadata to use similar API to PropertyExtension
  • Adds Asset.common_metadata property

TODO:

  • Add tests to bring coverage back up

PR Checklist:

  • Code is formatted (run pre-commit run --all-files)
  • Tests pass (run scripts/test)
  • Documentation has been updated to reflect changes, if applicable
  • This PR maintains or improves overall codebase code coverage.
  • Changes are added to the CHANGELOG. See the docs for information about adding to the changelog.

@duckontheweb duckontheweb requested a review from lossyrob July 16, 2021 20:59
@duckontheweb duckontheweb changed the title Change/gh 481 common metadata Use extension-like API for CommonMetadata Jul 17, 2021
@codecov-commenter
Copy link

codecov-commenter commented Jul 17, 2021

Codecov Report

Merging #563 (5a72a2a) into main (3dff1b6) will decrease coverage by 0.02%.
The diff coverage is 97.20%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #563      +/-   ##
==========================================
- Coverage   94.69%   94.66%   -0.03%     
==========================================
  Files          72       75       +3     
  Lines       10755    10722      -33     
  Branches     1068     1048      -20     
==========================================
- Hits        10184    10150      -34     
- Misses        395      396       +1     
  Partials      176      176              
Impacted Files Coverage Δ
pystac/__init__.py 100.00% <ø> (ø)
pystac/asset.py 90.32% <71.42%> (+2.39%) ⬆️
pystac/provider.py 88.88% <88.88%> (ø)
pystac/common_metadata.py 92.72% <92.72%> (ø)
pystac/collection.py 93.47% <100.00%> (-0.01%) ⬇️
pystac/item.py 90.50% <100.00%> (-2.73%) ⬇️
tests/test_common_metadata.py 100.00% <100.00%> (ø)
tests/test_item.py 100.00% <100.00%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3dff1b6...5a72a2a. Read the comment docs.

@duckontheweb duckontheweb added this to the 1.0.0 milestone Jul 17, 2021
Copy link
Member

@lossyrob lossyrob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A suggestion about TYPE_CHECKING import aliasing but otherwise LGTM

@duckontheweb duckontheweb force-pushed the change/gh-481-common-metadata branch from 0f010ea to aae4617 Compare July 17, 2021 11:50
@duckontheweb duckontheweb force-pushed the change/gh-481-common-metadata branch from aae4617 to 5a72a2a Compare July 17, 2021 11:54
@duckontheweb duckontheweb merged commit f83109c into stac-utils:main Jul 17, 2021
@duckontheweb duckontheweb deleted the change/gh-481-common-metadata branch July 17, 2021 15:57
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.

3 participants