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

fix pc entry creation for load_collection #155

Merged
merged 5 commits into from
Nov 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Steps when releasing openeo-grassgis-driver:

## 1. Prepare release and version
* Run in terminal
```
ESTIMATED_VERSION=2.5.1

gh api repos/Open-EO/openeo-grassgis-driver/releases/generate-notes -f tag_name="$ESTIMATED_VERSION" -f target_commitish=main -q .body
```
* Go to https://github.com/Open-EO/openeo-grassgis-driver/releases/new
* Copy the output of terminal command to the release description
* Change heading `## What's Changed` to `### Changed`, `### Fixed`, `### Added` or what applicable and sort list amongst these headings.
* 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.
* Check if `ESTIMATED_VERSION` increase still fits - we follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
* Fill in tag and release title with this version
* At the bottom of the release, add
"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.

## 3. Release
* Now you can save the release

## 4. Update changelog
* Run in terminal
```
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"'
```
* 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)
* Push changes in CHANGELOG.rst to main branch
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def create_process_chain_entry(
],
"flags": "g",
}
else:
elif input_object.is_local() is False:
raise Exception("Unsupported datatype")

if importer:
Expand Down Expand Up @@ -356,16 +356,19 @@ def create_process_chain_entry(

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

inputs = [
{"param": "collection", "value": input_object.name},
{"param": "start", "value": temporal_extent[0].split("T")[0]},
{"param": "end", "value": temporal_extent[1].split("T")[0]},
{"param": "output", "value": output_object.grass_name()},
]
if bands:
inputs.append({"param": "bands", "value": (",").join(bands)})

importer = {
"id": "t_in_eoarchive_%i" % rn,
"module": "t.in.eoarchive",
"inputs": [
{"param": "collection", "value": input_object.name()},
{"param": "start", "value": temporal_extent[0].split("T")[0]},
{"param": "end", "value": temporal_extent[1].split("T")[0]},
{"param": "bands", "value": ("', '").join(bands)},
{"param": "output", "value": output_object.grass_name()},
],
"inputs": inputs,
}

pc.append(importer)
Expand All @@ -379,7 +382,7 @@ def create_process_chain_entry(
{"param": "e", "value": str(east)},
{"param": "w", "value": str(west)},
{"param": "crs", "value": str(crs)},
{"param": "strds", "value": input_object.grass_name()},
{"param": "strds", "value": output_object.grass_name()},
],
}

Expand Down