v0.5.0
Breaking changes
There is one breaking change.
Enhance Term.definition
attribute
v0.5.0
enhances the definition of the ontology term with cross-references.
Previous state
Previously, the hpotk.model.Term
included a definition
attribute which was a simple str
:
import hpotk
hpo: hpotk.Ontology = ... # Get `Ontology` from somewhere
term = hpo.get_term('HP:0001166')
assert term.definition == 'Abnormally long and slender fingers ("spider fingers").'
New state
The v0.5.0
release encapsulates the definition into a hpotk.model.Definition
object that includes the definition string along with the cross-references:
term = hpo.get_term('HP:0001166')
# New code
definition = term.definition
assert definition.definition == 'Abnormally long and slender fingers ("spider fingers").'
assert definition.xrefs == ('HPO:probinson',)
How to migrate
All usages of term.definition
must be updated to term.definition.definition
.
What's Changed
- Setup benchmarking of graph traversals by @ielis in #60
- Add definition cross-references by @ielis in #63
- Add
OntologyStore
API by @ielis in #62
Full Changelog: v0.4.3...v0.5.0