Convenience functions to access and use terminologies
还没有人认领这个 Issue。
评估
调研方向
先从 issue #74 中的术语类和使用示例开始,然后将它们与现有的 object.get_terminology_equivalent() 行为进行比较。定义并实现提议的 fetch、equivalent 和 lookup 便捷入口,包括 URL 或 UUID 标识符的情况,并验证它们支持所描述的 section 和 property 工作流。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Python
- 星标
- 25
- 派生
- 30
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
G-Node/python-odml 的其他 Issue
-
RDF
难度 2/5 1-3 小时 新手友好度 72/100
G-Node/python-odml#172 ·
-
难度 2/5 1-3 小时 新手友好度 58/100
G-Node/python-odml#420 ·
-
难度 4/5 3-5 天 新手友好度 35/100
G-Node/python-odml#418 ·
-
难度 5/5 一周以上 新手友好度 25/100
G-Node/python-odml#417 · 8 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
G-Node/python-odml#406 ·
查看 G-Node/python-odml 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
FuRongJun-1999/dsh-memory#56 ·
维护者通常 1 天内回复
-
Bug
难度 2/5 1-3 小时 新手友好度 76/100
pgadmin-org/pgadmin4#10503 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
521xueweihan/HelloGitHub#3857 ·
-
documentation
难度 2/5 1-3 小时 新手友好度 74/100
rai-opensource/spatialmath-python#235 ·
维护者通常 1 天内回复
-
needs-ac
难度 2/5 1-3 小时 新手友好度 78/100
Ikalus1988/MisakaNet#2845 ·
维护者通常 1 天内回复