-
Notifications
You must be signed in to change notification settings - Fork 17
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
export as JSON process graph #50
Conversation
Have you tried |
Ah, thanks! But pasting the graph into the web editor and clicking "visual model", I get let graph = JSON.stringify(builder.toJSON(), null, 2)
console.log(graph) Example graph from
|
Yes, on the last node you need to set node.result = true. The client does that automatically for the normal use-cases, but JSON export is not meant to be a best-practice so it's not optimized for that. |
Ok as it is @m-mohr? |
I'll do a review on Monday at the latest, I think some wording should be improved. But don't have the time right now... |
documentation/1.0/cookbook/README.md
Outdated
<template v-slot:r> | ||
|
||
```r | ||
graph <- as(res, "Graph") |
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.
The proposed solution here looks different: Open-EO/openeo-r-client#54
Not sure though what works better.
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.
Thanks! "as Graph" is indeed wrong here. Changed it.
Co-authored-by: Matthias Mohr <[email protected]>
all changes from review have been added. |
Thank you. |
@m-mohr can you add the js part or point me in the right direction?
toJSON
seemed to only export the current process node.