Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
duboyal committed May 7, 2024
1 parent 606c8c7 commit 826bf0e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions tests/fixtures/subobjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,11 @@ def simple_ingredient_node(simple_material_node, complex_quantity_node) -> cript

simple_material_node.name = f"{simple_material_node.name}_{uuid.uuid4().hex}"

print("!!__!!__simple_syrup_material_node")
print(simple_material_node)
# print("!!__!!__simple_syrup_material_node")
# print(simple_material_node)

my_simple_ingredient = cript.Ingredient(material=simple_material_node, quantity=[complex_quantity_node], keyword=["catalyst"])
print("simple_syrup")
# print("simple_syrup")
# quit()
# my_simple_ingredient.material = simple_material_node

Expand Down
4 changes: 2 additions & 2 deletions tests/fixtures/supporting_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ def complex_user_dict(cript_api) -> dict:
user_node = next(cript_api.search(node_type=cript.User, search_mode=cript.SearchModes.NODE_TYPE))

user_dict = json.loads(user_node.get_json().json)
print("8888888--------")
print(user_dict)
# print("8888888--------")
# print(user_dict)

# def complex_user_dict() -> dict: #old code
# user_dict = {"node": ["User"]}
Expand Down
12 changes: 6 additions & 6 deletions tests/nodes/primary_nodes/test_computational_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,13 @@ def test_serialize_computational_process_to_json(simple_computational_process_no
ref_dict["ingredient"][0]["material"] = {}
ref_dict = strip_uid_from_dict(ref_dict)

print("****REFDICT")
print(type(ref_dict))
print(ref_dict)
# print("****REFDICT")
# print(type(ref_dict))
# print(ref_dict)

print("****EXPECTED DICT")
print(type(expected_dict))
print(expected_dict)
# print("****EXPECTED DICT")
# print(type(expected_dict))
# print(expected_dict)

assert ref_dict == expected_dict

Expand Down
18 changes: 9 additions & 9 deletions tests/nodes/primary_nodes/test_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,25 +119,25 @@ def test_save_project_change_material(cript_api, simple_project_node, complex_pr

# Modify deep in the tree
proj0 = copy.deepcopy(complex_project_node)
print("----proj0 w name")
# print("----proj0 w name")
epoch_name = str(int(time.time()))
proj0.name = f"sure to be a new name {epoch_name}"
print(proj0.name)

proj_json = proj0.get_expanded_json(indent=2) # .get_json().json
print("\n******__helloJSON__******")
print(proj_json)
# print("\n******__helloJSON__******")
# print(proj_json)
cript_api.save(proj0)
print("\n******__hello333__******")
# print("\n******__hello333__******")
# --- finished save --- now load node
# making sure this is a different object loaded , instead of comparing the same object
proj_loaded, proj_cache = cript.load_nodes_from_json(nodes_json=proj_json, _use_uuid_cache={})

print("~~ proj_loaded")
print(proj_loaded)
print("~~ proj_loaded.collection[0].inventory[0]")
print(proj_loaded.collection[0].inventory[0])
print("\n")
# print("~~ proj_loaded")
# print(proj_loaded)
# print("~~ proj_loaded.collection[0].inventory[0]")
# print(proj_loaded.collection[0].inventory[0])
# print("\n")

# print("type ~~ proj_loaded")
# print(type(proj_loaded))
Expand Down

0 comments on commit 826bf0e

Please sign in to comment.