-
Notifications
You must be signed in to change notification settings - Fork 3
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
add more processing:expression examples for python, docker and generic URI #33
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
URI and Docker should be provided as links with the corresponding relation type.
How would the Python type be resolved?
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 |
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... |
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 |
There was a problem hiding this comment.
Choose a reason for 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.
I don't understand why processing should be limited to Item level? |
yes agree for the asset but the request was at link level. |
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. |
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. |
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. |
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 |
@fmigneault This is probably of interest for you: radiantearth/stac-spec#1284 |
Links per asset is a nice new feature, but I believe the current examples are still relevant and better described using an embedded |
fixes #31