Skip to content

Conversation

@tylanderson
Copy link
Contributor

@tylanderson tylanderson commented Jun 2, 2025

Description:

Updates storage extension to v2.0.0. Due to the major changes in v2, I have not attempted to make migrations from v1 to v2

StorageScheme platform property allows templated uri's, so arbitrary additional properties are allowed to be set on StorageScheme objects

PR Checklist:

  • Pre-commit hooks pass (run pre-commit run --all-files)
  • Tests pass (run pytest)
  • 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.

@codecov
Copy link

codecov bot commented Jun 2, 2025

Codecov Report

❌ Patch coverage is 91.54229% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.27%. Comparing base (608972a) to head (8d5e996).

Files with missing lines Patch % Lines
pystac/extensions/storage.py 91.14% 15 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1561      +/-   ##
==========================================
- Coverage   92.29%   92.27%   -0.02%     
==========================================
  Files          55       55              
  Lines        8395     8519     +124     
  Branches      971      984      +13     
==========================================
+ Hits         7748     7861     +113     
- Misses        458      468      +10     
- Partials      189      190       +1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tylanderson tylanderson marked this pull request as ready for review June 24, 2025 21:26
@gadomski gadomski self-requested a review June 25, 2025 15:51
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.

I think we have unnecessary new extensions here ... both schemes and refs can just be classes, not extensions themselves?

class StorageSchemeType(StringEnum):
AWS_S3 = "aws-s3"
CUSTOM_S3 = "custom-s3"
AZURE = "ms-azure"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you also add GCS = "gcp-gs"

Copy link
Contributor

Choose a reason for hiding this comment

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

generally, having parity to the v1 Enum would be great

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't see best practice GCP storage defined here, so did not add as a possible enum here, but as written schemes can be set to any string. I think opening a PR in the extension w/ a suggested schema to use for GCP storage would make sense before implemented here.

@jsignell jsignell linked an issue Dec 5, 2025 that may be closed by this pull request
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.

Storage extension is still on v1.0.0

3 participants