From 80d56e40d4fef1f309e999b354df495679f07ac3 Mon Sep 17 00:00:00 2001 From: Ludwig Schneider Date: Fri, 8 Mar 2024 13:16:24 -0600 Subject: [PATCH] fix doctests --- src/cript/nodes/core.py | 8 ++++---- src/cript/nodes/primary_nodes/computation_process.py | 2 +- src/cript/nodes/primary_nodes/data.py | 2 +- src/cript/nodes/primary_nodes/material.py | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/cript/nodes/core.py b/src/cript/nodes/core.py index 0ecdaeac0..3f43fedd4 100644 --- a/src/cript/nodes/core.py +++ b/src/cript/nodes/core.py @@ -293,10 +293,10 @@ def get_expanded_json(self, **kwargs) -> str: >>> my_project = cript.Project(name=f"my_Project") >>> my_collection = cript.Collection(name="my collection") >>> my_material_1 = cript.Material( - ... name="my material 1", bigsmiles = "my material 1 bigsmiles"] + ... name="my material 1", bigsmiles = "my material 1 bigsmiles" ... ) >>> my_material_2 = cript.Material( - ... name="my material 2", bigsmiles = "my material 2 bigsmiles"] + ... name="my material 2", bigsmiles = "my material 2 bigsmiles" ... ) >>> my_inventory = cript.Inventory( ... name="my inventory", material=[my_material_1, my_material_2] @@ -511,10 +511,10 @@ def find_children(self, search_attr: dict, search_depth: int = -1, handled_nodes >>> my_project = cript.Project(name=f"my_Project") >>> my_collection = cript.Collection(name="my collection") >>> my_material_1 = cript.Material( - ... name="my material 1", bigsmiles = "my material 1 bigsmiles"] + ... name="my material 1", bigsmiles = "my material 1 bigsmiles" ... ) >>> my_material_2 = cript.Material( - ... name="my material 2", bigsmiles = "my material 2 bigsmiles"] + ... name="my material 2", bigsmiles = "my material 2 bigsmiles" ... ) >>> my_inventory = cript.Inventory( ... name="my inventory", material=[my_material_1, my_material_2] diff --git a/src/cript/nodes/primary_nodes/computation_process.py b/src/cript/nodes/primary_nodes/computation_process.py index 6aed9d2ad..c08f853c6 100644 --- a/src/cript/nodes/primary_nodes/computation_process.py +++ b/src/cript/nodes/primary_nodes/computation_process.py @@ -368,7 +368,7 @@ def ingredient(self) -> List[Any]: Examples -------- >>> import cript - >>> my_material = cript.Material(name="my material", "bigsmiles" = "my bigsmiles") + >>> my_material = cript.Material(name="my material", bigsmiles = "my bigsmiles") >>> my_quantity = cript.Quantity( ... key="mass", value=11.2, unit="kg", uncertainty=0.2, uncertainty_type="stdev" ... ) diff --git a/src/cript/nodes/primary_nodes/data.py b/src/cript/nodes/primary_nodes/data.py index 0be82a222..e631dd27b 100644 --- a/src/cript/nodes/primary_nodes/data.py +++ b/src/cript/nodes/primary_nodes/data.py @@ -459,7 +459,7 @@ def material(self) -> List[Any]: ... data_dictionary="my file's data dictionary" ... ) >>> my_data = cript.Data(name="my data name", type="afm_amp", file=[my_file]) - >>> my_material = cript.Material(name="my material name", bigsmiles = 123456) + >>> my_material = cript.Material(name="my material name", bigsmiles = "123456") >>> my_data.material = [my_material] Returns diff --git a/src/cript/nodes/primary_nodes/material.py b/src/cript/nodes/primary_nodes/material.py index bbfb847e3..807711d0f 100644 --- a/src/cript/nodes/primary_nodes/material.py +++ b/src/cript/nodes/primary_nodes/material.py @@ -373,7 +373,7 @@ def component(self) -> List["Material"]: >>> my_mixed_material = cript.Material( ... name="my material", ... component=my_components, - ... "bigsmiles" = "123456", + ... bigsmiles = "123456", ... ) Returns @@ -486,7 +486,7 @@ def keyword(self) -> List[str]: -------- >>> import cript >>> my_material = cript.Material( - ... name="my material", "inchi" = "my material inchi" + ... name="my material", inchi = "my material inchi" ... ) >>> my_material.keyword = ["acetylene", "acrylate", "alternating"] @@ -536,7 +536,7 @@ def property(self) -> List[Any]: >>> import cript >>> my_material = cript.Material( ... name="my component material 1", - ... "smiles" = "component 1 smiles", + ... smiles = "component 1 smiles", ... ) >>> my_property = cript.Property(key="modulus_shear", type="min", value=1.23, unit="gram") >>> my_material.property = [my_property]