Skip to content

properties -> extra_fields for Asset and Link #510

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 2, 2021

Related Issue(s):

Description:

Adds type annotations for Link and Asset attributes and uses these in API documentation. Changes properties to extra_fields for Link and Asset classes to use more consistent naming across PySTAC classes.

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 review from gadomski and lossyrob July 2, 2021 01:08
@codecov-commenter
Copy link

codecov-commenter commented Jul 2, 2021

Codecov Report

Merging #510 (4b4bc51) into main (a4fe4cd) will increase coverage by 0.00%.
The diff coverage is 97.50%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #510   +/-   ##
=======================================
  Coverage   93.96%   93.97%           
=======================================
  Files          71       71           
  Lines        9991    10000    +9     
  Branches     1061     1059    -2     
=======================================
+ Hits         9388     9397    +9     
  Misses        434      434           
  Partials      169      169           
Impacted Files Coverage Δ
pystac/extensions/item_assets.py 65.85% <ø> (ø)
tests/extensions/test_custom.py 54.83% <0.00%> (ø)
pystac/item.py 93.16% <97.29%> (ø)
pystac/asset.py 87.71% <100.00%> (+0.92%) ⬆️
pystac/extensions/datacube.py 62.26% <100.00%> (ø)
pystac/extensions/eo.py 94.33% <100.00%> (ø)
pystac/extensions/file.py 92.30% <100.00%> (ø)
pystac/extensions/label.py 93.55% <100.00%> (ø)
pystac/extensions/pointcloud.py 95.04% <100.00%> (ø)
pystac/extensions/projection.py 97.60% <100.00%> (ø)
... and 11 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 a4fe4cd...4b4bc51. Read the comment docs.

Copy link
Member

@gadomski gadomski left a comment

Choose a reason for hiding this comment

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

LGTM. The only thing that was initially surprising was the properties attribute on all extensions, but it made sense after reading for a bit (they aren't extra fields, they really are the extension's data).

@duckontheweb
Copy link
Contributor Author

LGTM. The only thing that was initially surprising was the properties attribute on all extensions, but it made sense after reading for a bit (they aren't extra fields, they really are the extension's data).

Yeah, I thought that was too much to take on in this PR, but I agree that is confusing terminology as well. It also interferes with the naming convention in the Label Extension, since that defines a "label: properties" attribute. I can open a separate issue to discuss whether we want to change that.

@duckontheweb duckontheweb merged commit d78d122 into stac-utils:main Jul 7, 2021
@duckontheweb duckontheweb deleted the change/properties-to-extra-fields branch July 7, 2021 20:14
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.

4 participants