biolink / biolink-model-toolkit

A collection of useful python functions for looking up information and working with the Biolink Model
https://biolink.github.io/biolink-model-toolkit/
BSD 3-Clause "New" or "Revised" License
20 stars 10 forks source link

issue-139-enhance-qualifier-value-validation #143

Closed RichardBruskiewich closed 11 months ago

RichardBruskiewich commented 11 months ago

Issue https://github.com/biolink/biolink-model-toolkit/issues/139 substantially resolved.

sonarcloud[bot] commented 11 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

RichardBruskiewich commented 11 months ago

Looks good; I guess we add the “is subproperty of” wrapper around the existing get_descendents method for readibility?

I guess you might say that the is_subproperty_of method, as simple as it is coded, is functionally equivalent to self.is_permissible_value_of_enum(enum.name, qualifier_value) but has clear semantics within context of the Biolink Model - i.e. embodies the meaning of subproperty_of.

BTW, I'm not personally 100% sure about the full semantics of subproperty_of. Is there any context in which it means more than just the descendants of a given predicate (slot) value? I've sometimes wondered why this model property was named subproperty_of instead of some name including the word 'predicate'.