Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Commit

Permalink
Release v0.6.3 (#90)
Browse files Browse the repository at this point in the history
* Quantity now required, keyword not required for Ingredient

* Patch to fix inventory saving post indexing problem

* bumped SDK version from 0.6.2 to 0.6.3 for the newest patch and release (#89)

---------

Co-authored-by: Carlos Villa <villac@mit.edu>
  • Loading branch information
nh916 and CVilla17 authored Apr 8, 2023
1 parent ca63f0c commit 503c82c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = cript
version = 0.6.2
version = 0.6.3
description = CRIPT Python SDK
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down
9 changes: 7 additions & 2 deletions src/cript/data_model/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,14 @@ def _generate_nested_nodes(self, get_level: int = 1, level: int = 0):
skip_nodes = True

node_dict = self.__dict__
fields_to_skip = {
"url",
"_Inventory__index_table",
"_Inventory__degenerate_index_table",
}
for key, value in node_dict.items():
# Skip empty values and the url field
if not value or key == "url":
# Skip empty values and other fields that should be skipped
if not value or key in fields_to_skip:
continue

# Generate nodes
Expand Down
4 changes: 2 additions & 2 deletions src/cript/data_model/subobjects/ingredient.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class Ingredient(BaseSubobject):
def __init__(
self,
material: Union[Material, str],
keyword: str,
quantities: list[Union[Quantity, dict]] = None,
quantities: list[Union[Quantity, dict]],
keyword: str = None,
):
super().__init__()
self.material = material
Expand Down

0 comments on commit 503c82c

Please sign in to comment.