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

Workspaces Updates 1.2.0 #26

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions demos/workspaces/demo-load-data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"\n",
"# Connect to the openEO backend and authenticate with EGI Check-In\n",
"\n",
"connection = openeo.connect(\"https://openeo.eodc.eu/openeo/1.1.0\")\n",
"connection = openeo.connect(\"https://openeo.eodc.eu/openeo/1.2.0\")\n",
"connection = connection.authenticate_oidc(provider_id=\"egi\")"
]
},
Expand Down Expand Up @@ -204,7 +204,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.0"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
10 changes: 5 additions & 5 deletions demos/workspaces/demo-register-user.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"\n",
"# Connect to the openEO backend and authenticate with EGI Check-In\n",
"\n",
"connection = openeo.connect(\"https://openeo.eodc.eu/openeo/1.1.0\")\n",
"connection = openeo.connect(\"https://openeo.eodc.eu/openeo/1.2.0\")\n",
"connection = connection.authenticate_oidc(provider_id=\"egi\")"
]
},
Expand All @@ -43,7 +43,7 @@
"import requests\n",
"\n",
"response = requests.post(\n",
" url=f\"https://openeo.eodc.eu/openeo/1.1.0/user\",\n",
" url=f\"https://openeo.eodc.eu/openeo/1.2.0/user\",\n",
" headers={\n",
" \"authorization\": f\"Bearer {connection.auth.bearer}\"\n",
" },\n",
Expand All @@ -70,7 +70,7 @@
"import requests\n",
"\n",
"response = requests.delete(\n",
" url=f\"https://openeo.eodc.eu/openeo/1.1.0/user\",\n",
" url=f\"https://openeo.eodc.eu/openeo/1.2.0/user\",\n",
" headers={\n",
" \"authorization\": f\"Bearer {connection.auth.bearer}\"\n",
" },\n",
Expand All @@ -97,7 +97,7 @@
"import requests\n",
"\n",
"response = requests.get(\n",
" url=f\"https://openeo.eodc.eu/openeo/1.1.0/user\",\n",
" url=f\"https://openeo.eodc.eu/openeo/1.2.0/user\",\n",
" headers={\n",
" \"authorization\": f\"Bearer {connection.auth.bearer}\"\n",
" },\n",
Expand All @@ -123,7 +123,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.0rc1"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
6 changes: 4 additions & 2 deletions demos/workspaces/demo-register-workspace.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"\n",
"# Connect to the openEO backend and authenticate with EGI Check-In\n",
"\n",
"connection = openeo.connect(\"https://openeo.eodc.eu/openeo/1.1.0\")\n",
"connection = openeo.connect(\"https://openeo.eodc.eu/openeo/1.2.0\")\n",
"connection = connection.authenticate_oidc(provider_id=\"egi\")"
]
},
Expand Down Expand Up @@ -51,6 +51,7 @@
"S3_SECRET_KEY = \"\"\n",
"\n",
"ext_ws = {\n",
" \"title\": WORKSPACE_NAME,\n",
" \"intent\": \"register\",\n",
" \"storage_type\": \"ceph\",\n",
" \"credentials\": {\n",
Expand All @@ -75,6 +76,7 @@
"AZURE_CONNECTION_STRING = \"\"\n",
"\n",
"ext_ws = {\n",
" \"title\": WORKSPACE_NAME,\n",
" \"intent\": \"register\",\n",
" \"storage_type\": \"azure\",\n",
" \"credentials\": {\n",
Expand All @@ -99,7 +101,7 @@
"import requests\n",
"\n",
"response = requests.post(\n",
" url=f\"https://openeo.eodc.eu/openeo/1.1.0/workspace/{WORKSPACE_NAME}/register\",\n",
" url=f\"https://openeo.eodc.eu/openeo/1.2.0/workspaces\",\n",
" json=ext_ws,\n",
" headers={\n",
" \"authorization\": f\"Bearer {connection.auth.bearer}\"\n",
Expand Down
32 changes: 8 additions & 24 deletions demos/workspaces/demo-save-results.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,11 @@
"source": [
"In order to save results from openEO jobs to workspaces, make sure that either your external workspace is registered with the openEO backend (see External Workspace Registration Notebook) or you have provisioned a local workspace.\n",
"\n",
"Then all you need to do, is add the export_to_workspace process after your save_result process in the process graph\n",
"Then all you need to do, is add the export_workspace process after your save_result process in the process graph\n",
"\n",
"arguments: {\"workspace\": WORKSPACE_NAME}"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import openeo\n",
"\n",
"# Set This variable to your workspace's name.\n",
"\n",
"WORKSPACE_NAME = \"\"\n",
"\n",
"# Connect to the openEO backend and authenticate with EGI Check-In\n",
"\n",
"connection = openeo.connect(\"https://openeo.eodc.eu/openeo/1.1.0\")\n",
"connection = connection.authenticate_oidc(provider_id=\"egi\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -57,11 +39,11 @@
"\n",
"# Set This variable to your workspace's name.\n",
"\n",
"WORKSPACE_NAME = \"\"\n",
"WORKSPACE_NAME = \"demo\"\n",
"\n",
"# Connect to the openEO backend and authenticate with EGI Check-In\n",
"\n",
"connection = openeo.connect(\"https://openeo.eodc.eu/openeo/1.1.0\")\n",
"connection = openeo.connect(\"https://openeo.eodc.eu/openeo/1.2.0\")\n",
"connection = connection.authenticate_oidc(provider_id=\"egi\")"
]
},
Expand All @@ -71,6 +53,8 @@
"metadata": {},
"outputs": [],
"source": [
"from openeo.rest.datacube import THIS\n",
"\n",
"collection = connection.load_collection(\n",
" collection_id=\"boa_sentinel_2\",\n",
" spatial_extent={\n",
Expand All @@ -84,8 +68,8 @@
")\n",
"\n",
"result = collection.save_result().process(\n",
" \"export_workspace\", arguments={\"workspace\": WORKSPACE_NAME}\n",
")"
" \"export_workspace\", arguments={\"workspace\": WORKSPACE_NAME, \"merge\": None}, data=THIS\n",
")\n"
]
},
{
Expand Down Expand Up @@ -146,7 +130,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.0rc1"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
6 changes: 3 additions & 3 deletions demos/workspaces/demo-share-workspace.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"\n",
"# Connect to the openEO backend and authenticate with EGI Check-In\n",
"\n",
"connection = openeo.connect(\"https://openeo.eodc.eu/openeo/1.1.0\")\n",
"connection = openeo.connect(\"https://openeo.eodc.eu/openeo/1.2.0\")\n",
"connection = connection.authenticate_oidc(provider_id=\"egi\")"
]
},
Expand All @@ -45,7 +45,7 @@
"SHAREE_USER_ID = \"\"\n",
"\n",
"response = requests.post(\n",
" url=f\"https://openeo.eodc.eu/openeo/1.1.0/workspace/{WORKSPACE_NAME}/share/{SHAREE_USER_ID}\",\n",
" url=f\"https://openeo.eodc.eu/openeo/1.2.0/workspace/{WORKSPACE_NAME}/share/{SHAREE_USER_ID}\",\n",
" headers={\n",
" \"authorization\": f\"Bearer {connection.auth.bearer}\"\n",
" },\n",
Expand Down Expand Up @@ -75,7 +75,7 @@
"SHAREE_USER_ID = \"\"\n",
"\n",
"response = requests.delete(\n",
" url=f\"https://openeo.eodc.eu/openeo/1.1.0/workspace/{WORKSPACE_NAME}/share/{SHAREE_USER_ID}\",\n",
" url=f\"https://openeo.eodc.eu/openeo/1.2.0/workspace/{WORKSPACE_NAME}/share/{SHAREE_USER_ID}\",\n",
" headers={\n",
" \"authorization\": f\"Bearer {connection.auth.bearer}\"\n",
" },\n",
Expand Down
8 changes: 4 additions & 4 deletions demos/workspaces/demo-show-files.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"\n",
"# Connect to the openEO backend and authenticate with EGI Check-In\n",
"\n",
"connection = openeo.connect(\"https://openeo.eodc.eu/openeo/1.1.0\")\n",
"connection = openeo.connect(\"https://openeo.eodc.eu/openeo/1.2.0\")\n",
"connection = connection.authenticate_oidc(provider_id=\"egi\")"
]
},
Expand All @@ -63,7 +63,7 @@
"import requests\n",
"\n",
"response = requests.get(\n",
" url=f\"https://openeo.eodc.eu/openeo/1.1.0/workspace/{WORKSPACE_NAME}/files\",\n",
" url=f\"https://openeo.eodc.eu/openeo/1.2.0/workspaces/{WORKSPACE_NAME}/files\",\n",
" headers={\n",
" \"authorization\": f\"Bearer {connection.auth.bearer}\"\n",
" },\n",
Expand Down Expand Up @@ -104,7 +104,7 @@
"outputs": [],
"source": [
"response = requests.get(\n",
" url=f\"https://openeo.eodc.eu/openeo/1.1.0/workspaces/user\",\n",
" url=f\"https://openeo.eodc.eu/openeo/1.2.0/workspaces/user\",\n",
" headers={\n",
" \"authorization\": f\"Bearer {connection.auth.bearer}\"\n",
" },\n",
Expand Down Expand Up @@ -186,7 +186,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.0"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
6 changes: 3 additions & 3 deletions demos/workspaces/demo-stac-modify.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"\n",
"# Connect to the openEO backend and authenticate with EGI Check-In\n",
"\n",
"connection = openeo.connect(\"https://openeo.eodc.eu/openeo/1.1.0\")\n",
"connection = openeo.connect(\"https://openeo.eodc.eu/openeo/1.2.0\")\n",
"connection = connection.authenticate_oidc(provider_id=\"egi\")"
]
},
Expand All @@ -50,7 +50,7 @@
"source": [
"CHANGES = {\"id\": \"newid\"}\n",
"\n",
"WORKSPACE_NAME = \"test2\""
"WORKSPACE_NAME = \"\""
]
},
{
Expand Down Expand Up @@ -176,7 +176,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.0rc1"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion demos/workspaces/demo-workspace-providers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"import requests\n",
"\n",
"response = requests.get(\n",
" url=f\"https://openeo.eodc.eu/openeo/1.1.0/workspace_providers\",\n",
" url=f\"https://openeo.eodc.eu/openeo/1.2.0/workspace_providers\",\n",
")\n",
"\n",
"\n",
Expand Down
Loading