From 00bc3c500e9cacf0a3070e2febd7cde899011f60 Mon Sep 17 00:00:00 2001 From: Julian Geiger Date: Thu, 15 May 2025 16:39:13 +0200 Subject: [PATCH 1/2] `cwl.load_workflow_json` -> `cwl.pwd_to_cwl` --- .../src/python_workflow_definition/cwl/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_workflow_definition/src/python_workflow_definition/cwl/__init__.py b/python_workflow_definition/src/python_workflow_definition/cwl/__init__.py index ee87a7c..18de37d 100644 --- a/python_workflow_definition/src/python_workflow_definition/cwl/__init__.py +++ b/python_workflow_definition/src/python_workflow_definition/cwl/__init__.py @@ -231,7 +231,7 @@ def _write_workflow(workflow): dump(workflow_template, f, Dumper=Dumper) -def load_workflow_json(file_name: str): +def pwd_to_cwl(file_name: str): with open(file_name, "r") as f: workflow = json.load(f) From fe67cd7709c637a26752869e3c39681aedbdd8ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Jan=C3=9Fen?= Date: Thu, 15 May 2025 17:09:07 +0200 Subject: [PATCH 2/2] Rename to write_workflow --- example_workflows/arithmetic/cwl.ipynb | 4 ++-- example_workflows/nfdi/cwl.ipynb | 4 ++-- example_workflows/quantum_espresso/cwl.ipynb | 4 ++-- .../src/python_workflow_definition/cwl/__init__.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/example_workflows/arithmetic/cwl.ipynb b/example_workflows/arithmetic/cwl.ipynb index ba406e5..b83e6a0 100644 --- a/example_workflows/arithmetic/cwl.ipynb +++ b/example_workflows/arithmetic/cwl.ipynb @@ -34,7 +34,7 @@ { "id": "92e3921b-2bb8-4333-8cfe-4bd27f785d24", "cell_type": "code", - "source": "from python_workflow_definition.cwl import load_workflow_json", + "source": "from python_workflow_definition.cwl import write_workflow", "metadata": { "trusted": true }, @@ -44,7 +44,7 @@ { "id": "5303c059-8ae4-4557-858e-b4bd64eac711", "cell_type": "code", - "source": "load_workflow_json(file_name=\"workflow.json\")", + "source": "write_workflow(file_name=\"workflow.json\")", "metadata": { "trusted": true }, diff --git a/example_workflows/nfdi/cwl.ipynb b/example_workflows/nfdi/cwl.ipynb index 40dde74..0906490 100644 --- a/example_workflows/nfdi/cwl.ipynb +++ b/example_workflows/nfdi/cwl.ipynb @@ -54,7 +54,7 @@ { "id": "92e3921b-2bb8-4333-8cfe-4bd27f785d24", "cell_type": "code", - "source": "from python_workflow_definition.cwl import load_workflow_json", + "source": "from python_workflow_definition.cwl import write_workflow", "metadata": { "trusted": true }, @@ -106,7 +106,7 @@ { "id": "5303c059-8ae4-4557-858e-b4bd64eac711", "cell_type": "code", - "source": "load_workflow_json(file_name=\"workflow.json\")", + "source": "write_workflow(file_name=\"workflow.json\")", "metadata": { "trusted": true }, diff --git a/example_workflows/quantum_espresso/cwl.ipynb b/example_workflows/quantum_espresso/cwl.ipynb index 794600d..5dae00c 100644 --- a/example_workflows/quantum_espresso/cwl.ipynb +++ b/example_workflows/quantum_espresso/cwl.ipynb @@ -44,7 +44,7 @@ { "id": "92e3921b-2bb8-4333-8cfe-4bd27f785d24", "cell_type": "code", - "source": "from python_workflow_definition.cwl import load_workflow_json", + "source": "from python_workflow_definition.cwl import write_workflow", "metadata": { "trusted": true }, @@ -54,7 +54,7 @@ { "id": "5303c059-8ae4-4557-858e-b4bd64eac711", "cell_type": "code", - "source": "load_workflow_json(file_name=\"workflow.json\")", + "source": "write_workflow(file_name=\"workflow.json\")", "metadata": { "trusted": true }, diff --git a/python_workflow_definition/src/python_workflow_definition/cwl/__init__.py b/python_workflow_definition/src/python_workflow_definition/cwl/__init__.py index 18de37d..eafa1af 100644 --- a/python_workflow_definition/src/python_workflow_definition/cwl/__init__.py +++ b/python_workflow_definition/src/python_workflow_definition/cwl/__init__.py @@ -231,7 +231,7 @@ def _write_workflow(workflow): dump(workflow_template, f, Dumper=Dumper) -def pwd_to_cwl(file_name: str): +def write_workflow(file_name: str): with open(file_name, "r") as f: workflow = json.load(f)