Skip to content

Commit 0738025

Browse files
metzmgriembauer
andauthored
fix pc entry creation for load_collection (#155)
* fix pc entry creation for load_collection * add release instructions Co-authored-by: Guido Riembauer <62383722+griembauer@users.noreply.github.com>
1 parent 3556e8f commit 0738025

File tree

2 files changed

+40
-9
lines changed

2 files changed

+40
-9
lines changed

RELEASE.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Steps when releasing openeo-grassgis-driver:
2+
3+
## 1. Prepare release and version
4+
* Run in terminal
5+
```
6+
ESTIMATED_VERSION=2.5.1
7+
8+
gh api repos/Open-EO/openeo-grassgis-driver/releases/generate-notes -f tag_name="$ESTIMATED_VERSION" -f target_commitish=main -q .body
9+
```
10+
* Go to https://github.com/Open-EO/openeo-grassgis-driver/releases/new
11+
* Copy the output of terminal command to the release description
12+
* Change heading `## What's Changed` to `### Changed`, `### Fixed`, `### Added` or what applicable and sort list amongst these headings.
13+
* You can [compare manually](https://github.com/Open-EO/openeo-grassgis-driver/compare/2.5.1...2.5.0) if all changes are included. If changes were pushed directly to main branch, they are not included.
14+
* Check if `ESTIMATED_VERSION` increase still fits - we follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
15+
* Fill in tag and release title with this version
16+
* At the bottom of the release, add
17+
"generated with `gh api repos/Open-EO/openeo-grassgis-driver/releases/generate-notes -f tag_name="$ESTIMATED_VERSION" -f target_commitish=main -q .body`" and replace `$ESTIMATED_VERSION` with the actual version.
18+
19+
## 3. Release
20+
* Now you can save the release
21+
22+
## 4. Update changelog
23+
* Run in terminal
24+
```
25+
curl https://api.github.com/repos/Open-EO/openeo-grassgis-driver/releases/latest | jq -r '. | "## [\(.tag_name)] - \(.published_at | strptime("%Y-%m-%dT%H:%M:%SZ") | strftime("%Y-%m-%d"))\nreleased from \(.target_commitish)\n\(.body) \n"'
26+
```
27+
* Copy the output to the top of the release list in [CHANGELOG.rst](https://github.com/Open-EO/openeo-grassgis-driver/blob/main/CHANGELOG.rst)
28+
* Push changes in CHANGELOG.rst to main branch

src/openeo_grass_gis_driver/actinia_processing/load_collection_process.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def create_process_chain_entry(
286286
],
287287
"flags": "g",
288288
}
289-
else:
289+
elif input_object.is_local() is False:
290290
raise Exception("Unsupported datatype")
291291

292292
if importer:
@@ -356,16 +356,19 @@ def create_process_chain_entry(
356356

357357
# TODO: get root path from link in collection information ?
358358

359+
inputs = [
360+
{"param": "collection", "value": input_object.name},
361+
{"param": "start", "value": temporal_extent[0].split("T")[0]},
362+
{"param": "end", "value": temporal_extent[1].split("T")[0]},
363+
{"param": "output", "value": output_object.grass_name()},
364+
]
365+
if bands:
366+
inputs.append({"param": "bands", "value": (",").join(bands)})
367+
359368
importer = {
360369
"id": "t_in_eoarchive_%i" % rn,
361370
"module": "t.in.eoarchive",
362-
"inputs": [
363-
{"param": "collection", "value": input_object.name()},
364-
{"param": "start", "value": temporal_extent[0].split("T")[0]},
365-
{"param": "end", "value": temporal_extent[1].split("T")[0]},
366-
{"param": "bands", "value": ("', '").join(bands)},
367-
{"param": "output", "value": output_object.grass_name()},
368-
],
371+
"inputs": inputs,
369372
}
370373

371374
pc.append(importer)
@@ -379,7 +382,7 @@ def create_process_chain_entry(
379382
{"param": "e", "value": str(east)},
380383
{"param": "w", "value": str(west)},
381384
{"param": "crs", "value": str(crs)},
382-
{"param": "strds", "value": input_object.grass_name()},
385+
{"param": "strds", "value": output_object.grass_name()},
383386
],
384387
}
385388

0 commit comments

Comments
 (0)