Skip to content
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

Small fixes #9

Merged
merged 8 commits into from
Nov 14, 2020
Merged

Small fixes #9

merged 8 commits into from
Nov 14, 2020

Conversation

lossyrob
Copy link
Member

This PR includes a set of small fixes:

  • Include all Planet item metadata, using 'pl:' for a prefix to any metadata that doesn't map to STAC
  • Fixed bug in stac merge when copying assets
  • Update collection extents when using stac merge
  • Add -h as shortcut for --include-hrefs option in stac describe.
  • Add docs to note that stac copy will migrate the copied STAC to the latest version.

Also refactored the unit tests to make writing CLI test a bit more consistent.

This commit adds any properties that are included in the Planet item
metadata that doesn't map directly to a STAC metadata property. It
will append a "pl:" prefix on these properties and include them in the
STAC Item's properties.
I ran into an instance where I forgot to put 'catch_exceptions=False'
in a new unit test, which ate some time up to debug. Refactor how we
run CLI tests to standardize the way they run to avoid future issues
and make it simpler to write new tests.
The collection should be set on the item_copy, not the original item.
This function was using 'map_items', which makes a copy of the
catalog, and so did not mutate the input catalog. This was
inconsistent with the other functions in the library and could easily
cause confusion.
@codecov-io
Copy link

codecov-io commented Nov 14, 2020

Codecov Report

Merging #9 (62c3535) into master (8d8cd33) will increase coverage by 7.90%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #9      +/-   ##
==========================================
+ Coverage   55.17%   63.07%   +7.90%     
==========================================
  Files          28       28              
  Lines         531      539       +8     
==========================================
+ Hits          293      340      +47     
+ Misses        238      199      -39     
Impacted Files Coverage Δ
stactools_cli/stactools/cli/commands/copy.py 60.86% <ø> (ø)
stactools_cli/stactools/cli/commands/info.py 11.36% <0.00%> (ø)
stactools_core/stactools/core/merge.py 52.00% <83.33%> (+35.33%) ⬆️
stactools_core/stactools/core/copy.py 79.26% <100.00%> (+11.76%) ⬆️
stactools_planet/stactools/planet/constants.py 100.00% <100.00%> (ø)
stactools_planet/stactools/planet/planet_item.py 100.00% <100.00%> (ø)
stactools_cli/stactools/cli/commands/merge.py 86.36% <0.00%> (+63.63%) ⬆️

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 8d8cd33...62c3535. Read the comment docs.

@lossyrob lossyrob merged commit b4fa34c into master Nov 14, 2020
@lossyrob lossyrob deleted the rde/fixes branch November 14, 2020 21:24
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.

2 participants