Skip to content

_JobResultDownloader: support "auto_increment" var in path templates - #936

Open
soxofaan wants to merge 1 commit into
masterfrom
issue931-deep-job-result-download
Open

_JobResultDownloader: support "auto_increment" var in path templates#936
soxofaan wants to merge 1 commit into
masterfrom
issue931-deep-job-result-download

Conversation

@soxofaan

@soxofaan soxofaan commented Aug 24, 2026

Copy link
Copy Markdown
Member

add "auto_increment" variable to build stable download filenames, regardless of backend naming approach (e.g. when UUID based naming is in play)

related to #931, eu-cdse/openeo-cdse-infra#1259

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds an auto_increment template variable to _JobResultDownloader path templates to generate deterministic, sequential filenames when downloading job results as a self-contained STAC collection (useful when backend-provided names are unstable or inconsistent).

Changes:

  • Add per-entity-type auto-increment counters and expose {auto_increment} in collection/item/asset/generic-link path template rendering.
  • Add a regression test covering {auto_increment} formatting (including numeric format specs like :02d / :03d) and link rewriting behavior.
  • Bump package version to 0.52.0a5.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
openeo/rest/job.py Introduces auto-increment counters and wires {auto_increment} into path building for collection/items/assets/generic links.
tests/rest/test_job.py Adds test coverage validating deterministic filenames and rewritten hrefs using {auto_increment} templates.
openeo/_version.py Bumps the package version to the next alpha.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread openeo/rest/job.py
Comment on lines 835 to +840
def build_path_collection(self, *, collection_id: str) -> Path:
"""Build path for the root STAC collection metadata file (job results metadata)"""
vars = {
"job_id": _sanitize_filename(self._job.job_id),
"collection_id": _sanitize_filename(collection_id),
"auto_increment": self._auto_increment_id("collection"),
Comment thread openeo/_version.py
@@ -1 +1 @@
__version__ = "0.52.0a4"
__version__ = "0.52.0a5"
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