-
Notifications
You must be signed in to change notification settings - Fork 6
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: added a function to normalize the namespace in case of UDP #57
Conversation
Interesting, thanks. I'll look into this although I think the implementation as is doesn't fully accomplish what you are looking for. I think it should rather check whether something is a URL or not instead of assuming there's always a u: included. |
Thanks for the feeback @m-mohr ! I agree, the code has been refactored a bit to look for URLs that represent shared OpenEO UDPs, such as: |
By the way, this is not fully correct. The process shown is fully correct, it is simply not sharable, which is not defined in openEO yet. It can be run on the back-end for which it was defined though. Please note that loading processes from URLs is not supported in any other openEO JS tooling yet, e.g. process graph parser or Web Editor. |
Co-authored-by: Matthias Mohr <[email protected]>
Co-authored-by: Matthias Mohr <[email protected]>
Co-authored-by: Matthias Mohr <[email protected]>
Thanks for the feedback @m-mohr ! I wasn't aware that this feature is very VITO specific. We worked in the assumption that the Python client and JS client support a same set of features. In Python it is possible to share a UDP in public and use the namespace URL to load in the process: evi = eoconn.datacube_from_process(
"tps_evi",
namespace="https://openeo.vito.be/openeo/1.0/processes/u:marketplace_tps/tps_evi",
date=date,
bbox=bbox
) It is marked as experimental though. |
No, this (sharing) is unspecified and only available at VITO right now. Namespaces are generally available though. As the Python client is also developed by VITO, it also supports the VITO-specific function. JS (and also R) only implement the officially specified functionality (yet). |
Okay, now it looks good. The last things we need here are
|
Within OpenEO it is possible to share processes through UDP. This results in a shareable URL that needs to be defined in the namespace field of the processing graph. For example, below is a processing graph required to execute a service called
tps_evi
that is available in theu:marketplace_tps
namespace.In the current implementation of the OpenEO JavaScript client, you can specify a namespace like
u:marketplace_tps
and get the processes. However, the resulting graph seems to be incorrect:The above processing graph cannot be executed by OpenEO as it is not able to find the process in the
u:marketplace_tps
namespace.With this fix, it is possible to define the full url (e.g. https://openeo.vito.be/openeo/1.0/processes/u:marketplace_tps/tps_evi) as the namespace to be loaded by the OpenEO JavaScript client. It uses the
normalizeNamespace
function to extract the namespace from the URL (if applicable!) in order to get all processes from the OpenEO API.