From 767f1e22e9429154934e50ce25cd861c2d3af455 Mon Sep 17 00:00:00 2001 From: "yuenhern96@gmail.com" Date: Thu, 13 Oct 2022 19:51:22 +0800 Subject: [PATCH 01/10] Add core and basic RPA components --- xai_components/xai_rpa/__init__.py | 0 xai_components/xai_rpa/requirements.txt | 1 + xai_components/xai_rpa/tebelorg_rpa_basic.py | 31 +++++ xai_components/xai_rpa/tebelorg_rpa_core.py | 122 +++++++++++++++++++ 4 files changed, 154 insertions(+) create mode 100644 xai_components/xai_rpa/__init__.py create mode 100644 xai_components/xai_rpa/requirements.txt create mode 100644 xai_components/xai_rpa/tebelorg_rpa_basic.py create mode 100644 xai_components/xai_rpa/tebelorg_rpa_core.py diff --git a/xai_components/xai_rpa/__init__.py b/xai_components/xai_rpa/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/xai_components/xai_rpa/requirements.txt b/xai_components/xai_rpa/requirements.txt new file mode 100644 index 00000000..26b9746b --- /dev/null +++ b/xai_components/xai_rpa/requirements.txt @@ -0,0 +1 @@ +rpa \ No newline at end of file diff --git a/xai_components/xai_rpa/tebelorg_rpa_basic.py b/xai_components/xai_rpa/tebelorg_rpa_basic.py new file mode 100644 index 00000000..377464f9 --- /dev/null +++ b/xai_components/xai_rpa/tebelorg_rpa_basic.py @@ -0,0 +1,31 @@ +from xai_components.base import InArg, OutArg, Component, xai_component + +@xai_component +class RpaUrl(Component): + """Opens the browser with specified URL. + + ### Reference: + - [RPA-Python Basic Functions](https://github.com/tebelorg/RPA-Python#basic-functions) + + ##### inPorts: + - url: The URL to be accessed in the browser. + Default: None + + ##### outPorts: + - None + """ + url: InArg[str] + + def __init__(self): + self.url = InArg.empty() + self.done = False + + def execute(self, ctx) -> None: + url = self.url.value + print(f"Opening {url} on browser...") + + import rpa as r + r.url(webpage_url=url) + print(f"Browser opened with URL {url}.") + + self.done = False \ No newline at end of file diff --git a/xai_components/xai_rpa/tebelorg_rpa_core.py b/xai_components/xai_rpa/tebelorg_rpa_core.py new file mode 100644 index 00000000..ecbaa7b1 --- /dev/null +++ b/xai_components/xai_rpa/tebelorg_rpa_core.py @@ -0,0 +1,122 @@ +from xai_components.base import InArg, OutArg, Component, xai_component + +@xai_component +class RpaInit(Component): + """Initiates RPA bot. + + ### Reference: + - [RPA-Python Core Functions](https://github.com/tebelorg/RPA-Python#core-functions) + + ##### inPorts: + - visual: Initiate workflow that involves images as bot input. + Default: False + - chrome: Whether to use Chrome as default browser. + Default: True + - turbo: To run workflow 10x faster. By default, bot runs at human speed. + Default: False + + ##### outPorts: + - None + """ + visual: InArg[bool] + chrome: InArg[bool] + turbo: InArg[bool] + + def __init__(self): + self.visual = InArg(False) + self.chrome = InArg(True) + self.turbo = InArg(False) + self.done = False + + def execute(self, ctx) -> None: + visual = self.visual.value + chrome = self.chrome.value + turbo = self.turbo.value + print(f"Visual automation: {visual}, Chrome: {chrome}, Turbo: {turbo}") + + import rpa as r + r.init(visual_automation=visual, chrome_browser=chrome, turbo_mode=turbo) + print("Bot initiated.") + + self.done = False + +@xai_component +class RpaClose(Component): + """Shutsdown the RPA bot. + + ### Reference: + - [RPA-Python Core Functions](https://github.com/tebelorg/RPA-Python#core-functions) + + ##### inPorts: + - None + + ##### outPorts: + - None + """ + def __init__(self): + self.done = False + + def execute(self, ctx) -> None: + print("Closing RPA...") + import rpa as r + r.close() + + self.done = False + +@xai_component +class RpaError(Component): + """Raises exception on error. + + ### Reference: + - [RPA-Python Core Functions](https://github.com/tebelorg/RPA-Python#core-functions) + + ##### inPorts: + - raise_exception: Raise exception on error. + Default: False + + ##### outPorts: + - None + """ + raise_exception: InArg[bool] + + def __init__(self): + self.raise_exception = InArg(False) + self.done = False + + def execute(self, ctx) -> None: + raise_exception = self.raise_exception.value + + import rpa as r + r.error(raise_exception) + print("Exception will be raised on error.") + + self.done = False + +@xai_component +class RpaDebug(Component): + """Print & log debug info to `rpa_python.log`. + + ### Reference: + - [RPA-Python Core Functions](https://github.com/tebelorg/RPA-Python#core-functions) + + ##### inPorts: + - debug_log: Print and log debug info. + Default: True + + ##### outPorts: + - None + """ + debug_log: InArg[bool] + + def __init__(self): + self.debug_log = InArg(True) + self.done = False + + def execute(self, ctx) -> None: + debug_log = self.debug_log.value + + import rpa as r + r.debug(debug_log) + print("Debug info will be logged to `rpa_python.log`.") + + self.done = False \ No newline at end of file From eb1fc905f728340b2dc22727361ba716899073a9 Mon Sep 17 00:00:00 2001 From: "yuenhern96@gmail.com" Date: Wed, 30 Nov 2022 23:50:57 +0800 Subject: [PATCH 02/10] add RPA open webpage example --- examples/RpaOpenWebpage.xircuits | 776 +++++++++++++++++++++++++++++++ 1 file changed, 776 insertions(+) create mode 100644 examples/RpaOpenWebpage.xircuits diff --git a/examples/RpaOpenWebpage.xircuits b/examples/RpaOpenWebpage.xircuits new file mode 100644 index 00000000..c6ade8f7 --- /dev/null +++ b/examples/RpaOpenWebpage.xircuits @@ -0,0 +1,776 @@ +{ + "id": "2578938c-5c3b-4979-8fee-09de9b611f79", + "offsetX": 2.6524220032840855, + "offsetY": 6.0681228934405125, + "zoom": 98.33333333333333, + "gridSize": 0, + "layers": [ + { + "id": "6fea37f9-0a31-4e92-858a-1bcf5fb56b60", + "type": "diagram-links", + "isSvg": true, + "transformed": true, + "models": { + "38ac0246-075a-4ad7-8fde-4bc5eec7a784": { + "id": "38ac0246-075a-4ad7-8fde-4bc5eec7a784", + "type": "triangle", + "selected": false, + "source": "c16f8740-515f-43ae-86ad-8df3808c627f", + "sourcePort": "5d56bcc1-bdf1-4cf6-bd18-afa51fc5ae3a", + "target": "ff1d2ed7-cb31-4b9c-bbda-30ca86c81340", + "targetPort": "322553b0-f35a-4b51-9182-7b21a7d89aba", + "points": [ + { + "id": "0f49f2ec-5373-455d-976b-ea8a125d709c", + "type": "point", + "x": 138.703, + "y": 134.641 + }, + { + "id": "9b0fbc32-4de0-4add-b455-08939ce5a926", + "type": "point", + "x": 244.5, + "y": 149.641 + } + ], + "labels": [], + "width": 3, + "color": "gray", + "curvyness": 50, + "selectedColor": "rgb(0,192,255)" + }, + "ff7be6b4-3f34-4a63-b7ac-e2c4d8b1981a": { + "id": "ff7be6b4-3f34-4a63-b7ac-e2c4d8b1981a", + "type": "custom", + "selected": false, + "source": "c181e114-8249-433c-b540-780110fd8fce", + "sourcePort": "0efb559b-6706-4c1c-b475-c1875080eb08", + "target": "ff1d2ed7-cb31-4b9c-bbda-30ca86c81340", + "targetPort": "82afd8d3-7fbd-4dea-88eb-4473a0e3f4cb", + "points": [ + { + "id": "3e714bca-f58c-4cde-8671-11d714140f58", + "type": "point", + "x": 147.437, + "y": 236.641 + }, + { + "id": "2c79301e-f75a-4fea-bc7a-05b6de847861", + "type": "point", + "x": 244.5, + "y": 165.641 + } + ], + "labels": [], + "width": 3, + "color": "gray", + "curvyness": 50, + "selectedColor": "rgb(0,192,255)" + }, + "a807d801-4196-4f36-b4d6-f5ab37675ee4": { + "id": "a807d801-4196-4f36-b4d6-f5ab37675ee4", + "type": "custom", + "selected": false, + "source": "7a651a2e-6f9b-4c0f-844f-c23fc566f7c8", + "sourcePort": "aad174ca-0bb2-4ffb-8a79-d8d47306fad6", + "target": "ff1d2ed7-cb31-4b9c-bbda-30ca86c81340", + "targetPort": "62b35b48-e5a8-4cf0-87ce-2e49f5ae9a2e", + "points": [ + { + "id": "1c93b670-edb8-4596-8e4d-90ec655b466e", + "type": "point", + "x": 138.531, + "y": 311.641 + }, + { + "id": "313a4167-1001-49c6-ae1f-a9d3a93da686", + "type": "point", + "x": 244.5, + "y": 181.641 + } + ], + "labels": [], + "width": 3, + "color": "gray", + "curvyness": 50, + "selectedColor": "rgb(0,192,255)" + }, + "5f388164-7d73-4d07-b738-74c8efcdb8a7": { + "id": "5f388164-7d73-4d07-b738-74c8efcdb8a7", + "type": "custom", + "selected": false, + "source": "96eacf9f-d457-49f4-a1bb-40123b54db12", + "sourcePort": "19d57fd2-e9c3-4c34-b933-851f557c787d", + "target": "ff1d2ed7-cb31-4b9c-bbda-30ca86c81340", + "targetPort": "0eedcbc7-9072-4644-8cb8-c01de4d1f69c", + "points": [ + { + "id": "e395243d-63c9-43a3-87f6-ec8d45a8e147", + "type": "point", + "x": 140.438, + "y": 388.641 + }, + { + "id": "2d953898-86d7-4d5e-ac2d-cff01243f70a", + "type": "point", + "x": 244.5, + "y": 197.641 + } + ], + "labels": [], + "width": 3, + "color": "gray", + "curvyness": 50, + "selectedColor": "rgb(0,192,255)" + }, + "1ebdf481-8a64-4be4-9195-b3c3c53b8916": { + "id": "1ebdf481-8a64-4be4-9195-b3c3c53b8916", + "type": "custom", + "selected": false, + "source": "5e937391-4f29-4e97-98ed-535e64e01fc1", + "sourcePort": "45e414ea-4544-4d8d-9ec8-ec8519cb30a6", + "target": "24977fdc-3f42-40fe-9894-d2b8904930a5", + "targetPort": "f31a4058-8c86-4b59-a877-136676a701eb", + "points": [ + { + "id": "6a404cdb-3054-4a4f-8f51-04f64e262168", + "type": "point", + "x": 424.875, + "y": 303.641 + }, + { + "id": "46f9f573-a9e1-475c-bc0d-ab6bb1ea38f1", + "type": "point", + "x": 500.5, + "y": 171.641 + } + ], + "labels": [], + "width": 3, + "color": "gray", + "curvyness": 50, + "selectedColor": "rgb(0,192,255)" + }, + "849f5d76-88a2-464b-856e-30d5980f39c4": { + "id": "849f5d76-88a2-464b-856e-30d5980f39c4", + "type": "triangle", + "selected": false, + "source": "ff1d2ed7-cb31-4b9c-bbda-30ca86c81340", + "sourcePort": "6dc84472-ff56-4c6d-865f-623db7cf49e9", + "target": "24977fdc-3f42-40fe-9894-d2b8904930a5", + "targetPort": "c21aeb08-823a-4406-b092-4ac7eaef1ecf", + "points": [ + { + "id": "7f36ca44-34bb-4a43-a4ef-860817e52516", + "type": "point", + "x": 352.391, + "y": 149.641 + }, + { + "id": "4e84bc6d-c893-4c7c-a8cf-faaa17850e6d", + "type": "point", + "x": 500.5, + "y": 155.641 + } + ], + "labels": [], + "width": 3, + "color": "gray", + "curvyness": 50, + "selectedColor": "rgb(0,192,255)" + }, + "45c7650b-50d5-4c79-a854-44078cadbd29": { + "id": "45c7650b-50d5-4c79-a854-44078cadbd29", + "type": "triangle", + "selected": false, + "source": "c927f4f2-a5a8-43b5-998e-e4691bac4fa5", + "sourcePort": "6aa91c6a-24c9-4d3d-b922-c6f29fbd9349", + "target": "0b0a2e67-e94a-43d5-a274-82a72752e082", + "targetPort": "f72c36f9-d3b8-4e9d-8c20-57953eeaf4e4", + "points": [ + { + "id": "f7e9bf53-9946-416b-9b34-31c26ec08b79", + "type": "point", + "x": 945.438, + "y": 140.781 + }, + { + "id": "fcda73b2-4328-45e2-888a-bb8d7d1122ac", + "type": "point", + "x": 1031.719, + "y": 136.391 + } + ], + "labels": [], + "width": 3, + "color": "gray", + "curvyness": 50, + "selectedColor": "rgb(0,192,255)" + }, + "75137d6d-16a8-4b2c-aca6-8f7f828af2fe": { + "id": "75137d6d-16a8-4b2c-aca6-8f7f828af2fe", + "type": "triangle", + "selected": false, + "source": "24977fdc-3f42-40fe-9894-d2b8904930a5", + "sourcePort": "d3b10cde-f02a-4899-aa21-374d83b5e223", + "target": "61597405-bbf7-4b65-b6ad-942bb074b149", + "targetPort": "88ad3972-3a98-401d-a57c-a92011893713", + "points": [ + { + "id": "93bacf35-60f9-472d-9fc6-17dd15f511d4", + "type": "point", + "x": 583.937, + "y": 155.641 + }, + { + "id": "b14aabbd-0854-49ff-b596-b11cc88ad807", + "type": "point", + "x": 661.703, + "y": 155.578 + } + ], + "labels": [], + "width": 3, + "color": "gray", + "curvyness": 50, + "selectedColor": "rgb(0,192,255)" + }, + "dfa7fcbf-b008-4e9b-8b91-7d73445bd652": { + "id": "dfa7fcbf-b008-4e9b-8b91-7d73445bd652", + "type": "triangle", + "selected": false, + "source": "61597405-bbf7-4b65-b6ad-942bb074b149", + "sourcePort": "4df5099f-b6cb-42bc-99b7-e016c93883c5", + "target": "c927f4f2-a5a8-43b5-998e-e4691bac4fa5", + "targetPort": "9c671f84-1194-4cd3-8390-db9c7f2d9c26", + "points": [ + { + "id": "83ae3f43-bebd-4677-acce-cbe2d52c7f34", + "type": "point", + "x": 789.766, + "y": 155.578 + }, + { + "id": "fadd6530-fe47-4ed5-8f76-944c209af5fe", + "type": "point", + "x": 868.125, + "y": 140.781 + } + ], + "labels": [], + "width": 3, + "color": "gray", + "curvyness": 50, + "selectedColor": "rgb(0,192,255)" + } + } + }, + { + "id": "a2054cba-a21a-450f-a51a-18c2512da691", + "type": "diagram-nodes", + "isSvg": false, + "transformed": true, + "models": { + "c16f8740-515f-43ae-86ad-8df3808c627f": { + "id": "c16f8740-515f-43ae-86ad-8df3808c627f", + "type": "custom-node", + "selected": false, + "extras": { + "type": "Start", + "borderColor": "rgb(0,192,255)" + }, + "x": 100, + "y": 100, + "ports": [ + { + "id": "5d56bcc1-bdf1-4cf6-bd18-afa51fc5ae3a", + "type": "default", + "x": 131.203, + "y": 127.141, + "name": "out-0", + "alignment": "right", + "parentNode": "c16f8740-515f-43ae-86ad-8df3808c627f", + "links": [ + "38ac0246-075a-4ad7-8fde-4bc5eec7a784" + ], + "in": false, + "label": "▶" + } + ], + "name": "Start", + "color": "rgb(255,102,102)", + "portsInOrder": [], + "portsOutOrder": [ + "5d56bcc1-bdf1-4cf6-bd18-afa51fc5ae3a" + ] + }, + "0b0a2e67-e94a-43d5-a274-82a72752e082": { + "id": "0b0a2e67-e94a-43d5-a274-82a72752e082", + "type": "custom-node", + "selected": false, + "extras": { + "type": "Finish", + "borderColor": "rgb(0,192,255)" + }, + "x": 1022.22, + "y": 101.763, + "ports": [ + { + "id": "f72c36f9-d3b8-4e9d-8c20-57953eeaf4e4", + "type": "default", + "x": 1024.219, + "y": 128.891, + "name": "in-0", + "alignment": "left", + "parentNode": "0b0a2e67-e94a-43d5-a274-82a72752e082", + "links": [ + "45c7650b-50d5-4c79-a854-44078cadbd29" + ], + "in": true, + "label": "▶" + } + ], + "name": "Finish", + "color": "rgb(255,102,102)", + "portsInOrder": [ + "f72c36f9-d3b8-4e9d-8c20-57953eeaf4e4" + ], + "portsOutOrder": [] + }, + "c181e114-8249-433c-b540-780110fd8fce": { + "id": "c181e114-8249-433c-b540-780110fd8fce", + "type": "custom-node", + "selected": false, + "extras": { + "type": "boolean", + "borderColor": "rgb(0,192,255)" + }, + "x": 83, + "y": 202, + "ports": [ + { + "id": "0efb559b-6706-4c1c-b475-c1875080eb08", + "type": "default", + "x": 139.937, + "y": 229.141, + "name": "out-0", + "alignment": "right", + "parentNode": "c181e114-8249-433c-b540-780110fd8fce", + "links": [ + "ff7be6b4-3f34-4a63-b7ac-e2c4d8b1981a" + ], + "in": false, + "label": "False" + } + ], + "name": "Literal False", + "color": "rgb(255,204,0)", + "portsInOrder": [], + "portsOutOrder": [ + "0efb559b-6706-4c1c-b475-c1875080eb08" + ] + }, + "7a651a2e-6f9b-4c0f-844f-c23fc566f7c8": { + "id": "7a651a2e-6f9b-4c0f-844f-c23fc566f7c8", + "type": "custom-node", + "selected": false, + "extras": { + "type": "boolean", + "borderColor": "rgb(0,192,255)" + }, + "x": 79, + "y": 277, + "ports": [ + { + "id": "aad174ca-0bb2-4ffb-8a79-d8d47306fad6", + "type": "default", + "x": 131.031, + "y": 304.141, + "name": "out-0", + "alignment": "right", + "parentNode": "7a651a2e-6f9b-4c0f-844f-c23fc566f7c8", + "links": [ + "a807d801-4196-4f36-b4d6-f5ab37675ee4" + ], + "in": false, + "label": "True" + } + ], + "name": "Literal True", + "color": "rgb(255,153,0)", + "portsInOrder": [], + "portsOutOrder": [ + "aad174ca-0bb2-4ffb-8a79-d8d47306fad6" + ] + }, + "96eacf9f-d457-49f4-a1bb-40123b54db12": { + "id": "96eacf9f-d457-49f4-a1bb-40123b54db12", + "type": "custom-node", + "selected": false, + "extras": { + "type": "boolean", + "borderColor": "rgb(0,192,255)" + }, + "x": 76, + "y": 354, + "ports": [ + { + "id": "19d57fd2-e9c3-4c34-b933-851f557c787d", + "type": "default", + "x": 132.938, + "y": 381.141, + "name": "out-0", + "alignment": "right", + "parentNode": "96eacf9f-d457-49f4-a1bb-40123b54db12", + "links": [ + "5f388164-7d73-4d07-b738-74c8efcdb8a7" + ], + "in": false, + "label": "False" + } + ], + "name": "Literal False", + "color": "rgb(255,204,0)", + "portsInOrder": [], + "portsOutOrder": [ + "19d57fd2-e9c3-4c34-b933-851f557c787d" + ] + }, + "5e937391-4f29-4e97-98ed-535e64e01fc1": { + "id": "5e937391-4f29-4e97-98ed-535e64e01fc1", + "type": "custom-node", + "selected": false, + "extras": { + "type": "string", + "borderColor": "rgb(0,192,255)" + }, + "x": 289, + "y": 269, + "ports": [ + { + "id": "45e414ea-4544-4d8d-9ec8-ec8519cb30a6", + "type": "default", + "x": 417.375, + "y": 296.141, + "name": "out-0", + "alignment": "right", + "parentNode": "5e937391-4f29-4e97-98ed-535e64e01fc1", + "links": [ + "1ebdf481-8a64-4be4-9195-b3c3c53b8916" + ], + "in": false, + "label": "https://www.xpress.ai/" + } + ], + "name": "Literal String", + "color": "rgb(15,255,255)", + "portsInOrder": [], + "portsOutOrder": [ + "45e414ea-4544-4d8d-9ec8-ec8519cb30a6" + ] + }, + "ff1d2ed7-cb31-4b9c-bbda-30ca86c81340": { + "id": "ff1d2ed7-cb31-4b9c-bbda-30ca86c81340", + "type": "custom-node", + "selected": false, + "extras": { + "type": "debug", + "path": "xai_components/xai_rpa/rpa_init.py", + "description": null, + "lineNo": [ + { + "lineno": 4, + "end_lineno": 24 + } + ], + "borderColor": "rgb(0,192,255)" + }, + "x": 235, + "y": 115, + "ports": [ + { + "id": "322553b0-f35a-4b51-9182-7b21a7d89aba", + "type": "default", + "x": 237, + "y": 142.141, + "name": "in-0", + "alignment": "left", + "parentNode": "ff1d2ed7-cb31-4b9c-bbda-30ca86c81340", + "links": [ + "38ac0246-075a-4ad7-8fde-4bc5eec7a784" + ], + "in": true, + "label": "▶" + }, + { + "id": "6dc84472-ff56-4c6d-865f-623db7cf49e9", + "type": "default", + "x": 344.891, + "y": 142.141, + "name": "out-0", + "alignment": "right", + "parentNode": "ff1d2ed7-cb31-4b9c-bbda-30ca86c81340", + "links": [ + "849f5d76-88a2-464b-856e-30d5980f39c4" + ], + "in": false, + "label": "▶" + }, + { + "id": "82afd8d3-7fbd-4dea-88eb-4473a0e3f4cb", + "type": "default", + "x": 237, + "y": 158.141, + "name": "parameter-boolean-visual", + "alignment": "left", + "parentNode": "ff1d2ed7-cb31-4b9c-bbda-30ca86c81340", + "links": [ + "ff7be6b4-3f34-4a63-b7ac-e2c4d8b1981a" + ], + "in": true, + "label": "visual" + }, + { + "id": "62b35b48-e5a8-4cf0-87ce-2e49f5ae9a2e", + "type": "default", + "x": 237, + "y": 174.141, + "name": "parameter-boolean-chrome", + "alignment": "left", + "parentNode": "ff1d2ed7-cb31-4b9c-bbda-30ca86c81340", + "links": [ + "a807d801-4196-4f36-b4d6-f5ab37675ee4" + ], + "in": true, + "label": "chrome" + }, + { + "id": "0eedcbc7-9072-4644-8cb8-c01de4d1f69c", + "type": "default", + "x": 237, + "y": 190.141, + "name": "parameter-boolean-turbo", + "alignment": "left", + "parentNode": "ff1d2ed7-cb31-4b9c-bbda-30ca86c81340", + "links": [ + "5f388164-7d73-4d07-b738-74c8efcdb8a7" + ], + "in": true, + "label": "turbo" + } + ], + "name": "RpaInit", + "color": "rgb(255,153,102)", + "portsInOrder": [ + "322553b0-f35a-4b51-9182-7b21a7d89aba", + "82afd8d3-7fbd-4dea-88eb-4473a0e3f4cb", + "62b35b48-e5a8-4cf0-87ce-2e49f5ae9a2e", + "0eedcbc7-9072-4644-8cb8-c01de4d1f69c" + ], + "portsOutOrder": [ + "6dc84472-ff56-4c6d-865f-623db7cf49e9" + ] + }, + "24977fdc-3f42-40fe-9894-d2b8904930a5": { + "id": "24977fdc-3f42-40fe-9894-d2b8904930a5", + "type": "custom-node", + "selected": false, + "extras": { + "type": "debug", + "path": "xai_components/xai_rpa/rpa_url.py", + "description": null, + "lineNo": [ + { + "lineno": 4, + "end_lineno": 18 + } + ], + "borderColor": "rgb(0,192,255)" + }, + "x": 491, + "y": 121, + "ports": [ + { + "id": "c21aeb08-823a-4406-b092-4ac7eaef1ecf", + "type": "default", + "x": 493, + "y": 148.141, + "name": "in-0", + "alignment": "left", + "parentNode": "24977fdc-3f42-40fe-9894-d2b8904930a5", + "links": [ + "849f5d76-88a2-464b-856e-30d5980f39c4" + ], + "in": true, + "label": "▶" + }, + { + "id": "d3b10cde-f02a-4899-aa21-374d83b5e223", + "type": "default", + "x": 576.437, + "y": 148.141, + "name": "out-0", + "alignment": "right", + "parentNode": "24977fdc-3f42-40fe-9894-d2b8904930a5", + "links": [ + "75137d6d-16a8-4b2c-aca6-8f7f828af2fe" + ], + "in": false, + "label": "▶" + }, + { + "id": "f31a4058-8c86-4b59-a877-136676a701eb", + "type": "default", + "x": 493, + "y": 164.141, + "name": "parameter-string-url", + "alignment": "left", + "parentNode": "24977fdc-3f42-40fe-9894-d2b8904930a5", + "links": [ + "1ebdf481-8a64-4be4-9195-b3c3c53b8916" + ], + "in": true, + "label": "url" + } + ], + "name": "RpaUrl", + "color": "rgb(255,102,102)", + "portsInOrder": [ + "c21aeb08-823a-4406-b092-4ac7eaef1ecf", + "f31a4058-8c86-4b59-a877-136676a701eb" + ], + "portsOutOrder": [ + "d3b10cde-f02a-4899-aa21-374d83b5e223" + ] + }, + "c927f4f2-a5a8-43b5-998e-e4691bac4fa5": { + "id": "c927f4f2-a5a8-43b5-998e-e4691bac4fa5", + "type": "custom-node", + "selected": false, + "extras": { + "type": "debug", + "path": "xai_components/xai_rpa/rpa_close.py", + "description": null, + "lineNo": [ + { + "lineno": 4, + "end_lineno": 14 + } + ], + "borderColor": "rgb(0,192,255)" + }, + "x": 858.625, + "y": 106.154, + "ports": [ + { + "id": "9c671f84-1194-4cd3-8390-db9c7f2d9c26", + "type": "default", + "x": 860.625, + "y": 133.281, + "name": "in-0", + "alignment": "left", + "parentNode": "c927f4f2-a5a8-43b5-998e-e4691bac4fa5", + "links": [ + "dfa7fcbf-b008-4e9b-8b91-7d73445bd652" + ], + "in": true, + "label": "▶" + }, + { + "id": "6aa91c6a-24c9-4d3d-b922-c6f29fbd9349", + "type": "default", + "x": 937.938, + "y": 133.281, + "name": "out-0", + "alignment": "right", + "parentNode": "c927f4f2-a5a8-43b5-998e-e4691bac4fa5", + "links": [ + "45c7650b-50d5-4c79-a854-44078cadbd29" + ], + "in": false, + "label": "▶" + } + ], + "name": "RpaClose", + "color": "rgb(0,102,204)", + "portsInOrder": [ + "9c671f84-1194-4cd3-8390-db9c7f2d9c26" + ], + "portsOutOrder": [ + "6aa91c6a-24c9-4d3d-b922-c6f29fbd9349" + ] + }, + "61597405-bbf7-4b65-b6ad-942bb074b149": { + "id": "61597405-bbf7-4b65-b6ad-942bb074b149", + "type": "custom-node", + "selected": false, + "extras": { + "type": "debug", + "path": "xai_components/xai_utils/utils.py", + "description": "Pauses the python process.\n\n##### inPorts:\n- sleep_timer: the number of seconds to pause.\n Default `5.0` seconds.", + "lineNo": [ + { + "lineno": 167, + "end_lineno": 186 + } + ], + "borderColor": "rgb(0,192,255)" + }, + "x": 652.218, + "y": 120.948, + "ports": [ + { + "id": "88ad3972-3a98-401d-a57c-a92011893713", + "type": "default", + "x": 654.203, + "y": 148.078, + "name": "in-0", + "alignment": "left", + "parentNode": "61597405-bbf7-4b65-b6ad-942bb074b149", + "links": [ + "75137d6d-16a8-4b2c-aca6-8f7f828af2fe" + ], + "in": true, + "label": "▶" + }, + { + "id": "4df5099f-b6cb-42bc-99b7-e016c93883c5", + "type": "default", + "x": 782.266, + "y": 148.078, + "name": "out-0", + "alignment": "right", + "parentNode": "61597405-bbf7-4b65-b6ad-942bb074b149", + "links": [ + "dfa7fcbf-b008-4e9b-8b91-7d73445bd652" + ], + "in": false, + "label": "▶" + }, + { + "id": "e8b0af9c-54a1-433d-b610-9abdecf92082", + "type": "default", + "x": 654.203, + "y": 164.078, + "name": "parameter-float-sleep_timer", + "alignment": "left", + "parentNode": "61597405-bbf7-4b65-b6ad-942bb074b149", + "links": [], + "in": true, + "label": "sleep_timer" + } + ], + "name": "SleepComponent", + "color": "green", + "portsInOrder": [ + "88ad3972-3a98-401d-a57c-a92011893713", + "e8b0af9c-54a1-433d-b610-9abdecf92082" + ], + "portsOutOrder": [ + "4df5099f-b6cb-42bc-99b7-e016c93883c5" + ] + } + } + } + ] +} \ No newline at end of file From bcc2925c51a1601fc470d85b6d022f5836712838 Mon Sep 17 00:00:00 2001 From: "yuenhern96@gmail.com" Date: Mon, 6 Feb 2023 19:44:27 +0800 Subject: [PATCH 03/10] Update RpaOpenWebpage example --- examples/RpaOpenWebpage.xircuits | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/RpaOpenWebpage.xircuits b/examples/RpaOpenWebpage.xircuits index c6ade8f7..4931d3ff 100644 --- a/examples/RpaOpenWebpage.xircuits +++ b/examples/RpaOpenWebpage.xircuits @@ -6,7 +6,7 @@ "gridSize": 0, "layers": [ { - "id": "6fea37f9-0a31-4e92-858a-1bcf5fb56b60", + "id": "69e5ff25-12b6-4053-9b02-cb190d505f51", "type": "diagram-links", "isSvg": true, "transformed": true, @@ -266,7 +266,7 @@ } }, { - "id": "a2054cba-a21a-450f-a51a-18c2512da691", + "id": "b175f9ec-3592-4226-bfcd-0175eb1783a3", "type": "diagram-nodes", "isSvg": false, "transformed": true, From 520ef9a9716ec67a059ccea7f61707d31b62bae8 Mon Sep 17 00:00:00 2001 From: "yuenhern96@gmail.com" Date: Mon, 6 Feb 2023 19:57:36 +0800 Subject: [PATCH 04/10] Refactor xai_rpa as submodule --- .gitmodules | 3 + xai_components/xai_rpa/__init__.py | 0 xai_components/xai_rpa/requirements.txt | 1 - xai_components/xai_rpa/tebelorg_rpa_basic.py | 31 ----- xai_components/xai_rpa/tebelorg_rpa_core.py | 122 ------------------- 5 files changed, 3 insertions(+), 154 deletions(-) delete mode 100644 xai_components/xai_rpa/__init__.py delete mode 100644 xai_components/xai_rpa/requirements.txt delete mode 100644 xai_components/xai_rpa/tebelorg_rpa_basic.py delete mode 100644 xai_components/xai_rpa/tebelorg_rpa_core.py diff --git a/.gitmodules b/.gitmodules index db4abe50..7348a03d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "xai_components/xai_modelstash"] path = xai_components/xai_modelstash url = https://github.com/XpressAI/xai-modelstash +[submodule "xai_components/xai_rpa"] + path = xai_components/xai_rpa + url = https://github.com/yuenherny/xai-rpa diff --git a/xai_components/xai_rpa/__init__.py b/xai_components/xai_rpa/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/xai_components/xai_rpa/requirements.txt b/xai_components/xai_rpa/requirements.txt deleted file mode 100644 index 26b9746b..00000000 --- a/xai_components/xai_rpa/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -rpa \ No newline at end of file diff --git a/xai_components/xai_rpa/tebelorg_rpa_basic.py b/xai_components/xai_rpa/tebelorg_rpa_basic.py deleted file mode 100644 index 377464f9..00000000 --- a/xai_components/xai_rpa/tebelorg_rpa_basic.py +++ /dev/null @@ -1,31 +0,0 @@ -from xai_components.base import InArg, OutArg, Component, xai_component - -@xai_component -class RpaUrl(Component): - """Opens the browser with specified URL. - - ### Reference: - - [RPA-Python Basic Functions](https://github.com/tebelorg/RPA-Python#basic-functions) - - ##### inPorts: - - url: The URL to be accessed in the browser. - Default: None - - ##### outPorts: - - None - """ - url: InArg[str] - - def __init__(self): - self.url = InArg.empty() - self.done = False - - def execute(self, ctx) -> None: - url = self.url.value - print(f"Opening {url} on browser...") - - import rpa as r - r.url(webpage_url=url) - print(f"Browser opened with URL {url}.") - - self.done = False \ No newline at end of file diff --git a/xai_components/xai_rpa/tebelorg_rpa_core.py b/xai_components/xai_rpa/tebelorg_rpa_core.py deleted file mode 100644 index ecbaa7b1..00000000 --- a/xai_components/xai_rpa/tebelorg_rpa_core.py +++ /dev/null @@ -1,122 +0,0 @@ -from xai_components.base import InArg, OutArg, Component, xai_component - -@xai_component -class RpaInit(Component): - """Initiates RPA bot. - - ### Reference: - - [RPA-Python Core Functions](https://github.com/tebelorg/RPA-Python#core-functions) - - ##### inPorts: - - visual: Initiate workflow that involves images as bot input. - Default: False - - chrome: Whether to use Chrome as default browser. - Default: True - - turbo: To run workflow 10x faster. By default, bot runs at human speed. - Default: False - - ##### outPorts: - - None - """ - visual: InArg[bool] - chrome: InArg[bool] - turbo: InArg[bool] - - def __init__(self): - self.visual = InArg(False) - self.chrome = InArg(True) - self.turbo = InArg(False) - self.done = False - - def execute(self, ctx) -> None: - visual = self.visual.value - chrome = self.chrome.value - turbo = self.turbo.value - print(f"Visual automation: {visual}, Chrome: {chrome}, Turbo: {turbo}") - - import rpa as r - r.init(visual_automation=visual, chrome_browser=chrome, turbo_mode=turbo) - print("Bot initiated.") - - self.done = False - -@xai_component -class RpaClose(Component): - """Shutsdown the RPA bot. - - ### Reference: - - [RPA-Python Core Functions](https://github.com/tebelorg/RPA-Python#core-functions) - - ##### inPorts: - - None - - ##### outPorts: - - None - """ - def __init__(self): - self.done = False - - def execute(self, ctx) -> None: - print("Closing RPA...") - import rpa as r - r.close() - - self.done = False - -@xai_component -class RpaError(Component): - """Raises exception on error. - - ### Reference: - - [RPA-Python Core Functions](https://github.com/tebelorg/RPA-Python#core-functions) - - ##### inPorts: - - raise_exception: Raise exception on error. - Default: False - - ##### outPorts: - - None - """ - raise_exception: InArg[bool] - - def __init__(self): - self.raise_exception = InArg(False) - self.done = False - - def execute(self, ctx) -> None: - raise_exception = self.raise_exception.value - - import rpa as r - r.error(raise_exception) - print("Exception will be raised on error.") - - self.done = False - -@xai_component -class RpaDebug(Component): - """Print & log debug info to `rpa_python.log`. - - ### Reference: - - [RPA-Python Core Functions](https://github.com/tebelorg/RPA-Python#core-functions) - - ##### inPorts: - - debug_log: Print and log debug info. - Default: True - - ##### outPorts: - - None - """ - debug_log: InArg[bool] - - def __init__(self): - self.debug_log = InArg(True) - self.done = False - - def execute(self, ctx) -> None: - debug_log = self.debug_log.value - - import rpa as r - r.debug(debug_log) - print("Debug info will be logged to `rpa_python.log`.") - - self.done = False \ No newline at end of file From be68ec17f25cc839281d25442bb79e4df5d0b1e0 Mon Sep 17 00:00:00 2001 From: "yuenhern96@gmail.com" Date: Mon, 6 Feb 2023 20:08:31 +0800 Subject: [PATCH 05/10] Update component files in xai_rpa --- .gitmodules | 5 ++++- xai_components/xai_rpa | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) create mode 160000 xai_components/xai_rpa diff --git a/.gitmodules b/.gitmodules index 7348a03d..9662e435 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,4 +6,7 @@ url = https://github.com/XpressAI/xai-modelstash [submodule "xai_components/xai_rpa"] path = xai_components/xai_rpa - url = https://github.com/yuenherny/xai-rpa + url = git@github.com:yuenherny/xai-rpa.git +[submodule "xai-rpa"] + path = xai-rpa + url = git@github.com:yuenherny/xai-rpa.git diff --git a/xai_components/xai_rpa b/xai_components/xai_rpa new file mode 160000 index 00000000..28b82048 --- /dev/null +++ b/xai_components/xai_rpa @@ -0,0 +1 @@ +Subproject commit 28b820487904ff752e6dd306b510759b313ad4ee From 8f7f381e02fe84587f6b0a63843bb631952fda46 Mon Sep 17 00:00:00 2001 From: "yuenhern96@gmail.com" Date: Mon, 6 Feb 2023 20:12:18 +0800 Subject: [PATCH 06/10] Update RPA components in submodule --- xai_components/xai_rpa | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xai_components/xai_rpa b/xai_components/xai_rpa index 28b82048..1267d832 160000 --- a/xai_components/xai_rpa +++ b/xai_components/xai_rpa @@ -1 +1 @@ -Subproject commit 28b820487904ff752e6dd306b510759b313ad4ee +Subproject commit 1267d8325b75368481b20f6750511b78d7e2a0e2 From e59a12b1e961020c6de7a10b92d0bc20c7ee92f8 Mon Sep 17 00:00:00 2001 From: "yuenhern96@gmail.com" Date: Mon, 6 Feb 2023 22:26:59 +0800 Subject: [PATCH 07/10] Refactor RPA examples and update .gitignore --- .gitignore | 5 +- examples/RpaOpenWebpage.xircuits | 776 ------------------------------- xai_components/xai_rpa | 2 +- 3 files changed, 5 insertions(+), 778 deletions(-) delete mode 100644 examples/RpaOpenWebpage.xircuits diff --git a/.gitignore b/.gitignore index 805b0864..f4c276bf 100644 --- a/.gitignore +++ b/.gitignore @@ -136,4 +136,7 @@ labextension/ mlruns/ # Pytorch dataset default dir -data \ No newline at end of file +data + +# .py files compiled by Xircuits +examples/*.py diff --git a/examples/RpaOpenWebpage.xircuits b/examples/RpaOpenWebpage.xircuits deleted file mode 100644 index 4931d3ff..00000000 --- a/examples/RpaOpenWebpage.xircuits +++ /dev/null @@ -1,776 +0,0 @@ -{ - "id": "2578938c-5c3b-4979-8fee-09de9b611f79", - "offsetX": 2.6524220032840855, - "offsetY": 6.0681228934405125, - "zoom": 98.33333333333333, - "gridSize": 0, - "layers": [ - { - "id": "69e5ff25-12b6-4053-9b02-cb190d505f51", - "type": "diagram-links", - "isSvg": true, - "transformed": true, - "models": { - "38ac0246-075a-4ad7-8fde-4bc5eec7a784": { - "id": "38ac0246-075a-4ad7-8fde-4bc5eec7a784", - "type": "triangle", - "selected": false, - "source": "c16f8740-515f-43ae-86ad-8df3808c627f", - "sourcePort": "5d56bcc1-bdf1-4cf6-bd18-afa51fc5ae3a", - "target": "ff1d2ed7-cb31-4b9c-bbda-30ca86c81340", - "targetPort": "322553b0-f35a-4b51-9182-7b21a7d89aba", - "points": [ - { - "id": "0f49f2ec-5373-455d-976b-ea8a125d709c", - "type": "point", - "x": 138.703, - "y": 134.641 - }, - { - "id": "9b0fbc32-4de0-4add-b455-08939ce5a926", - "type": "point", - "x": 244.5, - "y": 149.641 - } - ], - "labels": [], - "width": 3, - "color": "gray", - "curvyness": 50, - "selectedColor": "rgb(0,192,255)" - }, - "ff7be6b4-3f34-4a63-b7ac-e2c4d8b1981a": { - "id": "ff7be6b4-3f34-4a63-b7ac-e2c4d8b1981a", - "type": "custom", - "selected": false, - "source": "c181e114-8249-433c-b540-780110fd8fce", - "sourcePort": "0efb559b-6706-4c1c-b475-c1875080eb08", - "target": "ff1d2ed7-cb31-4b9c-bbda-30ca86c81340", - "targetPort": "82afd8d3-7fbd-4dea-88eb-4473a0e3f4cb", - "points": [ - { - "id": "3e714bca-f58c-4cde-8671-11d714140f58", - "type": "point", - "x": 147.437, - "y": 236.641 - }, - { - "id": "2c79301e-f75a-4fea-bc7a-05b6de847861", - "type": "point", - "x": 244.5, - "y": 165.641 - } - ], - "labels": [], - "width": 3, - "color": "gray", - "curvyness": 50, - "selectedColor": "rgb(0,192,255)" - }, - "a807d801-4196-4f36-b4d6-f5ab37675ee4": { - "id": "a807d801-4196-4f36-b4d6-f5ab37675ee4", - "type": "custom", - "selected": false, - "source": "7a651a2e-6f9b-4c0f-844f-c23fc566f7c8", - "sourcePort": "aad174ca-0bb2-4ffb-8a79-d8d47306fad6", - "target": "ff1d2ed7-cb31-4b9c-bbda-30ca86c81340", - "targetPort": "62b35b48-e5a8-4cf0-87ce-2e49f5ae9a2e", - "points": [ - { - "id": "1c93b670-edb8-4596-8e4d-90ec655b466e", - "type": "point", - "x": 138.531, - "y": 311.641 - }, - { - "id": "313a4167-1001-49c6-ae1f-a9d3a93da686", - "type": "point", - "x": 244.5, - "y": 181.641 - } - ], - "labels": [], - "width": 3, - "color": "gray", - "curvyness": 50, - "selectedColor": "rgb(0,192,255)" - }, - "5f388164-7d73-4d07-b738-74c8efcdb8a7": { - "id": "5f388164-7d73-4d07-b738-74c8efcdb8a7", - "type": "custom", - "selected": false, - "source": "96eacf9f-d457-49f4-a1bb-40123b54db12", - "sourcePort": "19d57fd2-e9c3-4c34-b933-851f557c787d", - "target": "ff1d2ed7-cb31-4b9c-bbda-30ca86c81340", - "targetPort": "0eedcbc7-9072-4644-8cb8-c01de4d1f69c", - "points": [ - { - "id": "e395243d-63c9-43a3-87f6-ec8d45a8e147", - "type": "point", - "x": 140.438, - "y": 388.641 - }, - { - "id": "2d953898-86d7-4d5e-ac2d-cff01243f70a", - "type": "point", - "x": 244.5, - "y": 197.641 - } - ], - "labels": [], - "width": 3, - "color": "gray", - "curvyness": 50, - "selectedColor": "rgb(0,192,255)" - }, - "1ebdf481-8a64-4be4-9195-b3c3c53b8916": { - "id": "1ebdf481-8a64-4be4-9195-b3c3c53b8916", - "type": "custom", - "selected": false, - "source": "5e937391-4f29-4e97-98ed-535e64e01fc1", - "sourcePort": "45e414ea-4544-4d8d-9ec8-ec8519cb30a6", - "target": "24977fdc-3f42-40fe-9894-d2b8904930a5", - "targetPort": "f31a4058-8c86-4b59-a877-136676a701eb", - "points": [ - { - "id": "6a404cdb-3054-4a4f-8f51-04f64e262168", - "type": "point", - "x": 424.875, - "y": 303.641 - }, - { - "id": "46f9f573-a9e1-475c-bc0d-ab6bb1ea38f1", - "type": "point", - "x": 500.5, - "y": 171.641 - } - ], - "labels": [], - "width": 3, - "color": "gray", - "curvyness": 50, - "selectedColor": "rgb(0,192,255)" - }, - "849f5d76-88a2-464b-856e-30d5980f39c4": { - "id": "849f5d76-88a2-464b-856e-30d5980f39c4", - "type": "triangle", - "selected": false, - "source": "ff1d2ed7-cb31-4b9c-bbda-30ca86c81340", - "sourcePort": "6dc84472-ff56-4c6d-865f-623db7cf49e9", - "target": "24977fdc-3f42-40fe-9894-d2b8904930a5", - "targetPort": "c21aeb08-823a-4406-b092-4ac7eaef1ecf", - "points": [ - { - "id": "7f36ca44-34bb-4a43-a4ef-860817e52516", - "type": "point", - "x": 352.391, - "y": 149.641 - }, - { - "id": "4e84bc6d-c893-4c7c-a8cf-faaa17850e6d", - "type": "point", - "x": 500.5, - "y": 155.641 - } - ], - "labels": [], - "width": 3, - "color": "gray", - "curvyness": 50, - "selectedColor": "rgb(0,192,255)" - }, - "45c7650b-50d5-4c79-a854-44078cadbd29": { - "id": "45c7650b-50d5-4c79-a854-44078cadbd29", - "type": "triangle", - "selected": false, - "source": "c927f4f2-a5a8-43b5-998e-e4691bac4fa5", - "sourcePort": "6aa91c6a-24c9-4d3d-b922-c6f29fbd9349", - "target": "0b0a2e67-e94a-43d5-a274-82a72752e082", - "targetPort": "f72c36f9-d3b8-4e9d-8c20-57953eeaf4e4", - "points": [ - { - "id": "f7e9bf53-9946-416b-9b34-31c26ec08b79", - "type": "point", - "x": 945.438, - "y": 140.781 - }, - { - "id": "fcda73b2-4328-45e2-888a-bb8d7d1122ac", - "type": "point", - "x": 1031.719, - "y": 136.391 - } - ], - "labels": [], - "width": 3, - "color": "gray", - "curvyness": 50, - "selectedColor": "rgb(0,192,255)" - }, - "75137d6d-16a8-4b2c-aca6-8f7f828af2fe": { - "id": "75137d6d-16a8-4b2c-aca6-8f7f828af2fe", - "type": "triangle", - "selected": false, - "source": "24977fdc-3f42-40fe-9894-d2b8904930a5", - "sourcePort": "d3b10cde-f02a-4899-aa21-374d83b5e223", - "target": "61597405-bbf7-4b65-b6ad-942bb074b149", - "targetPort": "88ad3972-3a98-401d-a57c-a92011893713", - "points": [ - { - "id": "93bacf35-60f9-472d-9fc6-17dd15f511d4", - "type": "point", - "x": 583.937, - "y": 155.641 - }, - { - "id": "b14aabbd-0854-49ff-b596-b11cc88ad807", - "type": "point", - "x": 661.703, - "y": 155.578 - } - ], - "labels": [], - "width": 3, - "color": "gray", - "curvyness": 50, - "selectedColor": "rgb(0,192,255)" - }, - "dfa7fcbf-b008-4e9b-8b91-7d73445bd652": { - "id": "dfa7fcbf-b008-4e9b-8b91-7d73445bd652", - "type": "triangle", - "selected": false, - "source": "61597405-bbf7-4b65-b6ad-942bb074b149", - "sourcePort": "4df5099f-b6cb-42bc-99b7-e016c93883c5", - "target": "c927f4f2-a5a8-43b5-998e-e4691bac4fa5", - "targetPort": "9c671f84-1194-4cd3-8390-db9c7f2d9c26", - "points": [ - { - "id": "83ae3f43-bebd-4677-acce-cbe2d52c7f34", - "type": "point", - "x": 789.766, - "y": 155.578 - }, - { - "id": "fadd6530-fe47-4ed5-8f76-944c209af5fe", - "type": "point", - "x": 868.125, - "y": 140.781 - } - ], - "labels": [], - "width": 3, - "color": "gray", - "curvyness": 50, - "selectedColor": "rgb(0,192,255)" - } - } - }, - { - "id": "b175f9ec-3592-4226-bfcd-0175eb1783a3", - "type": "diagram-nodes", - "isSvg": false, - "transformed": true, - "models": { - "c16f8740-515f-43ae-86ad-8df3808c627f": { - "id": "c16f8740-515f-43ae-86ad-8df3808c627f", - "type": "custom-node", - "selected": false, - "extras": { - "type": "Start", - "borderColor": "rgb(0,192,255)" - }, - "x": 100, - "y": 100, - "ports": [ - { - "id": "5d56bcc1-bdf1-4cf6-bd18-afa51fc5ae3a", - "type": "default", - "x": 131.203, - "y": 127.141, - "name": "out-0", - "alignment": "right", - "parentNode": "c16f8740-515f-43ae-86ad-8df3808c627f", - "links": [ - "38ac0246-075a-4ad7-8fde-4bc5eec7a784" - ], - "in": false, - "label": "▶" - } - ], - "name": "Start", - "color": "rgb(255,102,102)", - "portsInOrder": [], - "portsOutOrder": [ - "5d56bcc1-bdf1-4cf6-bd18-afa51fc5ae3a" - ] - }, - "0b0a2e67-e94a-43d5-a274-82a72752e082": { - "id": "0b0a2e67-e94a-43d5-a274-82a72752e082", - "type": "custom-node", - "selected": false, - "extras": { - "type": "Finish", - "borderColor": "rgb(0,192,255)" - }, - "x": 1022.22, - "y": 101.763, - "ports": [ - { - "id": "f72c36f9-d3b8-4e9d-8c20-57953eeaf4e4", - "type": "default", - "x": 1024.219, - "y": 128.891, - "name": "in-0", - "alignment": "left", - "parentNode": "0b0a2e67-e94a-43d5-a274-82a72752e082", - "links": [ - "45c7650b-50d5-4c79-a854-44078cadbd29" - ], - "in": true, - "label": "▶" - } - ], - "name": "Finish", - "color": "rgb(255,102,102)", - "portsInOrder": [ - "f72c36f9-d3b8-4e9d-8c20-57953eeaf4e4" - ], - "portsOutOrder": [] - }, - "c181e114-8249-433c-b540-780110fd8fce": { - "id": "c181e114-8249-433c-b540-780110fd8fce", - "type": "custom-node", - "selected": false, - "extras": { - "type": "boolean", - "borderColor": "rgb(0,192,255)" - }, - "x": 83, - "y": 202, - "ports": [ - { - "id": "0efb559b-6706-4c1c-b475-c1875080eb08", - "type": "default", - "x": 139.937, - "y": 229.141, - "name": "out-0", - "alignment": "right", - "parentNode": "c181e114-8249-433c-b540-780110fd8fce", - "links": [ - "ff7be6b4-3f34-4a63-b7ac-e2c4d8b1981a" - ], - "in": false, - "label": "False" - } - ], - "name": "Literal False", - "color": "rgb(255,204,0)", - "portsInOrder": [], - "portsOutOrder": [ - "0efb559b-6706-4c1c-b475-c1875080eb08" - ] - }, - "7a651a2e-6f9b-4c0f-844f-c23fc566f7c8": { - "id": "7a651a2e-6f9b-4c0f-844f-c23fc566f7c8", - "type": "custom-node", - "selected": false, - "extras": { - "type": "boolean", - "borderColor": "rgb(0,192,255)" - }, - "x": 79, - "y": 277, - "ports": [ - { - "id": "aad174ca-0bb2-4ffb-8a79-d8d47306fad6", - "type": "default", - "x": 131.031, - "y": 304.141, - "name": "out-0", - "alignment": "right", - "parentNode": "7a651a2e-6f9b-4c0f-844f-c23fc566f7c8", - "links": [ - "a807d801-4196-4f36-b4d6-f5ab37675ee4" - ], - "in": false, - "label": "True" - } - ], - "name": "Literal True", - "color": "rgb(255,153,0)", - "portsInOrder": [], - "portsOutOrder": [ - "aad174ca-0bb2-4ffb-8a79-d8d47306fad6" - ] - }, - "96eacf9f-d457-49f4-a1bb-40123b54db12": { - "id": "96eacf9f-d457-49f4-a1bb-40123b54db12", - "type": "custom-node", - "selected": false, - "extras": { - "type": "boolean", - "borderColor": "rgb(0,192,255)" - }, - "x": 76, - "y": 354, - "ports": [ - { - "id": "19d57fd2-e9c3-4c34-b933-851f557c787d", - "type": "default", - "x": 132.938, - "y": 381.141, - "name": "out-0", - "alignment": "right", - "parentNode": "96eacf9f-d457-49f4-a1bb-40123b54db12", - "links": [ - "5f388164-7d73-4d07-b738-74c8efcdb8a7" - ], - "in": false, - "label": "False" - } - ], - "name": "Literal False", - "color": "rgb(255,204,0)", - "portsInOrder": [], - "portsOutOrder": [ - "19d57fd2-e9c3-4c34-b933-851f557c787d" - ] - }, - "5e937391-4f29-4e97-98ed-535e64e01fc1": { - "id": "5e937391-4f29-4e97-98ed-535e64e01fc1", - "type": "custom-node", - "selected": false, - "extras": { - "type": "string", - "borderColor": "rgb(0,192,255)" - }, - "x": 289, - "y": 269, - "ports": [ - { - "id": "45e414ea-4544-4d8d-9ec8-ec8519cb30a6", - "type": "default", - "x": 417.375, - "y": 296.141, - "name": "out-0", - "alignment": "right", - "parentNode": "5e937391-4f29-4e97-98ed-535e64e01fc1", - "links": [ - "1ebdf481-8a64-4be4-9195-b3c3c53b8916" - ], - "in": false, - "label": "https://www.xpress.ai/" - } - ], - "name": "Literal String", - "color": "rgb(15,255,255)", - "portsInOrder": [], - "portsOutOrder": [ - "45e414ea-4544-4d8d-9ec8-ec8519cb30a6" - ] - }, - "ff1d2ed7-cb31-4b9c-bbda-30ca86c81340": { - "id": "ff1d2ed7-cb31-4b9c-bbda-30ca86c81340", - "type": "custom-node", - "selected": false, - "extras": { - "type": "debug", - "path": "xai_components/xai_rpa/rpa_init.py", - "description": null, - "lineNo": [ - { - "lineno": 4, - "end_lineno": 24 - } - ], - "borderColor": "rgb(0,192,255)" - }, - "x": 235, - "y": 115, - "ports": [ - { - "id": "322553b0-f35a-4b51-9182-7b21a7d89aba", - "type": "default", - "x": 237, - "y": 142.141, - "name": "in-0", - "alignment": "left", - "parentNode": "ff1d2ed7-cb31-4b9c-bbda-30ca86c81340", - "links": [ - "38ac0246-075a-4ad7-8fde-4bc5eec7a784" - ], - "in": true, - "label": "▶" - }, - { - "id": "6dc84472-ff56-4c6d-865f-623db7cf49e9", - "type": "default", - "x": 344.891, - "y": 142.141, - "name": "out-0", - "alignment": "right", - "parentNode": "ff1d2ed7-cb31-4b9c-bbda-30ca86c81340", - "links": [ - "849f5d76-88a2-464b-856e-30d5980f39c4" - ], - "in": false, - "label": "▶" - }, - { - "id": "82afd8d3-7fbd-4dea-88eb-4473a0e3f4cb", - "type": "default", - "x": 237, - "y": 158.141, - "name": "parameter-boolean-visual", - "alignment": "left", - "parentNode": "ff1d2ed7-cb31-4b9c-bbda-30ca86c81340", - "links": [ - "ff7be6b4-3f34-4a63-b7ac-e2c4d8b1981a" - ], - "in": true, - "label": "visual" - }, - { - "id": "62b35b48-e5a8-4cf0-87ce-2e49f5ae9a2e", - "type": "default", - "x": 237, - "y": 174.141, - "name": "parameter-boolean-chrome", - "alignment": "left", - "parentNode": "ff1d2ed7-cb31-4b9c-bbda-30ca86c81340", - "links": [ - "a807d801-4196-4f36-b4d6-f5ab37675ee4" - ], - "in": true, - "label": "chrome" - }, - { - "id": "0eedcbc7-9072-4644-8cb8-c01de4d1f69c", - "type": "default", - "x": 237, - "y": 190.141, - "name": "parameter-boolean-turbo", - "alignment": "left", - "parentNode": "ff1d2ed7-cb31-4b9c-bbda-30ca86c81340", - "links": [ - "5f388164-7d73-4d07-b738-74c8efcdb8a7" - ], - "in": true, - "label": "turbo" - } - ], - "name": "RpaInit", - "color": "rgb(255,153,102)", - "portsInOrder": [ - "322553b0-f35a-4b51-9182-7b21a7d89aba", - "82afd8d3-7fbd-4dea-88eb-4473a0e3f4cb", - "62b35b48-e5a8-4cf0-87ce-2e49f5ae9a2e", - "0eedcbc7-9072-4644-8cb8-c01de4d1f69c" - ], - "portsOutOrder": [ - "6dc84472-ff56-4c6d-865f-623db7cf49e9" - ] - }, - "24977fdc-3f42-40fe-9894-d2b8904930a5": { - "id": "24977fdc-3f42-40fe-9894-d2b8904930a5", - "type": "custom-node", - "selected": false, - "extras": { - "type": "debug", - "path": "xai_components/xai_rpa/rpa_url.py", - "description": null, - "lineNo": [ - { - "lineno": 4, - "end_lineno": 18 - } - ], - "borderColor": "rgb(0,192,255)" - }, - "x": 491, - "y": 121, - "ports": [ - { - "id": "c21aeb08-823a-4406-b092-4ac7eaef1ecf", - "type": "default", - "x": 493, - "y": 148.141, - "name": "in-0", - "alignment": "left", - "parentNode": "24977fdc-3f42-40fe-9894-d2b8904930a5", - "links": [ - "849f5d76-88a2-464b-856e-30d5980f39c4" - ], - "in": true, - "label": "▶" - }, - { - "id": "d3b10cde-f02a-4899-aa21-374d83b5e223", - "type": "default", - "x": 576.437, - "y": 148.141, - "name": "out-0", - "alignment": "right", - "parentNode": "24977fdc-3f42-40fe-9894-d2b8904930a5", - "links": [ - "75137d6d-16a8-4b2c-aca6-8f7f828af2fe" - ], - "in": false, - "label": "▶" - }, - { - "id": "f31a4058-8c86-4b59-a877-136676a701eb", - "type": "default", - "x": 493, - "y": 164.141, - "name": "parameter-string-url", - "alignment": "left", - "parentNode": "24977fdc-3f42-40fe-9894-d2b8904930a5", - "links": [ - "1ebdf481-8a64-4be4-9195-b3c3c53b8916" - ], - "in": true, - "label": "url" - } - ], - "name": "RpaUrl", - "color": "rgb(255,102,102)", - "portsInOrder": [ - "c21aeb08-823a-4406-b092-4ac7eaef1ecf", - "f31a4058-8c86-4b59-a877-136676a701eb" - ], - "portsOutOrder": [ - "d3b10cde-f02a-4899-aa21-374d83b5e223" - ] - }, - "c927f4f2-a5a8-43b5-998e-e4691bac4fa5": { - "id": "c927f4f2-a5a8-43b5-998e-e4691bac4fa5", - "type": "custom-node", - "selected": false, - "extras": { - "type": "debug", - "path": "xai_components/xai_rpa/rpa_close.py", - "description": null, - "lineNo": [ - { - "lineno": 4, - "end_lineno": 14 - } - ], - "borderColor": "rgb(0,192,255)" - }, - "x": 858.625, - "y": 106.154, - "ports": [ - { - "id": "9c671f84-1194-4cd3-8390-db9c7f2d9c26", - "type": "default", - "x": 860.625, - "y": 133.281, - "name": "in-0", - "alignment": "left", - "parentNode": "c927f4f2-a5a8-43b5-998e-e4691bac4fa5", - "links": [ - "dfa7fcbf-b008-4e9b-8b91-7d73445bd652" - ], - "in": true, - "label": "▶" - }, - { - "id": "6aa91c6a-24c9-4d3d-b922-c6f29fbd9349", - "type": "default", - "x": 937.938, - "y": 133.281, - "name": "out-0", - "alignment": "right", - "parentNode": "c927f4f2-a5a8-43b5-998e-e4691bac4fa5", - "links": [ - "45c7650b-50d5-4c79-a854-44078cadbd29" - ], - "in": false, - "label": "▶" - } - ], - "name": "RpaClose", - "color": "rgb(0,102,204)", - "portsInOrder": [ - "9c671f84-1194-4cd3-8390-db9c7f2d9c26" - ], - "portsOutOrder": [ - "6aa91c6a-24c9-4d3d-b922-c6f29fbd9349" - ] - }, - "61597405-bbf7-4b65-b6ad-942bb074b149": { - "id": "61597405-bbf7-4b65-b6ad-942bb074b149", - "type": "custom-node", - "selected": false, - "extras": { - "type": "debug", - "path": "xai_components/xai_utils/utils.py", - "description": "Pauses the python process.\n\n##### inPorts:\n- sleep_timer: the number of seconds to pause.\n Default `5.0` seconds.", - "lineNo": [ - { - "lineno": 167, - "end_lineno": 186 - } - ], - "borderColor": "rgb(0,192,255)" - }, - "x": 652.218, - "y": 120.948, - "ports": [ - { - "id": "88ad3972-3a98-401d-a57c-a92011893713", - "type": "default", - "x": 654.203, - "y": 148.078, - "name": "in-0", - "alignment": "left", - "parentNode": "61597405-bbf7-4b65-b6ad-942bb074b149", - "links": [ - "75137d6d-16a8-4b2c-aca6-8f7f828af2fe" - ], - "in": true, - "label": "▶" - }, - { - "id": "4df5099f-b6cb-42bc-99b7-e016c93883c5", - "type": "default", - "x": 782.266, - "y": 148.078, - "name": "out-0", - "alignment": "right", - "parentNode": "61597405-bbf7-4b65-b6ad-942bb074b149", - "links": [ - "dfa7fcbf-b008-4e9b-8b91-7d73445bd652" - ], - "in": false, - "label": "▶" - }, - { - "id": "e8b0af9c-54a1-433d-b610-9abdecf92082", - "type": "default", - "x": 654.203, - "y": 164.078, - "name": "parameter-float-sleep_timer", - "alignment": "left", - "parentNode": "61597405-bbf7-4b65-b6ad-942bb074b149", - "links": [], - "in": true, - "label": "sleep_timer" - } - ], - "name": "SleepComponent", - "color": "green", - "portsInOrder": [ - "88ad3972-3a98-401d-a57c-a92011893713", - "e8b0af9c-54a1-433d-b610-9abdecf92082" - ], - "portsOutOrder": [ - "4df5099f-b6cb-42bc-99b7-e016c93883c5" - ] - } - } - } - ] -} \ No newline at end of file diff --git a/xai_components/xai_rpa b/xai_components/xai_rpa index 1267d832..428b3291 160000 --- a/xai_components/xai_rpa +++ b/xai_components/xai_rpa @@ -1 +1 @@ -Subproject commit 1267d8325b75368481b20f6750511b78d7e2a0e2 +Subproject commit 428b3291ce749d17ff7802cb1e10c56cf586b8e2 From b30802f4703c7c6f8a88a6608c9ba900c7f8ec90 Mon Sep 17 00:00:00 2001 From: "yuenhern96@gmail.com" Date: Mon, 6 Feb 2023 23:31:32 +0800 Subject: [PATCH 08/10] Update RPA component library README --- xai_components/xai_rpa | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xai_components/xai_rpa b/xai_components/xai_rpa index 428b3291..a986686b 160000 --- a/xai_components/xai_rpa +++ b/xai_components/xai_rpa @@ -1 +1 @@ -Subproject commit 428b3291ce749d17ff7802cb1e10c56cf586b8e2 +Subproject commit a986686b8dc4800af7aad3c1728c432b6bcb0ff7 From 887e631de008d2471219657226bca284e334915b Mon Sep 17 00:00:00 2001 From: "yuenhern96@gmail.com" Date: Mon, 6 Feb 2023 23:34:10 +0800 Subject: [PATCH 09/10] Update RPA component library README --- xai_components/xai_rpa | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xai_components/xai_rpa b/xai_components/xai_rpa index a986686b..7747e1ef 160000 --- a/xai_components/xai_rpa +++ b/xai_components/xai_rpa @@ -1 +1 @@ -Subproject commit a986686b8dc4800af7aad3c1728c432b6bcb0ff7 +Subproject commit 7747e1efd04a8d53c9d9f708d7863cfea6f6c14f From 0562eec15b8e8da44ae3a0198bb51bfb1a75fbc7 Mon Sep 17 00:00:00 2001 From: "yuenhern96@gmail.com" Date: Wed, 8 Feb 2023 21:31:45 +0800 Subject: [PATCH 10/10] Update .gitmodules with HTTPS link instead of SSH --- .gitmodules | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitmodules b/.gitmodules index 9662e435..7348a03d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,7 +6,4 @@ url = https://github.com/XpressAI/xai-modelstash [submodule "xai_components/xai_rpa"] path = xai_components/xai_rpa - url = git@github.com:yuenherny/xai-rpa.git -[submodule "xai-rpa"] - path = xai-rpa - url = git@github.com:yuenherny/xai-rpa.git + url = https://github.com/yuenherny/xai-rpa