Skip to content

Commit

Permalink
Prepare v3.5.10 patch release
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardBruskiewich committed Jun 17, 2023
1 parent 0b9f355 commit 8240306
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

The Reasoner Validator package is evolving along with progress in TRAPI and Biolink Model standards within the NCATS Biomedical Knowledge Translator.

## v3.5.10
- Extend TRAPI Response sanitization (following Eric Deutsch guidance)

## v3.5.9
- Fixed bug in attribute_type_id detection of attribute_type_id namespaces

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "reasoner-validator"
version = "3.5.9"
version = "3.5.10"
description = "Validation tools for Reasoner API"
authors = [
"Richard Bruskiewich <[email protected]>",
Expand Down
7 changes: 5 additions & 2 deletions reasoner_validator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class TRAPIResponseValidator(ValidationReporter):

TRAPI_1_3_0 = SemVer.from_string("1.3.0")
TRAPI_1_4_0 = SemVer.from_string("1.4.0")
TRAPI_1_4_0_BETA3 = SemVer.from_string("1.4.0-beta3")
TRAPI_1_4_0_BETA4 = SemVer.from_string("1.4.0-beta4")

def __init__(
Expand Down Expand Up @@ -90,8 +91,10 @@ def sanitize_trapi_response(self, response: Dict) -> Dict:
if 'upstream_resource_ids' not in source or source['upstream_resource_ids'] is None:
source['upstream_resource_ids'] = []

# 'auxiliary_graphs' ought to be nullable, however... not specified that way (yet)
if 'auxiliary_graphs' not in response['message'] or response['message']['auxiliary_graphs'] is None:
# 'auxiliary_graphs' (from TRAPI 1.4.0-beta2 onwards)
# ought to be nullable, however... not specified that way (yet)
if current_version >= self.TRAPI_1_4_0_BETA3 and \
('auxiliary_graphs' not in response['message'] or response['message']['auxiliary_graphs'] is None):
response['message']['auxiliary_graphs'] = []

if 'workflow' in response and response['workflow']:
Expand Down

0 comments on commit 8240306

Please sign in to comment.