Skip to content
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

Code sample in R not working for services in namespace #297

Open
JanssenBrm opened this issue Jan 26, 2023 · 2 comments
Open

Code sample in R not working for services in namespace #297

JanssenBrm opened this issue Jan 26, 2023 · 2 comments
Labels
bug Something isn't working upstream

Comments

@JanssenBrm
Copy link
Contributor

One of our openEO users is using the R client to execute processes. To get started she used the code samples from the openEO Web Editor to execute the following code:

# Import required packages
library(openeo)

# Connect to the back-end
connection = connect(host = "https://openeo.vito.be")
# ToDo: Authentication with login()

p = processes()

yieldpotentialmap_terrascope = p$yieldpotentialmap_terrascope(exclude_months = list(1, 2, 3, 4, 9, 10, 11, 12), exclude_croptypes = list(), polygon = list("type" = "Polygon", "coordinates" = list(list(list(5.170037117570351, 51.250525073249634), list(5.170958174465619, 51.248676084148144), list(5.178569920451582, 51.24674196960879), list(5.179155939642469, 51.24986101801744), list(5.170037117570351, 51.250525073249634)))), date = list("2022-01-01T00:00:00Z", "2022-12-31T00:00:00Z"), namespace = "NULL")

# The process can be executed synchronously (see below), as a batch job or as a web service now
result = compute_result(graph = yieldpotentialmap_terrascope)

She also included the login step and successfully authenticated with EGI Checkin. However, as shown in the screenshot below, the yieldpotentialmap_terrascope is not available. Maybe something is missing to also load in the processes of a specific namespace?

image

I'm not sure whether this is an error on the web client or something that is not yet supported in the R client. Feel free to close the issue if I should open this in the R client repo.

@m-mohr
Copy link
Member

m-mohr commented Jan 26, 2023

Found and fixed a bug in the code generation, but I also think that namespaced processes may not be supported by R yet. So I'm throwing an error explaining that namespaced processes are not supported by R.
See also Open-EO/openeo-r-client#143

@m-mohr m-mohr added bug Something isn't working upstream labels Jan 26, 2023
@JanssenBrm
Copy link
Contributor Author

In case it is still relevant, the following graph was used:

{
  "process_graph": {
    "yieldpotentialmap_terrascope": {
      "process_id": "yieldpotentialmap_terrascope",
      "namespace": "vito",
      "arguments": {
        "exclude_months": [
          1,
          2,
          3,
          4,
          9,
          10,
          11,
          12
        ],
        "exclude_croptypes": [],
        "polygon": {
          "type": "Polygon",
          "coordinates": [
            [
              [
                5.170037117570351,
                51.250525073249634
              ],
              [
                5.170958174465619,
                51.248676084148144
              ],
              [
                5.178569920451582,
                51.24674196960879
              ],
              [
                5.179155939642469,
                51.24986101801744
              ],
              [
                5.170037117570351,
                51.250525073249634
              ]
            ]
          ]
        },
        "date": [
          "2022-01-01T00:00:00Z",
          "2022-12-31T00:00:00Z"
        ]
      },
      "result": true
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream
Projects
None yet
Development

No branches or pull requests

2 participants