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

update stac_io from owner root #762

Merged
merged 4 commits into from
Mar 17, 2022

Conversation

KennSmithDS
Copy link
Contributor

Related Issue(s): #742

Description:

Updated edge case for when stac_io is None, owner is not None and instance is not pystac.Catalog. Desired behavior now fetches the root of the owner to update the stac_io of a Link object.

PR Checklist:

  • Code is formatted (run pre-commit run --all-files)
  • Tests pass (run scripts/test)
  • [N/A] 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.

pystac/link.py Outdated Show resolved Hide resolved
Adding @lossyrob suggestion to avoid root link from resolving when it is the root.

Co-authored-by: Rob Emanuele <[email protected]>
@codecov-commenter
Copy link

Codecov Report

Merging #762 (c982679) into main (d70dea5) will decrease coverage by 0.00%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #762      +/-   ##
==========================================
- Coverage   94.55%   94.54%   -0.01%     
==========================================
  Files          79       79              
  Lines       11622    11626       +4     
  Branches     1370     1372       +2     
==========================================
+ Hits        10989    10992       +3     
  Misses        455      455              
- Partials      178      179       +1     
Impacted Files Coverage Δ
pystac/link.py 90.81% <75.00%> (-0.35%) ⬇️

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 d70dea5...c982679. Read the comment docs.

@duckontheweb duckontheweb linked an issue Mar 10, 2022 that may be closed by this pull request
@duckontheweb duckontheweb merged commit bcdf2e7 into stac-utils:main Mar 17, 2022
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.

Use root StacIO in Link.resolve_stac_object when possible
4 participants