Skip to content

Commit

Permalink
- Internal class hierarchy restructured for logical clarity in recent…
Browse files Browse the repository at this point in the history
… releases, formally highlighted in this release

- Most visible TRAPIResponseValidator class (previously) moved from the **`reasoner_validator.__init__.py`** package module, into its own  **`reasoner_validator.validator`** module
- Some documentation repair
  • Loading branch information
RichardBruskiewich committed Aug 7, 2023
1 parent 11d3826 commit 04bdf56
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 38 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

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

## 3.8.0
- Internal class hierarchy restructured for logical clarity in recent releases, formally highlighted in this release
- Most visible TRAPIResponseValidator class (previously) moved from the **`reasoner_validator.__init__.py`** package module, into its own **`reasoner_validator.validator`** module
- Some documentation repair

## 3.7.6
- TRAPI qualifier validation enhanced by use of biolink:Association subclass slot_usage driven constraints (leveraging novel Biolink Model Toolkit 1.1.1 methods)
- Validation made TRAPI Response (TRAPI) schema_version and biolink_version aware, taking precedence over default (non-overridden) values of these version parameters.

- Validation made TRAPI Response (TRAPI) **`schema_version`** and **`biolink_version`** aware, taking precedence over default (non-overridden) values of these version parameters.

## 3.7.5
- Added TRAPI Response schema version and biolink version validation warning codes
Expand Down
33 changes: 18 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ The web service has a single POST endpoint `/validate` taking a simple JSON requ
"kp_source_type": "primary"
},
"strict_validation": true,
"response": {<some full JSON object of a TRAPI query Response...>}
"response": "{<some full JSON object of a TRAPI query Response...>}"
}
```

Expand Down Expand Up @@ -230,27 +230,30 @@ one should typically get a response body something like the following JSON valid
"trapi_version": "1.4.1",
"biolink_version": "3.2.1",
"messages": {
# some categories of messages may be absent, hence, empty dictionaries
"_comment": "some categories of messages may be absent, hence, empty dictionaries",
"critical": {},
"errors": {
"error.knowledge_graph.node.category.missing": {
# this message template does not have any additional parameters
# other than identifier hence it just has the unique identifier
# value as a dictionary key, with associated value None
"MONDO:0005148": None
"_comment": "source scope of the validation error ('global' or some knowledge source path string)",
"global": {
"_comment": "this message template does not have any additional parameters other than identifier hence it just has the unique identifier value as a dictionary key, with associated value None",
"MONDO:0005148": null
}
}
},
"warnings": {
# validation code
"_comment": "validation code",
"warning.knowledge_graph.node.unmapped_prefix": {
# template identifier field value
"CHEBI:6801": [
{
# additional message template field values, if applicable
"categories": "['biolink:Drug']"
}
]

"global": {
"_comment": "template identifier field value",
"CHEBI:6801": [
{
"_comment": "additional message template field values, if applicable",
"categories": "['biolink:Drug']"
}
]
}

}
},
"information": {},
Expand Down
14 changes: 7 additions & 7 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ in a dictionary looking something like the following (as an example):
messages: Dict[str, List[Dict[str,str]]] = {
"information": {
"info.excluded": {
# source scope of the validation error ("global" or some knowledge source path string
# source scope of the validation error ("global" or some knowledge source path string)
"global": {
# the uniquely discriminating 'identifier' here is the edge_id
"(ZFIN:ZDB-GENE-060825-345$biolink:Gene)--[biolink:active_in]->(GO:0042645$biolink:CellularComponent)": None
Expand Down Expand Up @@ -246,24 +246,24 @@ The web service has a single POST endpoint `/validate` taking a simple JSON requ
.. code-block:: json
{
# If the TRAPI version is omitted or set to None, then the 'latest' TRAPI version is used.
"_comment": "If the TRAPI version is omitted or set to None, then the 'latest' TRAPI version is used.
# Note: for TRAPI releases from 1.4.0 onwards, the Response message will state the assumed 'schema_version'.
# This modifies slightly the interpretation of this parameter, as follows:
# If the following trapi_version parameter is given, then it overrides the TRAPI Response 'schema_version';
# Otherwise, a TRAPI 1.4.0 Response embedded 'schema_version' (not 'latest') becomes the default validation version.
# Otherwise, a TRAPI 1.4.0 Response embedded 'schema_version' (not 'latest') becomes the default validation version."
trapi_version="1.4.2",
"trapi_version": "1.4.2",
# If the Biolink Model version is omitted or set to None, then the current Biolink Model Toolkit is used.
"_comment": "If the Biolink Model version is omitted or set to None, then the current Biolink Model Toolkit is used.
# Note: for TRAPI releases from 1.4.0 onwards, the Response message will state the assumed 'biolink_version'.
# This modifies slightly the interpretation of this parameter, as follows:
# If the 'biolink_version' given here is assumed, which overrides the TRAPI Response stated 'biolink_version';
# Otherwise, a TRAPI 1.4.0 Response embedded 'biolink_version' (not BMT) becomes the default validation version.
# The biolink_version may also be set to the string 'suppress', in which case, most Biolink Model validation is NOT done during the validation of a TRAPI Response.
# The biolink_version may also be set to the string 'suppress', in which case, most Biolink Model validation is NOT done during the validation of a TRAPI Response."
biolink_version="3.5.0",
"biolink_version": "3.5.0",
"sources": {
"ara_source": "infores:aragorn",
Expand Down
25 changes: 12 additions & 13 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.7.6"
version = "3.8.0"
description = "Validation tools for Reasoner API"
authors = [
"Richard Bruskiewich <richard.bruskiewich@delphinai.com>",
Expand Down

0 comments on commit 04bdf56

Please sign in to comment.