Convenience functions to access and use terminologies
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start with the terminology class and the usage example in issue #74, then compare them with the existing object.get_terminology_equivalent() behavior. Define and implement the proposed fetch, equivalent, and lookup convenience entry points, including the URL or UUID identifier cases, and verify that they support the described section and property workflows.
Written by the indexing model from the issue text.
Description
Access and using terminologies (e.g., g-node terminologies) are cumbersome at the moment (cf. example in #74).
It would be nice to have convenience functions in the terminology class for this, e.g.:
import odml.terminology as term
# fetches the g-node terminology, alternatively a local uri or another external url can be stated
term.fetch_terminology("G-Node")
# to find a possible terminology equivalent for a given object (returns clone of terminology entry)
term.get_terminology_equivalent(object) # object could be a section or a property object
# currently possible is only:
object.get_terminology_equivalent()
# to use a terminology as a building block for building a tree
sec_obj = odml.Section("Subject")
# case 1: I do not know exactly what terminology entry I want (e.g. for property)
new_sec = term.get_terminology(name="Age") # fetches property in terminology with name age
sec_obj.append(new_sec[2])
# case 2: I know exactly what terminology entry I want (e.g. for section)
sec_obj = term.get_terminology(url="http://portal.g-node.org/odml/terminologies/v1.0/subject/subject.xml", children=False)
In v1.4 the url-identifier could be also replaced with the uuids.
- Dominant language
- Python
- Stars
- 25
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from G-Node/python-odml
-
RDF
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
G-Node/python-odml#172 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
G-Node/python-odml#420 ·
-
Sparse file output Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
G-Node/python-odml#418 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
G-Node/python-odml#417 · 8 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
G-Node/python-odml#406 ·
All issues in G-Node/python-odml
Similar issues
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DiamondLightSource/dodal#2211 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
openml/openml-python#1749 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sipyourdrink-ltd/bernstein#6191 ·