From ea3da6824ab5590d2e678e1f7133de865442aa9f Mon Sep 17 00:00:00 2001 From: kmlefran Date: Fri, 26 Jan 2024 13:13:43 -0500 Subject: [PATCH] Add wf check --- example/test.ipynb | 30 +++++++++++++++++++++ tests/controllers/test_g16fragcontroller.py | 3 ++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/example/test.ipynb b/example/test.ipynb index a13e7c3..ab31a1c 100644 --- a/example/test.ipynb +++ b/example/test.ipynb @@ -104,6 +104,36 @@ "code.computer.label" ] }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [], + "source": [ + "from aiida.plugins import WorkflowFactory\n", + "wf = WorkflowFactory('aimall.g16opt')" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'G16OptWorkchain'" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "wf.get_name()" + ] + }, { "cell_type": "code", "execution_count": null, diff --git a/tests/controllers/test_g16fragcontroller.py b/tests/controllers/test_g16fragcontroller.py index 6dd43ad..d772608 100644 --- a/tests/controllers/test_g16fragcontroller.py +++ b/tests/controllers/test_g16fragcontroller.py @@ -42,12 +42,13 @@ def test_g16frag_controller(fixture_code): struct.store() struct.base.extras.set("smiles", "unique") gr.add_nodes(struct) - ins, _ = con.get_inputs_and_processclass_from_extras(extras_values=["unique"]) + ins, wf = con.get_inputs_and_processclass_from_extras(extras_values=["unique"]) assert isinstance(ins, dict) assert "frag_label" in ins assert "fragment_dict" in ins assert "g16_code" in ins assert "g16_opt_params" in ins + assert wf.get_name() == "G16OptWorkchain" # pylint:disable=no-member # assert isinstance(wfs, aiida_aimall.workchains.G16OptWorkchain) # pylint:disable=no-member