From 3905b9ed7c2f69273873c58bbc7005a1c2c5d21a Mon Sep 17 00:00:00 2001 From: maxsibilla Date: Thu, 14 May 2026 10:31:19 -0400 Subject: [PATCH 1/2] Bumping versions --- VERSION | 2 +- entity-api-spec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 18b31142..db77e0ee 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.10.4 +1.10.5 diff --git a/entity-api-spec.yaml b/entity-api-spec.yaml index a84cb48f..52b5ae03 100644 --- a/entity-api-spec.yaml +++ b/entity-api-spec.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: description: 'The SenNet Entity API is a standard RESTful web service with create, update and read operations for the standard SenNet provenance graph entities.' - version: 1.10.4 + version: 1.10.5 title: SenNet Entity API contact: name: SenNet Help Desk From 917f898fa3889b94dbf5ff05b16c78004b1fffad Mon Sep 17 00:00:00 2001 From: maxsibilla Date: Thu, 28 May 2026 14:16:20 -0400 Subject: [PATCH 2/2] Removing organoid from source check --- src/app.py | 9 ++++----- src/lib/title.py | 10 +++++----- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/app.py b/src/app.py index b609b5a6..7c65656b 100644 --- a/src/app.py +++ b/src/app.py @@ -1430,18 +1430,17 @@ def create_entity(entity_type: str, user_token: str, json_data_dict: dict, suppr if organ_code.upper() in ["FMA:57991", "FMA:57987"] and direct_ancestor_dict[ "source_type" ] not in [ - source_types.HUMAN, - source_types.HUMAN_ORGANOID, + source_types.HUMAN ]: abort_bad_req( - "The organ codes FMA:57991 and FMA:57987 are only valid for human and human organoid source type" + "The organ codes FMA:57991 and FMA:57987 are only valid for human source type" ) if organ_code.upper() in ["UBERON:0001911"] and direct_ancestor_dict[ "source_type" - ] not in [source_types.MOUSE, source_types.MOUSE_ORGANOID]: + ] not in [source_types.MOUSE]: abort_bad_req( - "The organ code UBERON:0001911 is only valid for mouse and mouse organoid source type" + "The organ code UBERON:0001911 is only valid for mouse source type" ) # Generate 'before_create_triiger' data and create the entity details in Neo4j diff --git a/src/lib/title.py b/src/lib/title.py index 0475a61b..5d30c1fa 100644 --- a/src/lib/title.py +++ b/src/lib/title.py @@ -64,8 +64,8 @@ def get_attributes_from_source_metadata(source_type: str, source_metadata: dict) source_grouping_concepts_dict = dict() source_types = Ontology.ops().source_types() - if source_type in [source_types.HUMAN, source_types.HUMAN_ORGANOID]: - # human and human organoid source + if source_type in [source_types.HUMAN]: + # human if "organ_donor_data" in source_metadata: source_metadata = source_metadata["organ_donor_data"] @@ -88,7 +88,7 @@ def get_attributes_from_source_metadata(source_type: str, source_metadata: dict) source_grouping_concepts_dict["sex"] = data["preferred_term"].lower() else: - # mouse and mouse organoid source, just pass through + # mouse source, just pass through source_grouping_concepts_dict = source_metadata return source_grouping_concepts_dict @@ -114,7 +114,7 @@ def get_source_data_phrase(source_type: str, source_data: dict) -> str: """ source_types = Ontology.ops().source_types() - if source_type in [source_types.HUMAN, source_types.HUMAN_ORGANOID]: + if source_type in [source_types.HUMAN]: # human and human organ age = source_data.get("age") age_units = source_data.get("age_units") @@ -138,7 +138,7 @@ def get_source_data_phrase(source_type: str, source_data: dict) -> str: else: return f"{age} {age_units}-old {race} {sex}" else: - # mouse and mouse organoid + # mouse parts = [] if strain := source_data.get("strain"): parts.append(strain)