Releases: ielis/hpo-toolkit
v0.5.3
v0.5.2
v0.5.1
A patch release with no breaking changes and several bug fixes.
What's Changed
- Support providing custom stream to the logger by @ielis in #65
- Update the way we test the library by @ielis in #66
- Use default
ssl
context when fetching fromhttps
by @ielis in #67 - Update urls after the repo move by @ielis in #68
- Prevent storing ontology file at path with
None
in name by @ielis in #69
Full Changelog: v0.5.0...v0.5.1
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
v0.4.3
v0.4.2
v0.4.0
Add IndexedOntologyGraph
to speed up HPO graph operations by working in the term ID index space.
What's Changed
- Enhance the documentation by @ielis in #48
- Implement edge distance on
OntologyGraph
by @ielis in #51 - Implement hierarchical distance term id sorting by @ielis in #52
- Add
IndexedOntologyGraph
by @ielis in #53
Full Changelog: v0.3.1...v0.4.0
v0.3.1post1
Patch with improved documentation and tests. No changes to the production code.
v0.3.1
0.3.0
v0.3.0
introduces one breaking change (below), adds the user guide and API reference, and a few more enhancements.
Breaking change
The methods for getting ancestors, descendants, parents, and children of a term provide iterators and not iterables, despite the typing annotation. This may lead to a subtle bug if the iterator was used, e.g. within a nested loop:
hpo: MinimalOntology = ...
parents = hpo.graph.get_parents('HP:0001250')
for _ in range(5):
for parent in parents:
print(parent)
The loop above would, in fact, print only during the first iteration of the outer loop, and the iterator would be "consumed" for the remaining 4 iterations.
The v0.3.0
version merely corrects the typing annotation, the traversal methods continue to return iterators.
What's Changed
- Setup the documentation in #36
- Add type checks to terms, and ontology in #37
- Require
numpy~=1.23.0
to support creating object arrays from iterables by @ldingemans in #35 - Validate input parameters, improve documentation in #38
- Add
TermIdSorting
in #39 - Fix
OntologyGraph
type annotations - breaking change in #41
New Contributors
- @ldingemans made their first contribution in #35
Full Changelog: v0.2.0...0.3.0