Skip to content

Commit

Permalink
Preparing release 4.1.9 which temporarily removes 'biolink:treats'-dr…
Browse files Browse the repository at this point in the history
…iven validation of "biolink:support_graphs", as per CQS team discussions
  • Loading branch information
RichardBruskiewich committed May 17, 2024
1 parent 01fcf61 commit bff6fe1
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 18 deletions.
6 changes: 5 additions & 1 deletion 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.

## 4.1.9

- temporarily removed **`biolink:treats`** predicate validation check for **`biolink:supporting_graphs`** attribute value, pending community-wide implementation of the recently specified 'treats' predicate knowledge graph annotation standards.

## 4.1.8

- BMT update to 1.4.1 (with default Biolink Model 4.2.1)
- implemented rudimentary **`biolink:treats`** predicate validation check for **`biolink:supporting_graph`** attribute value.
- implemented rudimentary **`biolink:treats`** predicate validation check for **`biolink:supporting_graphs`** attribute value.

## 4.1.7

Expand Down
8 changes: 4 additions & 4 deletions DEVELOPER_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ Steps to properly issue a new project release:
2. If the **codes.yaml** were revised, regenerated the associate code documentation by running the **reasoner_validator/validation_codes.py** module as a script from the CLI.
3. Run the unit test suite to ensure that nothing fails. Iterate to fix failures (in the code or in terms of revised unit tests to reflect fresh code designs)
4. Document release changes in the **CHANGELOG.md**
5. Update the **`[Tool Poetry]version =`** field in the **pyprojects.yaml**, e.g. "4.1.8"
5. Update the **`[Tool Poetry]version =`** field in the **pyprojects.yaml**, e.g. "4.1.9"
6. Run **`poetry update`** (preferably within **`poetry shell`**)
7. The project pip **requirements.txt** file snapshot of dependencies should also be updated at this point (type **`$ poetry export --output requirements.txt`**, assuming that the [proper poetry export plugin is installed](https://python-poetry.org/docs/pre-commit-hooks#poetry-export)). This may facilitate module deployment within environments that prefer to use pip rather than poetry to manage their deployments.
8. Commit or pull request merge all files (including the **poetry.lock** file) to **master**
9. Add the equivalent Git **tag** to **master**. This should be the Semantic Version string from step 4 with an added 'v' prefix, i.e. "v4.1.8".
9. Add the equivalent Git **tag** to **master**. This should be the Semantic Version string from step 4 with an added 'v' prefix, i.e. "v4.1.9".
10. Push **master** to remote.
11. Check if Git Actions for testing and documentation complete successfully.
12. Create the release using the same release tag, i.e. "v4.1.8".
13. Check if Git Action for package deployment is successful and check if the new version (i.e. "4.1.8") is now visible on **[pypy.org](https://pypi.org/search/?q=reasoner-validator)**
12. Create the release using the same release tag, i.e. "v4.1.9".
13. Check if Git Action for package deployment is successful and check if the new version (i.e. "4.1.9") is now visible on **[pypy.org](https://pypi.org/search/?q=reasoner-validator)**
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 = "4.1.8"
version = "4.1.9"
description = "Validation tools for Reasoner API"
authors = [
"Richard Bruskiewich <[email protected]>",
Expand Down
27 changes: 15 additions & 12 deletions reasoner_validator/biolink/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,8 +785,9 @@ def validate_attributes(
found_knowledge_level = False
found_agent_type = False

# Track presence of 'support_graph' for some predicates (e.g. 'treats')
found_support_graph = False
# TODO: Defer tracking of the presence of 'biolink:support_graphs'
# for specified predicates like 'treats' or its descendants
# found_support_graphs = False

for attribute in attributes:

Expand Down Expand Up @@ -926,9 +927,10 @@ def validate_attributes(
infores == kp_source:
found_kp_knowledge_source = True

# Check for 'support_graph'
if attribute_type_id == "biolink:support_graph":
found_support_graph = False
# TODO: Defer tracking of the presence of 'biolink:support_graphs'
# for specified predicates like 'treats' or its descendants
# if attribute_type_id == "biolink:support_graphs":
# found_support_graphs = False

# We expect at this point that, if 'attribute_type_id' is a
# 'knowledge_level' or 'agent_type', then the value is a scalar
Expand Down Expand Up @@ -1008,13 +1010,14 @@ def validate_attributes(
identifier=edge_id
)

#
predicate = edge['predicate'] if 'predicate' in edge else None
if self.is_treats(predicate) and not found_support_graph:
self.report(
code="warning.knowledge_graph.edge.treats.support_graph.missing",
identifier=edge_id
)
# TODO: Defer tracking of the presence of 'biolink:support_graphs'
# for specified predicates like 'treats' or its descendants
# predicate = edge['predicate'] if 'predicate' in edge else None
# if self.is_treats(predicate) and not found_support_graphs:
# self.report(
# code="warning.knowledge_graph.edge.treats.support_graph.missing",
# identifier=edge_id
# )

return source_trail # may be 'None' if the required attributes are missing

Expand Down

0 comments on commit bff6fe1

Please sign in to comment.