From 1a655cf564667071a762e03e15bafed31a5e60a7 Mon Sep 17 00:00:00 2001 From: Drew Meyers Date: Tue, 17 Sep 2024 17:00:25 -0700 Subject: [PATCH 1/7] feat: conform more closely to OGC Processes API spec --- libs/unity-py/notebooks/ogc_notebook.ipynb | 475 +++++------------- .../unity_sds_client/resources/job.py | 17 +- .../unity_sds_client/resources/process.py | 31 +- .../services/process_service.py | 18 +- .../README.md | 78 +-- 5 files changed, 194 insertions(+), 425 deletions(-) diff --git a/libs/unity-py/notebooks/ogc_notebook.ipynb b/libs/unity-py/notebooks/ogc_notebook.ipynb index d10f0a5..54ec734 100644 --- a/libs/unity-py/notebooks/ogc_notebook.ipynb +++ b/libs/unity-py/notebooks/ogc_notebook.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": null, + "execution_count": 76, "id": "700eddd2-77af-4849-8343-3f0fef34ff73", "metadata": { "is_executing": true @@ -18,15 +18,24 @@ "from unity_sds_client.unity import Unity\n", "from unity_sds_client.unity_services import UnityServices\n", "from unity_sds_client.resources.job_status import JobStatus\n", - "from unity_sds_client.unity import UnityEnvironments\n" + "from unity_sds_client.unity import UnityEnvironments" ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 77, "id": "4029cee7-9c5b-4ac1-bd54-45fb45be9397", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdin", + "output_type": "stream", + "text": [ + "Please enter your Unity username: drewm\n", + "Please enter your Unity password: ········\n" + ] + } + ], "source": [ "unity = Unity(UnityEnvironments.DEV)\n", "unity.set_venue_id(\"\")\n", @@ -35,17 +44,17 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 78, "id": "9d9f712d-6d80-4b27-a8dc-b12e3895ba59", "metadata": {}, "outputs": [], "source": [ - "process_service.endpoint = \"http://k8s-airflow-ogcproce-944e409e1d-1354034359.us-west-2.elb.amazonaws.com:5001\"" + "process_service.endpoint = \"http://k8s-sps-ogcproce-b59e4702b8-1327377322.us-west-2.elb.amazonaws.com:5001\"" ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 79, "id": "865f0b16-c954-45a9-984a-953be93749a3", "metadata": {}, "outputs": [], @@ -55,7 +64,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 80, "id": "199331bb-0414-4846-a61a-0b43b1142924", "metadata": {}, "outputs": [ @@ -64,24 +73,10 @@ "output_type": "stream", "text": [ "unity_sds_client.resources.Process(\n", - " id=\"cwltool_help_dag\",\n", + " id=\"cwl_dag\",\n", " process_version=\"1.0.0\"\n", - " title=\"Echo Process\",\n", - " abstract=\"This process accepts and number of input and simple echoes each input as an output.\",\n", - " keywords=\"None\"\n", - ")\n", - "unity_sds_client.resources.Process(\n", - " id=\"kubernetes_tasks_with_affinity\",\n", - " process_version=\"1.0.0\"\n", - " title=\"Karpenter Taks with Affinity\",\n", - " abstract=\"This process tests karpenter.\",\n", - " keywords=\"None\"\n", - ")\n", - "unity_sds_client.resources.Process(\n", - " id=\"hello_world\",\n", - " process_version=\"1.0.0\"\n", - " title=\"Echo Process\",\n", - " abstract=\"This process accepts and number of input and simple echoes each input as an output.\",\n", + " title=\"Generic CWL Process\",\n", + " abstract=\"This process executes any CWL workflow.\",\n", " keywords=\"None\"\n", ")\n" ] @@ -94,17 +89,17 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 81, "id": "399a8c39-a69b-49a8-b9b1-03de6b3bc62f", "metadata": {}, "outputs": [], "source": [ - "process = process_service.get_process(\"hello_world\")" + "process = process_service.get_process(\"cwl_dag\")" ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 82, "id": "04dee225-aea0-4132-b427-dbd26085986e", "metadata": {}, "outputs": [ @@ -113,10 +108,10 @@ "output_type": "stream", "text": [ "unity_sds_client.resources.Process(\n", - " id=\"hello_world\",\n", + " id=\"cwl_dag\",\n", " process_version=\"1.0.0\"\n", - " title=\"Echo Process\",\n", - " abstract=\"This process accepts and number of input and simple echoes each input as an output.\",\n", + " title=\"Generic CWL Process\",\n", + " abstract=\"This process executes any CWL workflow.\",\n", " keywords=\"None\"\n", ")\n" ] @@ -128,87 +123,88 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 73, "id": "667f1082-9ce1-473d-8e8e-f96deb974dab", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "String Literal Input Example\n", - "Numerical Value with UOM Example\n", - "Date Literal Input Example\n", - "Bounded Double Literal Input Example\n", - "Array Input Example\n", - "Complex Object Input Example\n", - "Geometry input\n", - "Bounding Box Input Example\n", - "Inline Images Value Input\n", - "Feature Collection Input Example.\n" - ] - } - ], + "outputs": [], "source": [ - "for i in process.inputs:\n", - " inputs = i.to_dict()\n", - " for k in inputs.keys():\n", - " print(inputs[k]['title'])" + "# import pprint\n", + "# for key, value in process.inputs.items():\n", + "# print(key)\n", + "# pprint.pprint(value.model_dump())" ] }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 83, "id": "4057003a-ccec-4321-8c12-404d7ff1275a", "metadata": {}, "outputs": [], "source": [ "# Here we submit the job. Currently we submit a dictionary with the required 'inputs', 'outputs','subcscriber' keys if needed\n", "# We need to focus on building out the process_inputs progrmatically.\n", - "submitted_job = process.execute({})" + "\n", + "data = {\n", + " \"inputs\": {\n", + " \"cwl_workflow\": \"https://raw.githubusercontent.com/unity-sds/unity-sps-workflows/main/demos/echo_message.cwl\",\n", + " \"cwl_args\": \"https://raw.githubusercontent.com/unity-sds/unity-sps-workflows/main/demos/echo_message.yaml\",\n", + " \"request_memory\": \"8Gi\",\n", + " \"request_cpu\": \"4\",\n", + " \"request_storage\": \"10Gi\"\n", + " },\n", + " \"outputs\": {\n", + " \"result\": {\n", + " \"transmissionMode\": \"reference\"\n", + " }\n", + " }\n", + "}\n", + "\n", + "submitted_job = process.execute(data)" ] }, { "cell_type": "code", - "execution_count": 10, - "id": "e93fdfcc-9e97-418f-bfb5-c9b159b80ee9", + "execution_count": 84, + "id": "f08adb26-822e-4e01-8ec1-fbb4eb58bd26", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "unity_sds_client.resources.Job(\n", - " id=\"ba3b31bd-3ae9-4be5-a195-0a56d88cfb4e\",\n", - " process=\"hello_world\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n" - ] - } - ], + "outputs": [], "source": [ - "print(submitted_job)" + "data = {\n", + " \"inputs\": {\n", + " \"cwl_workflow\": \"https://raw.githubusercontent.com/unity-sds/sbg-workflows/main/preprocess/sbg-preprocess-workflow.cwl\",\n", + " \"cwl_args\": \"https://raw.githubusercontent.com/unity-sds/sbg-workflows/main/preprocess/sbg-preprocess-workflow.dev.yml\",\n", + " \"request_memory\": \"8Gi\",\n", + " \"request_cpu\": \"4\",\n", + " \"request_storage\": \"10Gi\"\n", + " },\n", + " \"outputs\": {\n", + " \"result\": {\n", + " \"transmissionMode\": \"reference\"\n", + " }\n", + " }\n", + "}\n", + "\n", + "submitted_job = process.execute(data)" ] }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 23, "id": "a18a5727-750c-4307-b77c-7389d4ccc0f4", - "metadata": {}, + "metadata": { + "scrolled": true + }, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "job ba3b31bd-3ae9-4be5-a195-0a56d88cfb4e is not complete. Currently in state JobStatus.ACCEPTED \n", - "job ba3b31bd-3ae9-4be5-a195-0a56d88cfb4e is not complete. Currently in state JobStatus.RUNNING \n", - "job ba3b31bd-3ae9-4be5-a195-0a56d88cfb4e is not complete. Currently in state JobStatus.RUNNING \n", - "job ba3b31bd-3ae9-4be5-a195-0a56d88cfb4e is not complete. Currently in state JobStatus.RUNNING \n", - "job ba3b31bd-3ae9-4be5-a195-0a56d88cfb4e is not complete. Currently in state JobStatus.RUNNING \n", - "job ba3b31bd-3ae9-4be5-a195-0a56d88cfb4e is not complete. Currently in state JobStatus.RUNNING \n", - "job ba3b31bd-3ae9-4be5-a195-0a56d88cfb4e is not complete. Currently in state JobStatus.RUNNING \n", - "Job ba3b31bd-3ae9-4be5-a195-0a56d88cfb4e completed with status JobStatus.SUCCESSFUL\n" + "ename": "AttributeError", + "evalue": "'Execute200ResponseInput' object has no attribute 'get_status'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[23], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mtime\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m status \u001b[38;5;241m=\u001b[39m \u001b[43msubmitted_job\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget_status\u001b[49m()\u001b[38;5;241m.\u001b[39mstatus\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01mwhile\u001b[39;00m status \u001b[38;5;129;01min\u001b[39;00m [JobStatus\u001b[38;5;241m.\u001b[39mACCEPTED, JobStatus\u001b[38;5;241m.\u001b[39mRUNNING]:\n\u001b[1;32m 5\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mjob \u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m is not complete. Currently in state \u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m \u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mformat(submitted_job\u001b[38;5;241m.\u001b[39mid, submitted_job\u001b[38;5;241m.\u001b[39mget_status()\u001b[38;5;241m.\u001b[39mstatus))\n", + "File \u001b[0;32m~/.virtualenvs/unity-monorepo/lib/python3.12/site-packages/pydantic/main.py:853\u001b[0m, in \u001b[0;36mBaseModel.__getattr__\u001b[0;34m(self, item)\u001b[0m\n\u001b[1;32m 850\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28msuper\u001b[39m()\u001b[38;5;241m.\u001b[39m\u001b[38;5;21m__getattribute__\u001b[39m(item) \u001b[38;5;66;03m# Raises AttributeError if appropriate\u001b[39;00m\n\u001b[1;32m 851\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 852\u001b[0m \u001b[38;5;66;03m# this is the current error\u001b[39;00m\n\u001b[0;32m--> 853\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mAttributeError\u001b[39;00m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00m\u001b[38;5;28mtype\u001b[39m(\u001b[38;5;28mself\u001b[39m)\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m\u001b[38;5;132;01m!r}\u001b[39;00m\u001b[38;5;124m object has no attribute \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mitem\u001b[38;5;132;01m!r}\u001b[39;00m\u001b[38;5;124m'\u001b[39m)\n", + "\u001b[0;31mAttributeError\u001b[0m: 'Execute200ResponseInput' object has no attribute 'get_status'" ] } ], @@ -221,27 +217,26 @@ " time.sleep(5)\n", " status = submitted_job.get_status().status\n", "\n", - "print(\"Job {} completed with status {}\".format(submitted_job.id, str(submitted_job.get_status().status)))\n", - "\n", - "\n", - " " + "print(\"Job {} completed with status {}\".format(submitted_job.id, str(submitted_job.get_status().status)))" ] }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 24, "id": "ce1ae133-4a84-434e-b0b9-defbab57af9a", "metadata": {}, "outputs": [ { - "data": { - "text/plain": [ - "[]" - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" + "ename": "AttributeError", + "evalue": "'Execute200ResponseInput' object has no attribute 'get_result'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[24], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43msubmitted_job\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget_result\u001b[49m()\n", + "File \u001b[0;32m~/.virtualenvs/unity-monorepo/lib/python3.12/site-packages/pydantic/main.py:853\u001b[0m, in \u001b[0;36mBaseModel.__getattr__\u001b[0;34m(self, item)\u001b[0m\n\u001b[1;32m 850\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28msuper\u001b[39m()\u001b[38;5;241m.\u001b[39m\u001b[38;5;21m__getattribute__\u001b[39m(item) \u001b[38;5;66;03m# Raises AttributeError if appropriate\u001b[39;00m\n\u001b[1;32m 851\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 852\u001b[0m \u001b[38;5;66;03m# this is the current error\u001b[39;00m\n\u001b[0;32m--> 853\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mAttributeError\u001b[39;00m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00m\u001b[38;5;28mtype\u001b[39m(\u001b[38;5;28mself\u001b[39m)\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m\u001b[38;5;132;01m!r}\u001b[39;00m\u001b[38;5;124m object has no attribute \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mitem\u001b[38;5;132;01m!r}\u001b[39;00m\u001b[38;5;124m'\u001b[39m)\n", + "\u001b[0;31mAttributeError\u001b[0m: 'Execute200ResponseInput' object has no attribute 'get_result'" + ] } ], "source": [ @@ -250,20 +245,20 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 25, "id": "2875c57c-7383-4977-8cc0-b4d1ae14653d", "metadata": {}, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "unity_sds_client.resources.Job(\n", - " id=\"ba3b31bd-3ae9-4be5-a195-0a56d88cfb4e\",\n", - " process=\"hello_world\",\n", - " status=\"dismissed\",\n", - " inputs=None\n", - ")\n" + "ename": "AttributeError", + "evalue": "'Execute200ResponseInput' object has no attribute 'dismiss'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[25], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m status \u001b[38;5;241m=\u001b[39m \u001b[43msubmitted_job\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdismiss\u001b[49m()\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28mprint\u001b[39m(status)\n", + "File \u001b[0;32m~/.virtualenvs/unity-monorepo/lib/python3.12/site-packages/pydantic/main.py:853\u001b[0m, in \u001b[0;36mBaseModel.__getattr__\u001b[0;34m(self, item)\u001b[0m\n\u001b[1;32m 850\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28msuper\u001b[39m()\u001b[38;5;241m.\u001b[39m\u001b[38;5;21m__getattribute__\u001b[39m(item) \u001b[38;5;66;03m# Raises AttributeError if appropriate\u001b[39;00m\n\u001b[1;32m 851\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 852\u001b[0m \u001b[38;5;66;03m# this is the current error\u001b[39;00m\n\u001b[0;32m--> 853\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mAttributeError\u001b[39;00m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00m\u001b[38;5;28mtype\u001b[39m(\u001b[38;5;28mself\u001b[39m)\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m\u001b[38;5;132;01m!r}\u001b[39;00m\u001b[38;5;124m object has no attribute \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mitem\u001b[38;5;132;01m!r}\u001b[39;00m\u001b[38;5;124m'\u001b[39m)\n", + "\u001b[0;31mAttributeError\u001b[0m: 'Execute200ResponseInput' object has no attribute 'dismiss'" ] } ], @@ -274,7 +269,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 55, "id": "ae823803-05cf-420f-a8de-dd88157f7bfe", "metadata": {}, "outputs": [], @@ -284,7 +279,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 56, "id": "af2caec6-f393-433f-86ba-24b178bdef12", "metadata": {}, "outputs": [ @@ -293,262 +288,22 @@ "output_type": "stream", "text": [ "unity_sds_client.resources.Job(\n", - " id=\"66ba8e7b-58a7-468a-ac6b-26d2a8401ce6\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"afffe7b3-91e8-40c2-9c50-8e953cccf420\",\n", - " process=\"None\",\n", + " id=\"52c99990-51f1-4e69-84a0-8e9ff30e3269\",\n", + " process=\"cwl_dag\",\n", " status=\"accepted\",\n", " inputs=None\n", ")\n", "unity_sds_client.resources.Job(\n", - " id=\"c41fc3db-e2f5-4697-a14c-5ed63bfa3084\",\n", - " process=\"None\",\n", + " id=\"b525ef73-cac7-415a-8fcc-eabc4a25ffda\",\n", + " process=\"cwl_dag\",\n", " status=\"accepted\",\n", " inputs=None\n", ")\n", "unity_sds_client.resources.Job(\n", - " id=\"20b5ef42-fcdb-4456-b052-4451587d007c\",\n", - " process=\"None\",\n", + " id=\"88b18803-fc3e-4335-a11c-30cfae53bff8\",\n", + " process=\"cwl_dag\",\n", " status=\"accepted\",\n", " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"a0730f61-9b8a-47f2-9aae-8529199d2db3\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"36a208ff-4011-41cd-be9e-6081bc08342d\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"36b9f9b1-1b34-462c-8640-a4a40932be96\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"0af3db76-0b5e-46dc-a6b4-a648734c73d1\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"9a48308e-f96e-438a-93e0-56d374dc509b\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"e9224e92-1bf8-4a44-aa12-dbed0e96ce8d\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"42989408-d3cf-4e60-97d5-b996bb064221\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"6f71ad5b-a49f-426b-9bf4-121b8c827e70\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"0c2eeaf4-afc1-47db-b8f7-7477f506b47b\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"67ba84f5-7d4f-4217-8b51-fb00d3a9db1a\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"1755a7fb-2744-4806-b836-199638fcb7df\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"4f7d3fde-da34-4085-8fd4-29f1d4050761\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"6f49be56-6b56-48c0-bce8-b3b9c7449e11\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"98bfadf8-9d51-495f-93d2-3db6f6b6e658\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"d9dec7ca-7c9a-45bd-9618-c9c1392a01ae\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"970ee360-fbdd-42d6-b66e-d6c763a78327\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"00ab43e9-2ab3-4920-b848-63e7c2234859\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"3ad68632-9778-460b-92d0-d73178324882\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"c47a35e0-999f-443e-a62d-9fa8f955e073\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"3675b680-2538-4a89-b4e9-adf40711b370\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"8534b3a9-ab74-4bd9-a9d7-b85a1b4a1f39\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"5060e542-517b-4058-9ea7-f3722e115ca1\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"da9b10c5-adf0-4e06-aa13-95011e8734cd\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"0252c49f-b83e-4189-9a11-8854eee6d7d2\",\n", - " process=\"None\",\n", - " status=\"successful\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"f7144172-b7ec-4c45-9ac8-3a911c9a1f85\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"b085f603-93f1-485b-b1a2-1268b93dab3a\",\n", - " process=\"kubernetes_tasks_with_affinity\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"f032c5ff-1a4a-4a29-9834-8794fa9c3a7b\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"54f0f851-ee22-411d-a42c-2af49c3384f5\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"7a75d9b4-9036-4c35-93b1-31df2d45abea\",\n", - " process=\"None\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"d9ae9c93-fe70-42c7-bef0-b1b91c0b05d9\",\n", - " process=\"hello_world\",\n", - " status=\"successful\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"49d3bd33-1697-47ba-8b5a-f49dd2b7d235\",\n", - " process=\"kubernetes_tasks_with_affinity\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"1cea771b-0410-4757-8098-7e00fe7f16a0\",\n", - " process=\"kubernetes_tasks_with_affinity\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"f4f20eb9-484d-48a4-9f0d-e203df5992f7\",\n", - " process=\"hello_world\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"3921330a-0715-49bb-b446-05e7fa9d1079\",\n", - " process=\"hello_world\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"a9d46fae-c872-41d3-9569-08a42eb4f7d6\",\n", - " process=\"hello_world\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"f39786ae-7014-4764-8a10-86a5e84e636f\",\n", - " process=\"hello_world\",\n", - " status=\"successful\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"5772d5b7-d94d-4be5-904e-941018beb7e8\",\n", - " process=\"hello_world\",\n", - " status=\"successful\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"2576c595-f7e3-4d25-9acc-dc1412358ffa\",\n", - " process=\"hello_world\",\n", - " status=\"successful\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"e8c91aa5-78f5-4b62-bd68-3a89df4f1318\",\n", - " process=\"hello_world\",\n", - " status=\"successful\",\n", - " inputs=None\n", ")\n" ] } @@ -569,9 +324,9 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "unity-monorepo", "language": "python", - "name": "python3" + "name": "unity-monorepo" }, "language_info": { "codemirror_mode": { @@ -583,7 +338,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.8" + "version": "3.12.0" } }, "nbformat": 4, diff --git a/libs/unity-py/unity_sds_client/resources/job.py b/libs/unity-py/unity_sds_client/resources/job.py index aa6d297..6b2c263 100644 --- a/libs/unity-py/unity_sds_client/resources/job.py +++ b/libs/unity-py/unity_sds_client/resources/job.py @@ -79,10 +79,9 @@ def get_status(self): ) with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = unity_sps_ogc_processes_api_python_client.DefaultApi(api_client) + api_instance = unity_sps_ogc_processes_api_python_client.JobsApi(api_client) try: - # Retrieve the list of available processes - job = api_instance.status_jobs_job_id_get(self.id) # add auth + job = api_instance.get_status_jobs_job_id_get(self.id) # add auth return Job( self._session, self._endpoint, @@ -95,7 +94,7 @@ def get_status(self): raise UnityException(nfe.body) except Exception as e: print(traceback.format_exc()) - print("Exception when calling DefaultApi->process_list_processes_get: %s\n" % e) + print("Exception when calling JobsApi->get_status_jobs_job_id_get: %s\n" % e) raise UnityException(e.body) return None @@ -108,16 +107,16 @@ def get_result(self): access_token=token ) with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_client: - api_instance = unity_sps_ogc_processes_api_python_client.DefaultApi(api_client) + api_instance = unity_sps_ogc_processes_api_python_client.JobsApi(api_client) try: - job_result = api_instance.results_jobs_job_id_results_get(self.id) # add auth + job_result = api_instance.get_result_jobs_job_id_results_get(self.id) # add auth return job_result except NotFoundException as nfe: raise UnityException(nfe.body) except Exception as e: print(traceback.format_exc()) - print("Exception when calling DefaultApi->process_list_processes_get: %s\n" % e) + print("Exception when calling JobsApi->get_result_jobs_job_id_results_get: %s\n" % e) raise UnityException(e.body) return None @@ -129,7 +128,7 @@ def dismiss(self): access_token=token ) with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_client: - api_instance = unity_sps_ogc_processes_api_python_client.DefaultApi(api_client) + api_instance = unity_sps_ogc_processes_api_python_client.JobsApi(api_client) try: job = api_instance.dismiss_jobs_job_id_delete(self.id) # add auth return Job( @@ -144,6 +143,6 @@ def dismiss(self): raise UnityException(nfe.body) except Exception as e: print(traceback.format_exc()) - print("Exception when calling DefaultApi->process_list_processes_get: %s\n" % e) + print("Exception when calling JobsApi->dismiss_jobs_job_id_delete: %s\n" % e) raise UnityException(e.body) return None diff --git a/libs/unity-py/unity_sds_client/resources/process.py b/libs/unity-py/unity_sds_client/resources/process.py index 83f2cee..50f887d 100644 --- a/libs/unity-py/unity_sds_client/resources/process.py +++ b/libs/unity-py/unity_sds_client/resources/process.py @@ -1,7 +1,8 @@ import traceback import requests -from unity_sps_ogc_processes_api_python_client import Execute +from unity_sps_ogc_processes_api_python_client.models.execute200_response_input import Execute200ResponseInput +from unity_sps_ogc_processes_api_python_client.models.execute_workflows import ExecuteWorkflows from unity_sps_ogc_processes_api_python_client.exceptions import NotFoundException from unity_sds_client.resources.job_status import JobStatus @@ -76,31 +77,41 @@ def execute(self, data) -> Job: @param data: @return Job: ''' + token = self._session.get_auth().get_token() url = self._endpoint - execution = Execute.from_dict(data) configuration = unity_sps_ogc_processes_api_python_client.Configuration( host=url, access_token=token ) with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = unity_sps_ogc_processes_api_python_client.DefaultApi(api_client) + api_instance = unity_sps_ogc_processes_api_python_client.ProcessesApi(api_client) + process_id = self.id + response = None + prefer = "respond-async" + execute_workflows = ExecuteWorkflows.from_dict(data) + headers = {"Prefer": prefer} try: - # Retrieve the list of available processes - job = api_instance.execute_processes_process_id_execution_post(self.id, execution) # add auth + api_response = api_instance.execute_processes_process_id_execution_post( + process_id, + response=response, + prefer=prefer, + execute_workflows=execute_workflows, + _headers=headers + ) # add auth + return api_response return Job( self._session, self._endpoint, - job.process_id, - job.job_id, - JobStatus(job.status.value) + api_response.process_id, + api_response.job_id, + JobStatus(api_response.status) ) except NotFoundException as nfe: raise UnityException(nfe.body) except Exception as e: print(traceback.format_exc()) - print("Exception when calling DefaultApi->process_list_processes_get: %s\n" % e) + print("Exception when calling ProcessesApi->execute_processes_process_id_execution_post: %s\n" % e) raise UnityException(e.body) - diff --git a/libs/unity-py/unity_sds_client/services/process_service.py b/libs/unity-py/unity_sds_client/services/process_service.py index 3774117..1cb0b1f 100644 --- a/libs/unity-py/unity_sds_client/services/process_service.py +++ b/libs/unity-py/unity_sds_client/services/process_service.py @@ -62,11 +62,11 @@ def get_processes(self) -> List[Process]: ) with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = unity_sps_ogc_processes_api_python_client.DefaultApi(api_client) + api_instance = unity_sps_ogc_processes_api_python_client.ProcessesApi(api_client) try: # Retrieve the list of available processes - api_response = api_instance.process_list_processes_get() # add auth + api_response = api_instance.get_processes_processes_get() # add auth for process in api_response.processes: processes.append( Process( @@ -82,7 +82,7 @@ def get_processes(self) -> List[Process]: ) except Exception as e: print(traceback.format_exc()) - print("Exception when calling DefaultApi->process_list_processes_get: %s\n" % e) + print("Exception when calling ProcessesApi->get_processes_processes_get: %s\n" % e) # return processes @@ -100,11 +100,11 @@ def get_process(self, process_id: str) -> Process: ) with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = unity_sps_ogc_processes_api_python_client.DefaultApi(api_client) + api_instance = unity_sps_ogc_processes_api_python_client.ProcessesApi(api_client) try: # Retrieve the list of available processes - process_output = api_instance.process_description_processes_process_id_get(process_id) # add auth + process_output = api_instance.get_process_description_processes_process_id_get(process_id) # add auth return Process( self._session, self.endpoint, @@ -120,7 +120,7 @@ def get_process(self, process_id: str) -> Process: raise UnityException(nfe.body) except Exception as e: print(traceback.format_exc()) - print("Exception when calling DefaultApi->process_list_processes_get: %s\n" % e) + print("Exception when calling ProcessesApi->get_process_description_processes_process_id_get: %s\n" % e) def get_jobs(self, process: Process = None): @@ -136,11 +136,11 @@ def get_jobs(self, process: Process = None): ) with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = unity_sps_ogc_processes_api_python_client.DefaultApi(api_client) + api_instance = unity_sps_ogc_processes_api_python_client.JobsApi(api_client) try: # Retrieve the list of available processes - job_output = api_instance.job_list_jobs_get() # add auth + job_output = api_instance.get_jobs_jobs_get() # add auth for j in job_output.jobs: jobs.append( Job( @@ -156,7 +156,7 @@ def get_jobs(self, process: Process = None): raise UnityException(nfe.body) except Exception as e: print(traceback.format_exc()) - print("Exception when calling DefaultApi->process_list_processes_get: %s\n" % e) + print("Exception when calling JobsApi->get_jobs_jobs_get: %s\n" % e) return jobs diff --git a/libs/unity-sps-ogc-processes-api-client-python/README.md b/libs/unity-sps-ogc-processes-api-client-python/README.md index d9c11e7..5faa37f 100644 --- a/libs/unity-sps-ogc-processes-api-client-python/README.md +++ b/libs/unity-sps-ogc-processes-api-client-python/README.md @@ -1,4 +1,5 @@ # unity-sps-ogc-processes-api-python-client + This document is an API definition document provided alongside the OGC API - Processes standard. The OGC API - Processes Standard specifies a processing interface to communicate over a RESTful protocol using JavaScript Object Notation (JSON) encodings. The specification allows for the wrapping of computational tasks into executable processes that can be offered by a server and be invoked by a client application. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: @@ -10,11 +11,12 @@ This Python package is automatically generated by the [OpenAPI Generator](https: This is an update -## Requirements. +## Requirements Python 3.7+ ## Installation & Usage + ### pip install If the python package is hosted on a repository, you can install directly using: @@ -22,9 +24,11 @@ If the python package is hosted on a repository, you can install directly using: ```sh pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git ``` + (you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) Then import the package: + ```python import unity_sps_ogc_processes_api_python_client ``` @@ -36,9 +40,11 @@ Install via [Setuptools](http://pypi.python.org/pypi/setuptools). ```sh python setup.py install --user ``` + (or `sudo python setup.py install` to install the package for all users) Then import the package: + ```python import unity_sps_ogc_processes_api_python_client ``` @@ -77,11 +83,11 @@ configuration = unity_sps_ogc_processes_api_python_client.Configuration( # Enter a context with an instance of the API client with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = unity_sps_ogc_processes_api_python_client.DefaultApi(api_client) + api_instance = unity_sps_ogc_processes_api_python_client.ConformanceApi(api_client) try: # Information about standards that this API conforms to - api_response = api_instance.conformance_declaration_conformance_get() + api_response = api_instance.get_conformance_conformance_get() print("The response of DefaultApi->conformance_declaration_conformance_get:\n") pprint(api_response) except ApiException as e: @@ -91,7 +97,7 @@ with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_c ## Documentation for API Endpoints -All URIs are relative to *http://localhost* +All URIs are relative to ** Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- @@ -108,49 +114,47 @@ Class | Method | HTTP request | Description *DefaultApi* | [**status_jobs_job_id_get**](docs/DefaultApi.md#status_jobs_job_id_get) | **GET** /jobs/{job_id} | Retrieve the status of a job *DefaultApi* | [**undeploy_process_processes_process_id_delete**](docs/DefaultApi.md#undeploy_process_processes_process_id_delete) | **DELETE** /processes/{process_id} | Undeploy a process - ## Documentation For Models - - [Bbox](docs/Bbox.md) - - [ConfClasses](docs/ConfClasses.md) - - [Crs](docs/Crs.md) - - [Crs5](docs/Crs5.md) - - [Exception](docs/Exception.md) - - [Execute](docs/Execute.md) - - [HTTPValidationError](docs/HTTPValidationError.md) - - [HealthCheck](docs/HealthCheck.md) - - [InputValueInput](docs/InputValueInput.md) - - [InputValueNoObjectInput](docs/InputValueNoObjectInput.md) - - [InputValueNoObjectOutput](docs/InputValueNoObjectOutput.md) - - [InputValueOutput](docs/InputValueOutput.md) - - [JobControlOptions](docs/JobControlOptions.md) - - [JobList](docs/JobList.md) - - [LandingPage](docs/LandingPage.md) - - [Link](docs/Link.md) - - [Metadata](docs/Metadata.md) - - [Metadata1](docs/Metadata1.md) - - [Metadata2](docs/Metadata2.md) - - [ProcessInput](docs/ProcessInput.md) - - [ProcessList](docs/ProcessList.md) - - [ProcessOutput](docs/ProcessOutput.md) - - [ProcessSummary](docs/ProcessSummary.md) - - [StatusCode](docs/StatusCode.md) - - [StatusInfo](docs/StatusInfo.md) - - [Subscriber](docs/Subscriber.md) - - [ValidationError](docs/ValidationError.md) - - [ValidationErrorLocInner](docs/ValidationErrorLocInner.md) - - [Value](docs/Value.md) - +- [Bbox](docs/Bbox.md) +- [ConfClasses](docs/ConfClasses.md) +- [Crs](docs/Crs.md) +- [Crs5](docs/Crs5.md) +- [Exception](docs/Exception.md) +- [Execute](docs/Execute.md) +- [HTTPValidationError](docs/HTTPValidationError.md) +- [HealthCheck](docs/HealthCheck.md) +- [InputValueInput](docs/InputValueInput.md) +- [InputValueNoObjectInput](docs/InputValueNoObjectInput.md) +- [InputValueNoObjectOutput](docs/InputValueNoObjectOutput.md) +- [InputValueOutput](docs/InputValueOutput.md) +- [JobControlOptions](docs/JobControlOptions.md) +- [JobList](docs/JobList.md) +- [LandingPage](docs/LandingPage.md) +- [Link](docs/Link.md) +- [Metadata](docs/Metadata.md) +- [Metadata1](docs/Metadata1.md) +- [Metadata2](docs/Metadata2.md) +- [ProcessInput](docs/ProcessInput.md) +- [ProcessList](docs/ProcessList.md) +- [ProcessOutput](docs/ProcessOutput.md) +- [ProcessSummary](docs/ProcessSummary.md) +- [StatusCode](docs/StatusCode.md) +- [StatusInfo](docs/StatusInfo.md) +- [Subscriber](docs/Subscriber.md) +- [ValidationError](docs/ValidationError.md) +- [ValidationErrorLocInner](docs/ValidationErrorLocInner.md) +- [Value](docs/Value.md) -## Documentation For Authorization +## Documentation For Authorization Authentication schemes defined for the API: + ### bearerAuth - **Type**: Bearer authentication (JWT) - ## Author From 50774b9b4097e0175d6fbbd226afb389abf5d1a2 Mon Sep 17 00:00:00 2001 From: Drew Meyers Date: Wed, 18 Sep 2024 15:25:14 -0700 Subject: [PATCH 2/7] chore: debug job status --- libs/unity-py/notebooks/ogc_notebook.ipynb | 242 ++++++++++++++---- .../unity_sds_client/resources/process.py | 12 +- 2 files changed, 196 insertions(+), 58 deletions(-) diff --git a/libs/unity-py/notebooks/ogc_notebook.ipynb b/libs/unity-py/notebooks/ogc_notebook.ipynb index 54ec734..60b2676 100644 --- a/libs/unity-py/notebooks/ogc_notebook.ipynb +++ b/libs/unity-py/notebooks/ogc_notebook.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 76, + "execution_count": 1, "id": "700eddd2-77af-4849-8343-3f0fef34ff73", "metadata": { "is_executing": true @@ -23,7 +23,7 @@ }, { "cell_type": "code", - "execution_count": 77, + "execution_count": 2, "id": "4029cee7-9c5b-4ac1-bd54-45fb45be9397", "metadata": {}, "outputs": [ @@ -44,17 +44,17 @@ }, { "cell_type": "code", - "execution_count": 78, + "execution_count": 3, "id": "9d9f712d-6d80-4b27-a8dc-b12e3895ba59", "metadata": {}, "outputs": [], "source": [ - "process_service.endpoint = \"http://k8s-sps-ogcproce-b59e4702b8-1327377322.us-west-2.elb.amazonaws.com:5001\"" + "process_service.endpoint = \"http://k8s-sps-ogcproce-b59e4702b8-2034669822.us-west-2.elb.amazonaws.com:5001\"" ] }, { "cell_type": "code", - "execution_count": 79, + "execution_count": 24, "id": "865f0b16-c954-45a9-984a-953be93749a3", "metadata": {}, "outputs": [], @@ -64,7 +64,7 @@ }, { "cell_type": "code", - "execution_count": 80, + "execution_count": 25, "id": "199331bb-0414-4846-a61a-0b43b1142924", "metadata": {}, "outputs": [ @@ -89,7 +89,7 @@ }, { "cell_type": "code", - "execution_count": 81, + "execution_count": 26, "id": "399a8c39-a69b-49a8-b9b1-03de6b3bc62f", "metadata": {}, "outputs": [], @@ -99,7 +99,7 @@ }, { "cell_type": "code", - "execution_count": 82, + "execution_count": 27, "id": "04dee225-aea0-4132-b427-dbd26085986e", "metadata": {}, "outputs": [ @@ -123,7 +123,7 @@ }, { "cell_type": "code", - "execution_count": 73, + "execution_count": 28, "id": "667f1082-9ce1-473d-8e8e-f96deb974dab", "metadata": {}, "outputs": [], @@ -136,7 +136,7 @@ }, { "cell_type": "code", - "execution_count": 83, + "execution_count": 29, "id": "4057003a-ccec-4321-8c12-404d7ff1275a", "metadata": {}, "outputs": [], @@ -158,13 +158,12 @@ " }\n", " }\n", "}\n", - "\n", "submitted_job = process.execute(data)" ] }, { "cell_type": "code", - "execution_count": 84, + "execution_count": 39, "id": "f08adb26-822e-4e01-8ec1-fbb4eb58bd26", "metadata": {}, "outputs": [], @@ -189,22 +188,15 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 40, "id": "a18a5727-750c-4307-b77c-7389d4ccc0f4", - "metadata": { - "scrolled": true - }, + "metadata": {}, "outputs": [ { - "ename": "AttributeError", - "evalue": "'Execute200ResponseInput' object has no attribute 'get_status'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[23], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mtime\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m status \u001b[38;5;241m=\u001b[39m \u001b[43msubmitted_job\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget_status\u001b[49m()\u001b[38;5;241m.\u001b[39mstatus\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01mwhile\u001b[39;00m status \u001b[38;5;129;01min\u001b[39;00m [JobStatus\u001b[38;5;241m.\u001b[39mACCEPTED, JobStatus\u001b[38;5;241m.\u001b[39mRUNNING]:\n\u001b[1;32m 5\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mjob \u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m is not complete. Currently in state \u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m \u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mformat(submitted_job\u001b[38;5;241m.\u001b[39mid, submitted_job\u001b[38;5;241m.\u001b[39mget_status()\u001b[38;5;241m.\u001b[39mstatus))\n", - "File \u001b[0;32m~/.virtualenvs/unity-monorepo/lib/python3.12/site-packages/pydantic/main.py:853\u001b[0m, in \u001b[0;36mBaseModel.__getattr__\u001b[0;34m(self, item)\u001b[0m\n\u001b[1;32m 850\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28msuper\u001b[39m()\u001b[38;5;241m.\u001b[39m\u001b[38;5;21m__getattribute__\u001b[39m(item) \u001b[38;5;66;03m# Raises AttributeError if appropriate\u001b[39;00m\n\u001b[1;32m 851\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 852\u001b[0m \u001b[38;5;66;03m# this is the current error\u001b[39;00m\n\u001b[0;32m--> 853\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mAttributeError\u001b[39;00m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00m\u001b[38;5;28mtype\u001b[39m(\u001b[38;5;28mself\u001b[39m)\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m\u001b[38;5;132;01m!r}\u001b[39;00m\u001b[38;5;124m object has no attribute \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mitem\u001b[38;5;132;01m!r}\u001b[39;00m\u001b[38;5;124m'\u001b[39m)\n", - "\u001b[0;31mAttributeError\u001b[0m: 'Execute200ResponseInput' object has no attribute 'get_status'" + "name": "stdout", + "output_type": "stream", + "text": [ + "Job 07f019a0-4689-4a19-b1f4-b39b97ad918f completed with status JobStatus.FAILED\n" ] } ], @@ -222,21 +214,19 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 41, "id": "ce1ae133-4a84-434e-b0b9-defbab57af9a", "metadata": {}, "outputs": [ { - "ename": "AttributeError", - "evalue": "'Execute200ResponseInput' object has no attribute 'get_result'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[24], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43msubmitted_job\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget_result\u001b[49m()\n", - "File \u001b[0;32m~/.virtualenvs/unity-monorepo/lib/python3.12/site-packages/pydantic/main.py:853\u001b[0m, in \u001b[0;36mBaseModel.__getattr__\u001b[0;34m(self, item)\u001b[0m\n\u001b[1;32m 850\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28msuper\u001b[39m()\u001b[38;5;241m.\u001b[39m\u001b[38;5;21m__getattribute__\u001b[39m(item) \u001b[38;5;66;03m# Raises AttributeError if appropriate\u001b[39;00m\n\u001b[1;32m 851\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 852\u001b[0m \u001b[38;5;66;03m# this is the current error\u001b[39;00m\n\u001b[0;32m--> 853\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mAttributeError\u001b[39;00m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00m\u001b[38;5;28mtype\u001b[39m(\u001b[38;5;28mself\u001b[39m)\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m\u001b[38;5;132;01m!r}\u001b[39;00m\u001b[38;5;124m object has no attribute \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mitem\u001b[38;5;132;01m!r}\u001b[39;00m\u001b[38;5;124m'\u001b[39m)\n", - "\u001b[0;31mAttributeError\u001b[0m: 'Execute200ResponseInput' object has no attribute 'get_result'" - ] + "data": { + "text/plain": [ + "{}" + ] + }, + "execution_count": 41, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ @@ -245,20 +235,20 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 42, "id": "2875c57c-7383-4977-8cc0-b4d1ae14653d", "metadata": {}, "outputs": [ { - "ename": "AttributeError", - "evalue": "'Execute200ResponseInput' object has no attribute 'dismiss'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[25], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m status \u001b[38;5;241m=\u001b[39m \u001b[43msubmitted_job\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdismiss\u001b[49m()\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28mprint\u001b[39m(status)\n", - "File \u001b[0;32m~/.virtualenvs/unity-monorepo/lib/python3.12/site-packages/pydantic/main.py:853\u001b[0m, in \u001b[0;36mBaseModel.__getattr__\u001b[0;34m(self, item)\u001b[0m\n\u001b[1;32m 850\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28msuper\u001b[39m()\u001b[38;5;241m.\u001b[39m\u001b[38;5;21m__getattribute__\u001b[39m(item) \u001b[38;5;66;03m# Raises AttributeError if appropriate\u001b[39;00m\n\u001b[1;32m 851\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 852\u001b[0m \u001b[38;5;66;03m# this is the current error\u001b[39;00m\n\u001b[0;32m--> 853\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mAttributeError\u001b[39;00m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00m\u001b[38;5;28mtype\u001b[39m(\u001b[38;5;28mself\u001b[39m)\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m\u001b[38;5;132;01m!r}\u001b[39;00m\u001b[38;5;124m object has no attribute \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mitem\u001b[38;5;132;01m!r}\u001b[39;00m\u001b[38;5;124m'\u001b[39m)\n", - "\u001b[0;31mAttributeError\u001b[0m: 'Execute200ResponseInput' object has no attribute 'dismiss'" + "name": "stdout", + "output_type": "stream", + "text": [ + "unity_sds_client.resources.Job(\n", + " id=\"07f019a0-4689-4a19-b1f4-b39b97ad918f\",\n", + " process=\"cwl_dag\",\n", + " status=\"dismissed\",\n", + " inputs=None\n", + ")\n" ] } ], @@ -269,7 +259,7 @@ }, { "cell_type": "code", - "execution_count": 55, + "execution_count": 46, "id": "ae823803-05cf-420f-a8de-dd88157f7bfe", "metadata": {}, "outputs": [], @@ -279,7 +269,7 @@ }, { "cell_type": "code", - "execution_count": 56, + "execution_count": 44, "id": "af2caec6-f393-433f-86ba-24b178bdef12", "metadata": {}, "outputs": [ @@ -288,19 +278,169 @@ "output_type": "stream", "text": [ "unity_sds_client.resources.Job(\n", - " id=\"52c99990-51f1-4e69-84a0-8e9ff30e3269\",\n", + " id=\"e1821394-e31f-42c5-9637-07496a207ebf\",\n", + " process=\"cwl_dag\",\n", + " status=\"accepted\",\n", + " inputs=None\n", + ")\n", + "unity_sds_client.resources.Job(\n", + " id=\"fb1f5df1-916e-4344-a6e7-14ff49ee8a66\",\n", + " process=\"cwl_dag\",\n", + " status=\"accepted\",\n", + " inputs=None\n", + ")\n", + "unity_sds_client.resources.Job(\n", + " id=\"56ceb552-e100-4ed4-a270-32adbdf71cf9\",\n", + " process=\"cwl_dag\",\n", + " status=\"accepted\",\n", + " inputs=None\n", + ")\n", + "unity_sds_client.resources.Job(\n", + " id=\"4600b598-4961-4252-9744-ffca5c886c1b\",\n", + " process=\"cwl_dag\",\n", + " status=\"accepted\",\n", + " inputs=None\n", + ")\n", + "unity_sds_client.resources.Job(\n", + " id=\"9db56c05-ce88-4d13-895e-797f842d6672\",\n", + " process=\"cwl_dag\",\n", + " status=\"accepted\",\n", + " inputs=None\n", + ")\n", + "unity_sds_client.resources.Job(\n", + " id=\"2cfa3efa-c13e-4dda-ad55-c53eeb8ca06e\",\n", + " process=\"cwl_dag\",\n", + " status=\"accepted\",\n", + " inputs=None\n", + ")\n", + "unity_sds_client.resources.Job(\n", + " id=\"2caffa01-da12-4538-a40a-833a201313ef\",\n", + " process=\"cwl_dag\",\n", + " status=\"accepted\",\n", + " inputs=None\n", + ")\n", + "unity_sds_client.resources.Job(\n", + " id=\"362b3100-64a8-42f8-ae66-e816e050fd74\",\n", + " process=\"cwl_dag\",\n", + " status=\"accepted\",\n", + " inputs=None\n", + ")\n", + "unity_sds_client.resources.Job(\n", + " id=\"6e4e953b-80de-44a4-9ba2-e4780d6c25d0\",\n", + " process=\"cwl_dag\",\n", + " status=\"accepted\",\n", + " inputs=None\n", + ")\n", + "unity_sds_client.resources.Job(\n", + " id=\"ccfc8a66-8cc8-419c-8187-289353ccaa4a\",\n", + " process=\"cwl_dag\",\n", + " status=\"accepted\",\n", + " inputs=None\n", + ")\n", + "unity_sds_client.resources.Job(\n", + " id=\"6eb4ad16-6c08-4c06-ba85-f508a01fe561\",\n", + " process=\"cwl_dag\",\n", + " status=\"accepted\",\n", + " inputs=None\n", + ")\n", + "unity_sds_client.resources.Job(\n", + " id=\"55356a79-5165-41b7-82a4-6dd504060dac\",\n", + " process=\"cwl_dag\",\n", + " status=\"accepted\",\n", + " inputs=None\n", + ")\n", + "unity_sds_client.resources.Job(\n", + " id=\"388ecf36-75df-4564-8856-9d221beb1d85\",\n", + " process=\"cwl_dag\",\n", + " status=\"accepted\",\n", + " inputs=None\n", + ")\n", + "unity_sds_client.resources.Job(\n", + " id=\"749ace55-5581-446b-9c8e-fb085352f32a\",\n", + " process=\"cwl_dag\",\n", + " status=\"accepted\",\n", + " inputs=None\n", + ")\n", + "unity_sds_client.resources.Job(\n", + " id=\"5eca3329-7f2c-42a2-86e8-f89dbc453b1d\",\n", + " process=\"cwl_dag\",\n", + " status=\"accepted\",\n", + " inputs=None\n", + ")\n", + "unity_sds_client.resources.Job(\n", + " id=\"84e50527-6d8e-43ad-b05e-3187637d3df7\",\n", + " process=\"cwl_dag\",\n", + " status=\"accepted\",\n", + " inputs=None\n", + ")\n", + "unity_sds_client.resources.Job(\n", + " id=\"46dc76d8-94e9-4996-869a-f7c6c6d11d38\",\n", + " process=\"cwl_dag\",\n", + " status=\"accepted\",\n", + " inputs=None\n", + ")\n", + "unity_sds_client.resources.Job(\n", + " id=\"14c2c766-9574-422d-a3a7-0358dba8be3a\",\n", + " process=\"cwl_dag\",\n", + " status=\"accepted\",\n", + " inputs=None\n", + ")\n", + "unity_sds_client.resources.Job(\n", + " id=\"9debb87a-ef44-4525-987e-eaa0c920c7e3\",\n", + " process=\"cwl_dag\",\n", + " status=\"accepted\",\n", + " inputs=None\n", + ")\n", + "unity_sds_client.resources.Job(\n", + " id=\"126d3595-4dc5-4c4f-b7b6-a020f00d635a\",\n", + " process=\"cwl_dag\",\n", + " status=\"accepted\",\n", + " inputs=None\n", + ")\n", + "unity_sds_client.resources.Job(\n", + " id=\"1d643333-f8b0-4a91-b3e5-2d266dc01f40\",\n", + " process=\"cwl_dag\",\n", + " status=\"accepted\",\n", + " inputs=None\n", + ")\n", + "unity_sds_client.resources.Job(\n", + " id=\"6df86f8a-569d-4b8e-8c54-64c662df93e8\",\n", + " process=\"cwl_dag\",\n", + " status=\"accepted\",\n", + " inputs=None\n", + ")\n", + "unity_sds_client.resources.Job(\n", + " id=\"9974e9dc-994d-418e-95a6-951cfe811b4d\",\n", + " process=\"cwl_dag\",\n", + " status=\"failed\",\n", + " inputs=None\n", + ")\n", + "unity_sds_client.resources.Job(\n", + " id=\"68cbd1d9-59d1-4e6d-9cad-7f9bb22cf03d\",\n", + " process=\"cwl_dag\",\n", + " status=\"accepted\",\n", + " inputs=None\n", + ")\n", + "unity_sds_client.resources.Job(\n", + " id=\"fae566d0-dc17-461e-9b8e-12d7e259f3b3\",\n", + " process=\"cwl_dag\",\n", + " status=\"accepted\",\n", + " inputs=None\n", + ")\n", + "unity_sds_client.resources.Job(\n", + " id=\"0073ff64-3315-49a4-b41f-7d4310e7c9be\",\n", " process=\"cwl_dag\",\n", " status=\"accepted\",\n", " inputs=None\n", ")\n", "unity_sds_client.resources.Job(\n", - " id=\"b525ef73-cac7-415a-8fcc-eabc4a25ffda\",\n", + " id=\"df16615f-dc2d-4959-84ef-9217f5b631f4\",\n", " process=\"cwl_dag\",\n", " status=\"accepted\",\n", " inputs=None\n", ")\n", "unity_sds_client.resources.Job(\n", - " id=\"88b18803-fc3e-4335-a11c-30cfae53bff8\",\n", + " id=\"9eff909f-1941-42a4-ab92-98579fbe0cdf\",\n", " process=\"cwl_dag\",\n", " status=\"accepted\",\n", " inputs=None\n", diff --git a/libs/unity-py/unity_sds_client/resources/process.py b/libs/unity-py/unity_sds_client/resources/process.py index 50f887d..4eeb12b 100644 --- a/libs/unity-py/unity_sds_client/resources/process.py +++ b/libs/unity-py/unity_sds_client/resources/process.py @@ -89,24 +89,22 @@ def execute(self, data) -> Job: api_instance = unity_sps_ogc_processes_api_python_client.ProcessesApi(api_client) process_id = self.id response = None - prefer = "respond-async" + prefer = "respond-async" # TODO should be an argument execute_workflows = ExecuteWorkflows.from_dict(data) - headers = {"Prefer": prefer} try: api_response = api_instance.execute_processes_process_id_execution_post( process_id, response=response, prefer=prefer, execute_workflows=execute_workflows, - _headers=headers ) # add auth - return api_response + api_response_dict = {key: value for key, value in api_response.anyof_schema_2_validator} return Job( self._session, self._endpoint, - api_response.process_id, - api_response.job_id, - JobStatus(api_response.status) + api_response_dict["process_id"], + api_response_dict["job_id"], + JobStatus(api_response_dict["status"]) ) except NotFoundException as nfe: From cfc8307955eaa88bd77808f64488a82ab88f03b2 Mon Sep 17 00:00:00 2001 From: Drew Meyers Date: Thu, 19 Sep 2024 11:34:10 -0700 Subject: [PATCH 3/7] chore: revert changes to README --- .../README.md | 78 +++++++++---------- 1 file changed, 37 insertions(+), 41 deletions(-) diff --git a/libs/unity-sps-ogc-processes-api-client-python/README.md b/libs/unity-sps-ogc-processes-api-client-python/README.md index 5faa37f..d9c11e7 100644 --- a/libs/unity-sps-ogc-processes-api-client-python/README.md +++ b/libs/unity-sps-ogc-processes-api-client-python/README.md @@ -1,5 +1,4 @@ # unity-sps-ogc-processes-api-python-client - This document is an API definition document provided alongside the OGC API - Processes standard. The OGC API - Processes Standard specifies a processing interface to communicate over a RESTful protocol using JavaScript Object Notation (JSON) encodings. The specification allows for the wrapping of computational tasks into executable processes that can be offered by a server and be invoked by a client application. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: @@ -11,12 +10,11 @@ This Python package is automatically generated by the [OpenAPI Generator](https: This is an update -## Requirements +## Requirements. Python 3.7+ ## Installation & Usage - ### pip install If the python package is hosted on a repository, you can install directly using: @@ -24,11 +22,9 @@ If the python package is hosted on a repository, you can install directly using: ```sh pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git ``` - (you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) Then import the package: - ```python import unity_sps_ogc_processes_api_python_client ``` @@ -40,11 +36,9 @@ Install via [Setuptools](http://pypi.python.org/pypi/setuptools). ```sh python setup.py install --user ``` - (or `sudo python setup.py install` to install the package for all users) Then import the package: - ```python import unity_sps_ogc_processes_api_python_client ``` @@ -83,11 +77,11 @@ configuration = unity_sps_ogc_processes_api_python_client.Configuration( # Enter a context with an instance of the API client with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = unity_sps_ogc_processes_api_python_client.ConformanceApi(api_client) + api_instance = unity_sps_ogc_processes_api_python_client.DefaultApi(api_client) try: # Information about standards that this API conforms to - api_response = api_instance.get_conformance_conformance_get() + api_response = api_instance.conformance_declaration_conformance_get() print("The response of DefaultApi->conformance_declaration_conformance_get:\n") pprint(api_response) except ApiException as e: @@ -97,7 +91,7 @@ with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_c ## Documentation for API Endpoints -All URIs are relative to ** +All URIs are relative to *http://localhost* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- @@ -114,47 +108,49 @@ Class | Method | HTTP request | Description *DefaultApi* | [**status_jobs_job_id_get**](docs/DefaultApi.md#status_jobs_job_id_get) | **GET** /jobs/{job_id} | Retrieve the status of a job *DefaultApi* | [**undeploy_process_processes_process_id_delete**](docs/DefaultApi.md#undeploy_process_processes_process_id_delete) | **DELETE** /processes/{process_id} | Undeploy a process + ## Documentation For Models -- [Bbox](docs/Bbox.md) -- [ConfClasses](docs/ConfClasses.md) -- [Crs](docs/Crs.md) -- [Crs5](docs/Crs5.md) -- [Exception](docs/Exception.md) -- [Execute](docs/Execute.md) -- [HTTPValidationError](docs/HTTPValidationError.md) -- [HealthCheck](docs/HealthCheck.md) -- [InputValueInput](docs/InputValueInput.md) -- [InputValueNoObjectInput](docs/InputValueNoObjectInput.md) -- [InputValueNoObjectOutput](docs/InputValueNoObjectOutput.md) -- [InputValueOutput](docs/InputValueOutput.md) -- [JobControlOptions](docs/JobControlOptions.md) -- [JobList](docs/JobList.md) -- [LandingPage](docs/LandingPage.md) -- [Link](docs/Link.md) -- [Metadata](docs/Metadata.md) -- [Metadata1](docs/Metadata1.md) -- [Metadata2](docs/Metadata2.md) -- [ProcessInput](docs/ProcessInput.md) -- [ProcessList](docs/ProcessList.md) -- [ProcessOutput](docs/ProcessOutput.md) -- [ProcessSummary](docs/ProcessSummary.md) -- [StatusCode](docs/StatusCode.md) -- [StatusInfo](docs/StatusInfo.md) -- [Subscriber](docs/Subscriber.md) -- [ValidationError](docs/ValidationError.md) -- [ValidationErrorLocInner](docs/ValidationErrorLocInner.md) -- [Value](docs/Value.md) + - [Bbox](docs/Bbox.md) + - [ConfClasses](docs/ConfClasses.md) + - [Crs](docs/Crs.md) + - [Crs5](docs/Crs5.md) + - [Exception](docs/Exception.md) + - [Execute](docs/Execute.md) + - [HTTPValidationError](docs/HTTPValidationError.md) + - [HealthCheck](docs/HealthCheck.md) + - [InputValueInput](docs/InputValueInput.md) + - [InputValueNoObjectInput](docs/InputValueNoObjectInput.md) + - [InputValueNoObjectOutput](docs/InputValueNoObjectOutput.md) + - [InputValueOutput](docs/InputValueOutput.md) + - [JobControlOptions](docs/JobControlOptions.md) + - [JobList](docs/JobList.md) + - [LandingPage](docs/LandingPage.md) + - [Link](docs/Link.md) + - [Metadata](docs/Metadata.md) + - [Metadata1](docs/Metadata1.md) + - [Metadata2](docs/Metadata2.md) + - [ProcessInput](docs/ProcessInput.md) + - [ProcessList](docs/ProcessList.md) + - [ProcessOutput](docs/ProcessOutput.md) + - [ProcessSummary](docs/ProcessSummary.md) + - [StatusCode](docs/StatusCode.md) + - [StatusInfo](docs/StatusInfo.md) + - [Subscriber](docs/Subscriber.md) + - [ValidationError](docs/ValidationError.md) + - [ValidationErrorLocInner](docs/ValidationErrorLocInner.md) + - [Value](docs/Value.md) - + ## Documentation For Authorization + Authentication schemes defined for the API: - ### bearerAuth - **Type**: Bearer authentication (JWT) + ## Author From 5a447699785127d112670da66cd579f2e1bf7fef Mon Sep 17 00:00:00 2001 From: Drew Meyers Date: Thu, 19 Sep 2024 11:40:50 -0700 Subject: [PATCH 4/7] chore: update dependency versions and changelog --- libs/unity-py/CHANGELOG.md | 111 ++++++++++++++++++++++++++++++++--- libs/unity-py/pyproject.toml | 5 +- 2 files changed, 106 insertions(+), 10 deletions(-) diff --git a/libs/unity-py/CHANGELOG.md b/libs/unity-py/CHANGELOG.md index 0bc3173..fd4c971 100644 --- a/libs/unity-py/CHANGELOG.md +++ b/libs/unity-py/CHANGELOG.md @@ -5,132 +5,222 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.7.0] - 2024-09-19 + +### Added + +### Fixed + +### Changed + + Updated the usage of the OGC Processes Client to conform more closely to OGC Processes API spec. + +### Removed + +### Security + +### Deprecated + ## [0.6.1] - 2024-09-05 + ### Added + * Added sphinx doc gen + ### Fixed + ### Changed + ### Removed + ### Security -### Deprecated +### Deprecated ## [0.6.0] - 2024-08-13 + ### Added + * Added app-pacakge build system client and integrations + ### Fixed + ### Changed + ### Removed + ### Security -### Deprecated +### Deprecated ## [0.5.0] - 2024-07-31 + ### Added + ### Fixed + * cleaned up some README formatting + ### Changed + * changed endpoints from cloudfront urls to DNS entries + ### Removed + ### Security -### Deprecated +### Deprecated ## [0.5.0] - 2024-07-23 ### Added + * Health Service with variuos functions that allow user's to inspect the health status of the system + ### Fixed + ### Changed + * Health status information is included when an instantiated unity object is printed. * OGC Process API support to use ogc_processes client published by SPS + ### Removed + ### Security -### Deprecated +### Deprecated ## [0.4.0] - 2024-03-29 ### Added + * We've added the ability to override settings in the default config file by passing in a config file with the settings needing to be overridden when instantiating a Unity object. [56](https://github.com/unity-sds/unity-py/issues/56) * Collection creation (create_collection) through dataService library * Added support for defining custom metadata for project and venue. * Added methods to return STAC content instead of unity domain objects if requested * Added properties parsing of stac metadata to dataset objects + ### Fixed + ### Changed + * Updated get_collections and get_collection_data to support limit parameter. * Updated get_collection_data to support filter parameter which takes CQL string. + ### Removed + ### Security -### Deprecated +### Deprecated ## [0.3.0] - 2024-02-12 ### Added + ### Fixed + * fixed an issue with encoding a json deploy request twice [71](https://github.com/unity-sds/unity-py/issues/71) + ### Changed + * We now use the asset URI/HREF as the key into the assets, and use the "metadata" and "data" types as asset-roles: [69](https://github.com/unity-sds/unity-py/issues/69) + ### Removed + ### Security -### Deprecated +### Deprecated ## [0.2.2] - 2024-01-03 + ### Added + * Added project/venue support [5](https://github.com/unity-sds/unity-py/issues/58) + ### Fixed + ### Changed + ### Removed + ### Security + ### Deprecated ## [0.2.1] - 2023-11-29 + ### Added + * python code coverage via coveralls + ### Fixed + ### Changed + * updated install to support python 3.8 and above. + ### Removed + ### Security + ### Deprecated ## [0.2.1] - 2023-11-29 + ### Added + * python code coverage via coveralls + ### Fixed + ### Changed + * updated install to support python 3.8 and above. + ### Removed + ### Security -### Deprecated +### Deprecated ## [0.2.0] - 2023-08-10 + ### Added + * Added parsing of collection in stac items + ### Fixed + * fixed release workflow to test against `unity-sds-client` not `unity_py` + ### Changed + * updated package name so that imports reference `unity_sds_client` not `unity_py` + ### Removed + ### Security + ### Deprecated ## [0.1.2] - 2023-06-28 ### Added + * added method for retrieving datasets `Collection.datasets` from a collection + ### Fixed + * Added some directory slash stripping to ensure no trailing slash when specifying "to_stac" output director + ### Changed + * Changed name of package from unity-py to unity-sds-client ## [0.1.1] - 2023-06-27 ### Added + * Added pypi repository publication to unity-py repository [[7](https://github.com/unity-sds/unity-py/issues/7)]. * Added to_stac methods for writing STAC from unity-py resources (e.g. collection, dataset, datafiles) * Added from_stac methods for creating unity-py resources (e.g. collection, dataset, datafiles) from STAC files @@ -138,12 +228,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * added dependency on pystac > 1.7.3 to unity-py * added addition of dataset properties to stac read/write * Added functionality to download latest available version of the application parameter files stored in the Dockstore [[30](https://github.com/unity-sds/unity-py/issues/30)] + ### Fixed + * Added some directory slash stripping to ensure no trailing slash when specifying "to_stac" output director + ### Changed + * all assets written out to STAC items are made relative (if they are non-URIs, relative, or exist in the same directory tree of the STAC files) * Changed name of package from unity-py to unity-sds-client + ### Removed + * Removed support for python 3.8 ## [0.1.0] - 2023-04-17 @@ -160,5 +256,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Miscellaneous quality of life improvements to ease code developing (type hinting, annotations, etc) #### Application Registry + * [unity-ads-deployment #79](https://github.com/unity-sds/unity-ads-deployment/issues/79) Add Dockstore API access to Unity.py * [unity-ads-deployment #87](https://github.com/unity-sds/unity-ads-deployment/issues/87) Convert Unity.py Application Package API to use Hosted Workflows diff --git a/libs/unity-py/pyproject.toml b/libs/unity-py/pyproject.toml index b3bcb25..94125c9 100644 --- a/libs/unity-py/pyproject.toml +++ b/libs/unity-py/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "unity-sds-client" -version = "0.6.1" +version = "0.7.0" description = "Unity-Py is a Python client to simplify interactions with NASA's Unity Platform." authors = ["Anil Natha, Mike Gangl"] readme = "README.md" @@ -23,8 +23,7 @@ requests = "^2.28.0" tenacity = "^8.0.1" giturlparse = "^0.10.0" pystac = "^1.7.3" -unity-sps-ogc-processes-api-python-client = "^1.0.0" -#unity-sps-ogc-processes-api-python-client = {path = "../unity-sps-ogc-processes-api-client-python", develop = true} +unity-sps-ogc-processes-api-python-client = { git = "https://github.com/unity-sds/unity-sps-ogc-processes-api-python-client.git", tag = "2.0.0" } unity-sds-apgs-client = {path = "../app-package-build-client", develop = true} jsonschema = "^4.22.0" From 9eb1959c1e647b0a76fc277ccdff38631af89186 Mon Sep 17 00:00:00 2001 From: Drew Meyers Date: Thu, 19 Sep 2024 12:24:00 -0700 Subject: [PATCH 5/7] chore: update dependencies --- libs/unity-py/poetry.lock | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/libs/unity-py/poetry.lock b/libs/unity-py/poetry.lock index 86ba32d..7da896e 100644 --- a/libs/unity-py/poetry.lock +++ b/libs/unity-py/poetry.lock @@ -1218,19 +1218,23 @@ url = "../app-package-build-client" [[package]] name = "unity-sps-ogc-processes-api-python-client" version = "1.0.0" -description = "Unity Processing API conforming to the OGC API - Processes - Part 1 standard" +description = "Unity Processing API conforming to the Draft of OGC API - Processes - Part 2: Deploy, Replace, Undeploy" optional = false -python-versions = "<4.0,>=3.7" -files = [ - {file = "unity_sps_ogc_processes_api_python_client-1.0.0-py3-none-any.whl", hash = "sha256:a95e3c73e41f1e220efb4f1dfca8eb92001224f04f0dc7afb87319a6516dd0b9"}, - {file = "unity_sps_ogc_processes_api_python_client-1.0.0.tar.gz", hash = "sha256:a7b330a96eedd67fafde89c35d56589a7f6d20c0c87a9182929c687b8ef5654b"}, -] +python-versions = "^3.8" +files = [] +develop = false [package.dependencies] pydantic = ">=2" python-dateutil = ">=2.8.2" typing-extensions = ">=4.7.1" -urllib3 = ">=1.25.3" +urllib3 = ">= 1.25.3" + +[package.source] +type = "git" +url = "https://github.com/unity-sds/unity-sps-ogc-processes-api-python-client.git" +reference = "2.0.0" +resolved_reference = "b272f1cc24fe25347ccc21df8fc67ba4ec97838a" [[package]] name = "urllib3" @@ -1271,4 +1275,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "8df0a4ebcdaf65506c76e8cec9e098b1edb9960b4fb6ccd39bcd872b9a677533" +content-hash = "f4e1d18ab560b5fe277ede6036b289f32af6745cb6b3f6676b3dfdf5f8cfd2a8" From 50665465cabb3da871b86f447f54969fb024c904 Mon Sep 17 00:00:00 2001 From: Drew Meyers Date: Thu, 26 Sep 2024 09:31:33 -0700 Subject: [PATCH 6/7] feat: Take OGC URL from user input in notebook --- libs/unity-py/notebooks/ogc_notebook.ipynb | 123 +++++++++++++++------ 1 file changed, 89 insertions(+), 34 deletions(-) diff --git a/libs/unity-py/notebooks/ogc_notebook.ipynb b/libs/unity-py/notebooks/ogc_notebook.ipynb index 60b2676..687fbba 100644 --- a/libs/unity-py/notebooks/ogc_notebook.ipynb +++ b/libs/unity-py/notebooks/ogc_notebook.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 18, "id": "700eddd2-77af-4849-8343-3f0fef34ff73", "metadata": { "is_executing": true @@ -14,6 +14,7 @@ "\n", "from datetime import datetime\n", "from IPython.display import JSON\n", + "from ipywidgets import widgets\n", "\n", "from unity_sds_client.unity import Unity\n", "from unity_sds_client.unity_services import UnityServices\n", @@ -23,19 +24,10 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "id": "4029cee7-9c5b-4ac1-bd54-45fb45be9397", "metadata": {}, - "outputs": [ - { - "name": "stdin", - "output_type": "stream", - "text": [ - "Please enter your Unity username: drewm\n", - "Please enter your Unity password: ········\n" - ] - } - ], + "outputs": [], "source": [ "unity = Unity(UnityEnvironments.DEV)\n", "unity.set_venue_id(\"\")\n", @@ -44,17 +36,17 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 4, "id": "9d9f712d-6d80-4b27-a8dc-b12e3895ba59", "metadata": {}, "outputs": [], "source": [ - "process_service.endpoint = \"http://k8s-sps-ogcproce-b59e4702b8-2034669822.us-west-2.elb.amazonaws.com:5001\"" + "process_service.endpoint = input(\"Please enter the URL for the OGC Processes API: \")" ] }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 5, "id": "865f0b16-c954-45a9-984a-953be93749a3", "metadata": {}, "outputs": [], @@ -64,7 +56,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 6, "id": "199331bb-0414-4846-a61a-0b43b1142924", "metadata": {}, "outputs": [ @@ -78,6 +70,20 @@ " title=\"Generic CWL Process\",\n", " abstract=\"This process executes any CWL workflow.\",\n", " keywords=\"None\"\n", + ")\n", + "unity_sds_client.resources.Process(\n", + " id=\"sbg_preprocess_cwl_dag\",\n", + " process_version=\"1.0.0\"\n", + " title=\"SBG Preprocess CWL Workflow\",\n", + " abstract=\"This process executes the SBG Preprocess Workflow using CWL.\",\n", + " keywords=\"None\"\n", + ")\n", + "unity_sds_client.resources.Process(\n", + " id=\"karpenter_test\",\n", + " process_version=\"1.0.0\"\n", + " title=\"Karpenter Test Process\",\n", + " abstract=\"This process tests Karpenter node provisioning with different instance types.\",\n", + " keywords=\"None\"\n", ")\n" ] } @@ -89,7 +95,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 7, "id": "399a8c39-a69b-49a8-b9b1-03de6b3bc62f", "metadata": {}, "outputs": [], @@ -99,7 +105,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 8, "id": "04dee225-aea0-4132-b427-dbd26085986e", "metadata": {}, "outputs": [ @@ -123,7 +129,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 9, "id": "667f1082-9ce1-473d-8e8e-f96deb974dab", "metadata": {}, "outputs": [], @@ -136,18 +142,15 @@ }, { "cell_type": "code", - "execution_count": 29, - "id": "4057003a-ccec-4321-8c12-404d7ff1275a", + "execution_count": 11, + "id": "f08adb26-822e-4e01-8ec1-fbb4eb58bd26", "metadata": {}, "outputs": [], "source": [ - "# Here we submit the job. Currently we submit a dictionary with the required 'inputs', 'outputs','subcscriber' keys if needed\n", - "# We need to focus on building out the process_inputs progrmatically.\n", - "\n", "data = {\n", " \"inputs\": {\n", - " \"cwl_workflow\": \"https://raw.githubusercontent.com/unity-sds/unity-sps-workflows/main/demos/echo_message.cwl\",\n", - " \"cwl_args\": \"https://raw.githubusercontent.com/unity-sds/unity-sps-workflows/main/demos/echo_message.yaml\",\n", + " \"cwl_workflow\": \"https://raw.githubusercontent.com/unity-sds/sbg-workflows/main/preprocess/sbg-preprocess-workflow.cwl\",\n", + " \"cwl_args\": \"https://raw.githubusercontent.com/unity-sds/sbg-workflows/main/preprocess/sbg-preprocess-workflow.dev.yml\",\n", " \"request_memory\": \"8Gi\",\n", " \"request_cpu\": \"4\",\n", " \"request_storage\": \"10Gi\"\n", @@ -158,20 +161,24 @@ " }\n", " }\n", "}\n", + "\n", "submitted_job = process.execute(data)" ] }, { "cell_type": "code", - "execution_count": 39, - "id": "f08adb26-822e-4e01-8ec1-fbb4eb58bd26", + "execution_count": 14, + "id": "cc2e7fc1-0d54-45b3-9039-ce54d5336cd3", "metadata": {}, "outputs": [], "source": [ + "# Here we submit the job. Currently we submit a dictionary with the required 'inputs', 'outputs','subcscriber' keys if needed\n", + "# We need to focus on building out the process_inputs progrmatically.\n", + "\n", "data = {\n", " \"inputs\": {\n", - " \"cwl_workflow\": \"https://raw.githubusercontent.com/unity-sds/sbg-workflows/main/preprocess/sbg-preprocess-workflow.cwl\",\n", - " \"cwl_args\": \"https://raw.githubusercontent.com/unity-sds/sbg-workflows/main/preprocess/sbg-preprocess-workflow.dev.yml\",\n", + " \"cwl_workflow\": \"https://raw.githubusercontent.com/unity-sds/unity-sps-workflows/main/demos/echo_message.cwl\",\n", + " \"cwl_args\": \"{'message': 'Hello Godwin!'}\",\n", " \"request_memory\": \"8Gi\",\n", " \"request_cpu\": \"4\",\n", " \"request_storage\": \"10Gi\"\n", @@ -182,21 +189,69 @@ " }\n", " }\n", "}\n", - "\n", "submitted_job = process.execute(data)" ] }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 15, "id": "a18a5727-750c-4307-b77c-7389d4ccc0f4", - "metadata": {}, + "metadata": { + "scrolled": true + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Job 07f019a0-4689-4a19-b1f4-b39b97ad918f completed with status JobStatus.FAILED\n" + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", + "Job 73661a71-2e87-485e-bf18-e527c84f5d72 completed with status JobStatus.SUCCESSFUL\n" ] } ], From 100dec58bb617691b8906de7147418fd71d8fdfc Mon Sep 17 00:00:00 2001 From: mike-gangl Date: Fri, 27 Sep 2024 09:02:22 -0700 Subject: [PATCH 7/7] Updated memory for pre-process API otherwise it's slooooooow --- libs/unity-py/notebooks/ogc_notebook.ipynb | 392 +++++++++------------ 1 file changed, 166 insertions(+), 226 deletions(-) diff --git a/libs/unity-py/notebooks/ogc_notebook.ipynb b/libs/unity-py/notebooks/ogc_notebook.ipynb index 687fbba..94f84b5 100644 --- a/libs/unity-py/notebooks/ogc_notebook.ipynb +++ b/libs/unity-py/notebooks/ogc_notebook.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 18, + "execution_count": 1, "id": "700eddd2-77af-4849-8343-3f0fef34ff73", "metadata": { "is_executing": true @@ -24,7 +24,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "id": "4029cee7-9c5b-4ac1-bd54-45fb45be9397", "metadata": {}, "outputs": [], @@ -36,17 +36,25 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 3, "id": "9d9f712d-6d80-4b27-a8dc-b12e3895ba59", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdin", + "output_type": "stream", + "text": [ + "Please enter the URL for the OGC Processes API: http://unity-dev-httpd-alb-601260108.us-west-2.elb.amazonaws.com:8080/unity/dev/ogc\n" + ] + } + ], "source": [ "process_service.endpoint = input(\"Please enter the URL for the OGC Processes API: \")" ] }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 4, "id": "865f0b16-c954-45a9-984a-953be93749a3", "metadata": {}, "outputs": [], @@ -56,7 +64,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 5, "id": "199331bb-0414-4846-a61a-0b43b1142924", "metadata": {}, "outputs": [ @@ -95,7 +103,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 6, "id": "399a8c39-a69b-49a8-b9b1-03de6b3bc62f", "metadata": {}, "outputs": [], @@ -105,7 +113,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 7, "id": "04dee225-aea0-4132-b427-dbd26085986e", "metadata": {}, "outputs": [ @@ -142,7 +150,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 10, "id": "f08adb26-822e-4e01-8ec1-fbb4eb58bd26", "metadata": {}, "outputs": [], @@ -151,7 +159,7 @@ " \"inputs\": {\n", " \"cwl_workflow\": \"https://raw.githubusercontent.com/unity-sds/sbg-workflows/main/preprocess/sbg-preprocess-workflow.cwl\",\n", " \"cwl_args\": \"https://raw.githubusercontent.com/unity-sds/sbg-workflows/main/preprocess/sbg-preprocess-workflow.dev.yml\",\n", - " \"request_memory\": \"8Gi\",\n", + " \"request_memory\": \"16Gi\",\n", " \"request_cpu\": \"4\",\n", " \"request_storage\": \"10Gi\"\n", " },\n", @@ -194,7 +202,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 11, "id": "a18a5727-750c-4307-b77c-7389d4ccc0f4", "metadata": { "scrolled": true @@ -204,54 +212,142 @@ "name": "stdout", "output_type": "stream", "text": [ - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "job 73661a71-2e87-485e-bf18-e527c84f5d72 is not complete. Currently in state JobStatus.RUNNING \n", - "Job 73661a71-2e87-485e-bf18-e527c84f5d72 completed with status JobStatus.SUCCESSFUL\n" + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "job f95593c2-2f50-4c51-92eb-919a5e9ba31e is not complete. Currently in state JobStatus.RUNNING \n", + "Job f95593c2-2f50-4c51-92eb-919a5e9ba31e completed with status JobStatus.SUCCESSFUL\n" ] } ], @@ -269,7 +365,7 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 12, "id": "ce1ae133-4a84-434e-b0b9-defbab57af9a", "metadata": {}, "outputs": [ @@ -279,7 +375,7 @@ "{}" ] }, - "execution_count": 41, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -314,7 +410,7 @@ }, { "cell_type": "code", - "execution_count": 46, + "execution_count": 15, "id": "ae823803-05cf-420f-a8de-dd88157f7bfe", "metadata": {}, "outputs": [], @@ -324,7 +420,7 @@ }, { "cell_type": "code", - "execution_count": 44, + "execution_count": 16, "id": "af2caec6-f393-433f-86ba-24b178bdef12", "metadata": {}, "outputs": [ @@ -333,171 +429,15 @@ "output_type": "stream", "text": [ "unity_sds_client.resources.Job(\n", - " id=\"e1821394-e31f-42c5-9637-07496a207ebf\",\n", - " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"fb1f5df1-916e-4344-a6e7-14ff49ee8a66\",\n", - " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"56ceb552-e100-4ed4-a270-32adbdf71cf9\",\n", - " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"4600b598-4961-4252-9744-ffca5c886c1b\",\n", - " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"9db56c05-ce88-4d13-895e-797f842d6672\",\n", - " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"2cfa3efa-c13e-4dda-ad55-c53eeb8ca06e\",\n", - " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"2caffa01-da12-4538-a40a-833a201313ef\",\n", - " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"362b3100-64a8-42f8-ae66-e816e050fd74\",\n", - " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"6e4e953b-80de-44a4-9ba2-e4780d6c25d0\",\n", - " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"ccfc8a66-8cc8-419c-8187-289353ccaa4a\",\n", - " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"6eb4ad16-6c08-4c06-ba85-f508a01fe561\",\n", - " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"55356a79-5165-41b7-82a4-6dd504060dac\",\n", - " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"388ecf36-75df-4564-8856-9d221beb1d85\",\n", - " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"749ace55-5581-446b-9c8e-fb085352f32a\",\n", - " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"5eca3329-7f2c-42a2-86e8-f89dbc453b1d\",\n", - " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"84e50527-6d8e-43ad-b05e-3187637d3df7\",\n", - " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"46dc76d8-94e9-4996-869a-f7c6c6d11d38\",\n", - " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"14c2c766-9574-422d-a3a7-0358dba8be3a\",\n", - " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"9debb87a-ef44-4525-987e-eaa0c920c7e3\",\n", - " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"126d3595-4dc5-4c4f-b7b6-a020f00d635a\",\n", - " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"1d643333-f8b0-4a91-b3e5-2d266dc01f40\",\n", - " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"6df86f8a-569d-4b8e-8c54-64c662df93e8\",\n", - " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"9974e9dc-994d-418e-95a6-951cfe811b4d\",\n", - " process=\"cwl_dag\",\n", - " status=\"failed\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"68cbd1d9-59d1-4e6d-9cad-7f9bb22cf03d\",\n", - " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"fae566d0-dc17-461e-9b8e-12d7e259f3b3\",\n", - " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"0073ff64-3315-49a4-b41f-7d4310e7c9be\",\n", - " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", - " inputs=None\n", - ")\n", - "unity_sds_client.resources.Job(\n", - " id=\"df16615f-dc2d-4959-84ef-9217f5b631f4\",\n", + " id=\"9cc061b4-a7dc-46ab-b01b-20bb2a5208bd\",\n", " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", + " status=\"running\",\n", " inputs=None\n", ")\n", "unity_sds_client.resources.Job(\n", - " id=\"9eff909f-1941-42a4-ab92-98579fbe0cdf\",\n", + " id=\"f95593c2-2f50-4c51-92eb-919a5e9ba31e\",\n", " process=\"cwl_dag\",\n", - " status=\"accepted\",\n", + " status=\"successful\",\n", " inputs=None\n", ")\n" ] @@ -519,9 +459,9 @@ ], "metadata": { "kernelspec": { - "display_name": "unity-monorepo", + "display_name": "Python 3 (ipykernel)", "language": "python", - "name": "unity-monorepo" + "name": "python3" }, "language_info": { "codemirror_mode": { @@ -533,7 +473,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.0" + "version": "3.12.4" } }, "nbformat": 4,