Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to reduce runtime during STAC catalog normalization/saving by avoiding unnecessary blob downloads and by saving release-specific catalog content.
Changes:
- Updated
IStacService.save_catalog(...)(and call sites) to require areleaseargument and save release-specific output. - Introduced
skip_file_downloadonIStacIOService/StacIOServiceand toggled it during catalog saving. - Added (currently active)
cProfileimport inmain.pywith commented profiling invocation.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src/presentation/entrypoints/release_pipeline.py | Passes release to catalog save and toggles skip_file_download during save. |
| src/infra/infrastructure/services/stac_service.py | Reworks catalog save logic to normalize/save a release subtree. |
| src/infra/infrastructure/services/stac_io_service.py | Adds skip_file_download flag plumbing and minor refactor around upload checks. |
| src/application/contracts/stac_service_interface.py | Updates service contract to require release in save_catalog. |
| src/application/contracts/stac_io_service_interface.py | Adds skip_file_download to the STAC IO interface. |
| main.py | Adds cProfile import and leaves a commented profiling line. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several improvements to the STAC catalog handling and release pipeline, focusing on more precise catalog saving for releases, enhanced control over file download behavior, and interface updates to support these changes. The most significant updates are grouped below.
STAC Catalog Saving and Release Handling:
save_catalogmethod in both theIStacServiceinterface and its implementation now requires areleaseparameter, ensuring that catalog saving is release-specific and that only the appropriate release subtree is saved. [1] [2] [3] [4]save_catalogimplementation now clones the catalog, isolates the relevant release, normalizes hrefs, and updates the catalog structure before saving, improving the integrity and organization of release catalogs.File Download Control in STAC IO Service:
skip_file_downloadproperty (with getter and setter) to theIStacIOServiceinterface and itsStacIOServiceimplementation, allowing the pipeline to temporarily disable file downloads during catalog save operations for efficiency. [1] [2] [3]save_catalogfunction in the pipeline now setsskip_file_downloadtoTruebefore saving and resets it toFalseafterward, preventing unnecessary file downloads during the operation.Interface and Dependency Injection Updates:
releaseparameter and theIStacIOServicedependency, ensuring the correct services and parameters are used. [1] [2] [3]Miscellaneous:
cProfileinmain.pyfor profiling support during development. [1] [2]