GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — add more processing:expression examples for python, docker and generic URI by fmigneault · Pull Request #33 · stac-extensions/processing Conversationfixes #31
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
11 of 20 tasks
m-mohr
requested changes
|
|
For python, I could see some combination like the following to be valid: {
"links": [
{
"href": "<uri-to-some-python-script>",
"type": "text/x-python",
"rel": "processing-expression",
"processing:expression": {
"format": "python",
"expresion": "module:func"
}
}
]
}I think it is valid to have either or both the links/field combinations. One big issue about I don't see why there should be a distinction between |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Edit: Updated in #32 Sorry for being ambiguos with regards to the "Python type", I meant how would I know to handle the The difference between the property and the link relation is just whether you can embed it into the JSON or not. openEO is JSON, can be embdedded. gdal-calc/rio-calc is a string, can be embdedded. CWL YAML need to be linked to (unless there's a JSON variant?). I guess you could embed code as a string, but that feels less useful than just linking to a folder or script. The format in the Expression Object is pretty much the equivivalent to the type in the links. So they are pretty much equivalent. Conclusion: It feels like the main issue here is not updating the list of formats, but rather whether the processing:expression is allowed in more places compared to what the Readme tells us... |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I was using a similar consideration to
Yes. YAML and JSON can be used interchangeably for CWL. Examples use YAML for readability and comments insertion, but JSON are part of its spec. They have (approved IANA) media-types as well:
I agree. I think supporting |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I agree with putting more examples as provided as long as it stays in the processing extension at item level.
@fmigneault I think you want to use processing for a larger use case that it was designed for (lineage tracing). I reckon the need for a better handling of processing in general but I am not sure that the processing extension is the right place for that.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I don't understand why processing should be limited to Item level? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
yes agree for the asset but the request was at link level. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
What's the status of this @fmigneault? I didn't quite get the last comments. My general thinking is still that for provenance purposes you can just link to Python scripts and Docker images using the relation type The processing:expression field was for embeddable strings/objects, but you seem to point to external bits so links seem to be the right choice. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
A link with There is also the case of The specification does not need any change. Users are still freely allowed to do what I am proposing. So, my recommendation would be to include the examples to provide guidance, inspiration, and hopefully align methodologies. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I see the point about assets, but on the other hand it would also encourage using these examples in the Item properties although they should be in the links. So I'm not convinved, but also don't have a direct alternative for assets (other than adding a links arrays). I have similar issues in the CEOS ARD extension where the connection between assets and links gets somewhat lost. So maybe this is a more generic question for STAC spec: How to assign additional links to assets? There are three examples in the PR:
I lean towards releasing 1.1 for now and then merge this later once we are more clear on the path forward. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I find links to be relevant for the full Item for navigation or cross-reference purpose with other STAC documents, but describing specific behaviors within the Item or Asset with them always raises some confusing resolution via some intermediate property, such as matching the Asset key with some other property provided in the link. It is just clearer and easier to interpret the source of the processing operation on an Asset when it is directly embedded in the Asset instead of For example, if a URI to an external Python script was provided in For Docker, the issue is that the HTTP reference does not map to the specific URI reference of the For Python, the proposed format is the same used by many libraries to reference a function, such as Whether the processing expression is executable (or how to do so) is not a concern for its STAC representation. Note that examples already provided in the README have exactly the same concern. An |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@fmigneault This is probably of interest for you: radiantearth/stac-spec#1284 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Links per asset is a nice new feature, but I believe the current examples are still relevant and better described using an embedded |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@fmigneault This PR has been open for about 2 years and @m-mohr's "changes requested" review is still unresolved. The main open question was whether URI and Docker examples should go in Could you either:
Thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@emmanuelmathot The entrypoint format is primarily based on https://packaging.python.org/en/latest/specifications/entry-points/ but also takes inspiration from https://docs.pytest.org/en/stable/how-to/usage.html#select-tests in order to specify the full file path, since we do not have the context of which import module/function to invoke without it. I can add these reference and details if desired. I still pursue this. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
ac7700e to
f27e628
Compare
|
@fmigneault, you asked in April which adjustments are necessary, and I did not answer. Sorry for that. This is my answer, and it is a different one from my comment of April 2024. I propose to close this PR and #31. The reason is the scope of
Your per-asset concern is correct, and the current fields answer it: all The If you think that the README must show the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I like the proposals. Since the creation of application with added entrypoint details, it makes more sense to go that way. Should we add a mention of it along the For #31, I don't think we should close it. The fact that an AI is the one doing the transformation is just as important to trace lineage as a simple band math operation. I think it is important to recommend using the right references (i.e.: a MLM definition in this case), because that would provide richer metadata through the STAC extensions, rather than only giving some generic Docker/Git-repo URL representing the unparsable "broad model concept". I wouldn't mind reusing |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Add more example expression objects
There was an error while loading. Please reload this page.