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

Remove urlpath dependency and update relative path logic #602

Merged
merged 8 commits into from
May 16, 2024

Conversation

Ariana-B
Copy link
Contributor

@Ariana-B Ariana-B commented Mar 4, 2024

Copy link

codecov bot commented Mar 4, 2024

Codecov Report

Attention: Patch coverage is 96.96970% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 76.68%. Comparing base (ec63f09) to head (dfca9fd).
Report is 2 commits behind head on develop.

❗ Current head dfca9fd differs from pull request most recent head e76b68c. Consider uploading reports for the commit e76b68c to get more accurate results

Files Patch % Lines
apps/dc_tools/odc/apps/dc_tools/stac_api_to_dc.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #602      +/-   ##
===========================================
- Coverage    76.71%   76.68%   -0.04%     
===========================================
  Files           41       41              
  Lines         2998     2959      -39     
===========================================
- Hits          2300     2269      -31     
+ Misses         698      690       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@SpacemanPaul SpacemanPaul left a comment

Choose a reason for hiding this comment

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

Approved with minor comment.

(Oh, and bump the version number while you're at it, and I'll do a release once merged.)

return asset_href

self_path = urlparse(self_link).path
href_path = urlparse(asset_href).path
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems unlikely, but for completeness, I think we should be explicitly checking that both self_link and asset_href have the same scheme and netloc (and keeping as an absolute link if they differ).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe we could refrain from checking scheme, but check for some degree of similarity between the netloc values?

@Ariana-B Ariana-B merged commit 7ecf829 into develop May 16, 2024
7 checks passed
@Ariana-B Ariana-B deleted the replace_urlpath branch May 16, 2024 00:55
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