Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Primary JSON and TTL release artefacts get wrong ontology IRI (ONTBASE instead of URIBASE)

已关闭 适合新手
#53 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@matentzn 已经在做这个了。

开始于 2026年10月29日。

  • #54 来自 @matentzn —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
领域
build-system

调研方向

从 src/incatools/odk/templates/src/ontology/Makefile.jinja2 入手,重点查看第 1805–1815 行附近 $(ONT).ttl 和 $(ONT).json 的主要规则,并将它们的 --ontology-iri 参数与第 1555 行附近 $(ONT).owl 的规则进行比较。使用提供的示例 make -n -B omo.json 检查渲染后的 Makefile。主要 JSON 和 TTL 导出与 OWL 一样一致地使用规范 IRI 基础,且变体规则保留现有 IRI,即为完成。

由索引模型根据 Issue 内容生成。

描述

Since the release artefacts section was reformatted, the rules for the primary $(ONT).json and $(ONT).ttl annotate the ontology IRI with $(ONTBASE)/$@ instead of $(URIBASE)/$@. For OBO ontologies that puts the primary JSON/TTL under obo/<id>/<id>.json rather than the canonical obo/<id>.json.

I hit this updating OMO (information-artifact-ontology/ontology-metadata) from v1.6.1 to v1.7. The released omo.json has "id" : "http://purl.obolibrary.org/obo/omo.json"; after the update the next release would ship with http://purl.obolibrary.org/obo/omo/omo.json, which is not the canonical PURL. The $(ONT).owl rule still uses $(URIBASE)/$@, so the primary .owl and .json/.ttl now carry different ontology IRIs. This hits every ODK repo that has json or ttl in export_formats.

The variant rules ($(ONT)-full.json, $(ONT)-base.ttl etc.) were already using $(ONTBASE)/$@ in v1.6.1 and are unchanged. The primary rules used $(URIBASE) and were folded into the variant pattern during the reformat; the commit message says nothing about changing IRIs, so I take this to be a side effect, not a decision. Whether exports should get a format-specific IRI at all is the separate question in INCATools/ontology-development-kit#1366. I compared every --ontology-iri in the 1.6.1 template against the current one: these two rules are the only accidental change.

Examples

v1.6.1:

$(ONT).json: $(ONT).owl
	$(ROBOT) annotate --input $< --ontology-iri $(URIBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
		convert --check false -f json -o [email protected] &&\
		mv [email protected] $@

v1.7:

$(ONT).json: $(ONT).owl
	$(ROBOT) annotate --input $< --ontology-iri $(ONTBASE)/$@ \
	         $(ANNOTATE_ONTOLOGY_VERSION) \
	         convert --check false --format json --output $@

$(ONT).ttl changed the same way ($(URIBASE)/$@ → $(ONTBASE)/$@); OMO doesn't export TTL so I only saw the JSON one in practice.

With URIBASE=http://purl.obolibrary.org/obo and ONTBASE=http://purl.obolibrary.org/obo/omo, make -n -B omo.json in OMO gives:

robot --catalog catalog-v001.xml annotate --input omo.owl --ontology-iri http://purl.obolibrary.org/obo/omo/omo.json \
	         annotate --version-iri http://purl.obolibrary.org/obo/omo/releases/2026-10-27/omo.json ...
Artefact v1.6.1 ontology IRI v1.7 ontology IRI
omo.owl http://purl.obolibrary.org/obo/omo.owl http://purl.obolibrary.org/obo/omo.owl
omo.json http://purl.obolibrary.org/obo/omo.json http://purl.obolibrary.org/obo/omo/omo.json
omo-full.json http://purl.obolibrary.org/obo/omo/omo-full.json http://purl.obolibrary.org/obo/omo/omo-full.json

Related

  • Template: src/incatools/odk/templates/src/ontology/Makefile.jinja2, L1805-1808 ($(ONT).ttl) and L1812-1815 ($(ONT).json); the $(ONT).owl rule at L1555 still uses $(URIBASE)
  • Introduced in ac746b7 ("Move and re-format the release artefacts section.")
  • INCATools/ontology-development-kit#1366
主要语言
Jinja
星标
3
派生
4
平均合并
1 天 3 小时
30 天内合并 PR
12

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

INCATools/odkcore 的其他 Issue

查看 INCATools/odkcore 的全部 Issue

相似的 Issue

更多 Build System Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。