-
Notifications
You must be signed in to change notification settings - Fork 8
Test custom job results #512
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
base: master
Are you sure you want to change the base?
Changes from 6 commits
30e3269
a9063cd
009d66f
9bdd0a3
fdcd45a
b6da14b
e7fc9a7
6e93707
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1850,7 +1850,7 @@ def _asset_object( | |
| if filename.endswith(".model"): | ||
| # Machine learning models. | ||
| return result_dict | ||
| bands = asset_metadata.get("bands") | ||
| bands = asset_metadata.get("bands") or asset_metadata.get("eo:bands") | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @soxofaan An issue for CWL here was that the results can be stac1.0, while the code assumed the was 1.1.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For example with bands = asset_metadata.get("bands")
TREAT_JOB_RESULTS_V100_LIKE_V110 = smart_bool(os.environ.get("TREAT_JOB_RESULTS_V100_LIKE_V110", "0"))
if not bands and stac11 and TREAT_JOB_RESULTS_V100_LIKE_V110:
bands = asset_metadata.get("eo:bands")
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as far as I understand, I would just use There is a possible problem however that "bands" and "eo:bands" have subtly different sub-structure: e.g. in "bands" you could find "center_wavelength", while in "eo:bands" you would just have "center_wavelength" (without prefix). But I guess the most (only?) important field is just "name", which is the same in both.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed the conditional, and now only keeps name property |
||
|
|
||
| if bands: | ||
| # TODO: #298 this is a quick stop-gap solution for lack of clear API | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| { | ||
| "assets": { | ||
| "1b442790-2231-4dd1-b9f4-d3550a512cd1_2023-06-06T00:00:00Z_openEO": { | ||
| "bands": [ | ||
| { | ||
| "name": "B04", | ||
| "statistics": { | ||
| "maximum": 1774.0, | ||
| "mean": 380.50094473311, | ||
| "minimum": 171.0, | ||
| "stddev": 176.19790726983, | ||
| "valid_percent": 85.92 | ||
| } | ||
| }, | ||
| { | ||
| "name": "B03", | ||
| "statistics": { | ||
| "maximum": 1470.0, | ||
| "mean": 592.27586206896, | ||
| "minimum": 282.0, | ||
| "stddev": 138.20284171799, | ||
| "valid_percent": 85.92 | ||
| } | ||
| }, | ||
| { | ||
| "name": "B02", | ||
| "statistics": { | ||
| "maximum": 1190.0, | ||
| "mean": 412.22508266415, | ||
| "minimum": 270.0, | ||
| "stddev": 103.22080164099, | ||
| "valid_percent": 85.92 | ||
| } | ||
| } | ||
| ], | ||
| "href": "./openEO_2023-06-06Z.tif", | ||
| "proj:bbox": [ | ||
| 644530.0, | ||
| 5675740.0, | ||
| 645300.0, | ||
| 5676380.0 | ||
| ], | ||
| "proj:code": "EPSG:32631", | ||
| "proj:epsg": 32631, | ||
| "proj:shape": [ | ||
| 64, | ||
| 77 | ||
| ], | ||
| "roles": [ | ||
| "data" | ||
| ], | ||
| "title": "s3://openeo-data-dev-waw4-1/batch_jobs/j-2606111953054049bc2368898439491e/openEO_2023-06-06Z.tif", | ||
| "type": "image/tiff; application=geotiff" | ||
| } | ||
| }, | ||
| "bbox": [ | ||
| 5.069386757303357, | ||
| 51.214543255519786, | ||
| 5.080663210429039, | ||
| 51.22048989375812 | ||
| ], | ||
| "collection": "j-2606111953054049bc2368898439491e", | ||
| "epsg": 32631, | ||
| "geometry": { | ||
| "coordinates": [ | ||
| [ | ||
| [ | ||
| 5.0804038775948115, | ||
| 51.214543255519786 | ||
| ], | ||
| [ | ||
| 5.080663210429039, | ||
| 51.22029444279013 | ||
| ], | ||
| [ | ||
| 5.069644719194295, | ||
| 51.22048989375812 | ||
| ], | ||
| [ | ||
| 5.069386757303357, | ||
| 51.21473866656907 | ||
| ], | ||
| [ | ||
| 5.0804038775948115, | ||
| 51.214543255519786 | ||
| ] | ||
| ] | ||
| ], | ||
| "type": "Polygon" | ||
| }, | ||
| "id": "1b442790-2231-4dd1-b9f4-d3550a512cd1_2023-06-06T00:00:00Z", | ||
| "links": [ | ||
| { | ||
| "href": "./collection.json", | ||
| "rel": "collection", | ||
| "type": "application/json" | ||
| } | ||
| ], | ||
| "properties": { | ||
| "datetime": "2023-06-06T00:00:00Z", | ||
| "proj:code": "EPSG:32631", | ||
| "proj:epsg": 32631 | ||
| }, | ||
| "stac_extensions": [ | ||
| "https://stac-extensions.github.io/eo/v1.1.0/schema.json", | ||
| "https://stac-extensions.github.io/file/v2.1.0/schema.json", | ||
| "https://stac-extensions.github.io/projection/v1.2.0/schema.json" | ||
| ], | ||
| "stac_version": "1.1.0", | ||
| "type": "Feature" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| { | ||
| "assets": { | ||
| "75625346-7e28-433f-9918-8318369ff7ad_2023-06-01T00:00:00Z_openEO": { | ||
| "bands": [ | ||
| { | ||
| "name": "B04", | ||
| "statistics": { | ||
| "maximum": 1766.0, | ||
| "mean": 401.07085498347, | ||
| "minimum": 180.0, | ||
| "stddev": 162.43588375276, | ||
| "valid_percent": 85.92 | ||
| } | ||
| }, | ||
| { | ||
| "name": "B03", | ||
| "statistics": { | ||
| "maximum": 1336.0, | ||
| "mean": 598.11572980633, | ||
| "minimum": 278.0, | ||
| "stddev": 133.74416960473, | ||
| "valid_percent": 85.92 | ||
| } | ||
| }, | ||
| { | ||
| "name": "B02", | ||
| "statistics": { | ||
| "maximum": 1072.0, | ||
| "mean": 368.17264997638, | ||
| "minimum": 216.0, | ||
| "stddev": 99.2670146459, | ||
| "valid_percent": 85.92 | ||
| } | ||
| } | ||
| ], | ||
| "href": "./openEO_2023-06-01Z.tif", | ||
| "proj:bbox": [ | ||
| 644530.0, | ||
| 5675740.0, | ||
| 645300.0, | ||
| 5676380.0 | ||
| ], | ||
| "proj:code": "EPSG:32631", | ||
| "proj:epsg": 32631, | ||
| "proj:shape": [ | ||
| 64, | ||
| 77 | ||
| ], | ||
| "roles": [ | ||
| "data" | ||
| ], | ||
| "title": "s3://openeo-data-dev-waw4-1/batch_jobs/j-2606111953054049bc2368898439491e/openEO_2023-06-01Z.tif", | ||
| "type": "image/tiff; application=geotiff" | ||
| } | ||
| }, | ||
| "bbox": [ | ||
| 5.069386757303357, | ||
| 51.214543255519786, | ||
| 5.080663210429039, | ||
| 51.22048989375812 | ||
| ], | ||
| "collection": "j-2606111953054049bc2368898439491e", | ||
| "epsg": 32631, | ||
| "geometry": { | ||
| "coordinates": [ | ||
| [ | ||
| [ | ||
| 5.0804038775948115, | ||
| 51.214543255519786 | ||
| ], | ||
| [ | ||
| 5.080663210429039, | ||
| 51.22029444279013 | ||
| ], | ||
| [ | ||
| 5.069644719194295, | ||
| 51.22048989375812 | ||
| ], | ||
| [ | ||
| 5.069386757303357, | ||
| 51.21473866656907 | ||
| ], | ||
| [ | ||
| 5.0804038775948115, | ||
| 51.214543255519786 | ||
| ] | ||
| ] | ||
| ], | ||
| "type": "Polygon" | ||
| }, | ||
| "id": "75625346-7e28-433f-9918-8318369ff7ad_2023-06-01T00:00:00Z", | ||
| "links": [ | ||
| { | ||
| "href": "./collection.json", | ||
| "rel": "collection", | ||
| "type": "application/json" | ||
| } | ||
| ], | ||
| "properties": { | ||
| "datetime": "2023-06-01T00:00:00Z", | ||
| "proj:code": "EPSG:32631", | ||
| "proj:epsg": 32631 | ||
| }, | ||
| "stac_extensions": [ | ||
| "https://stac-extensions.github.io/eo/v1.1.0/schema.json", | ||
| "https://stac-extensions.github.io/file/v2.1.0/schema.json", | ||
| "https://stac-extensions.github.io/projection/v1.2.0/schema.json" | ||
| ], | ||
| "stac_version": "1.1.0", | ||
| "type": "Feature" | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.