fix: README サンプルの dbp:dbpaCompressParentListID / dbp:dbpaCompressColumnID を正式名(末尾 Id)に訂正 - #28
Open
github-actions[bot] wants to merge 1 commit into
Open
fix: README サンプルの dbp:dbpaCompressParentListID / dbp:dbpaCompressColumnID を正式名(末尾 Id)に訂正#28github-actions[bot] wants to merge 1 commit into
dbp:dbpaCompressParentListID / dbp:dbpaCompressColumnID を正式名(末尾 Id)に訂正#28github-actions[bot] wants to merge 1 commit into
Conversation
…mnID を語彙側の正式名に訂正 dbp-schema.jsonld が定義しているのは dbp:dbpaCompressParentListId / dbp:dbpaCompressColumnId(末尾 Id)だが、README のサンプル JSON-LD は末尾 ID の 綴りを 24 箇所で使っていた。実在するプロパティに見えて何にも解決しない。 再発防止として、README 中の dbp: 用語がすべて dbp-schema.jsonld に定義されて いるかを検査する check_readme_terms.py を追加(標準ライブラリのみ)。修正前の README では 2 件を検出して非ゼロ終了し、修正後は成功する。 Co-authored-by: Yoshietru Nagata <nagata-yoshiteru@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
何が問題か
dbp-schema.jsonld(dbp_schema.protoからProtoToJsonld.pyで生成)が定義しているのはdbp:dbpaCompressParentListIddbp:dbpaCompressColumnId(末尾
Id)ですが、README のサンプル JSON-LD は末尾IDの綴りを 24 箇所(各 12 箇所)で使っていました。JSON-LD としては未定義の項目が黙って落ちるだけなので、実在するプロパティに見えて何にも解決しない状態でした。README をコピーして使うと、SemantiPack 圧縮の列 ID / 親リスト ID が一切伝わりません。
なお
dbp:dbpaCompressRowID/dbp:dbpaCompressListIDは proto 側が末尾IDで定義しているため 正しく、変更していません(proto 側のID/Id混在自体は語彙の破壊的変更になるため本 PR では触っていません)。Issue
#21/ PR#24のdbp:dbpaDateTimeFormatと同種の不具合ですが、別の用語であり、既出の提案ではありません。変更内容
ID→Id)。check_readme_terms.pyを追加。README 中のdbp:用語がすべてdbp-schema.jsonldに定義されているかを検査します(標準ライブラリのみ、依存追加なし)。README の「Check」節に実行方法を記載。検証
dbp:dbpaCompressColumnID/dbp:dbpaCompressParentListIDの 2 件を検出して exit 1。ProtoToJsonld.pyを実行してdbp-schema.jsonld/dbp-schema.ja.jsonldを再生成し、コミット済みファイルと 完全一致することを確認(生成物の変更なし)。調査したが今回は対象外にしたもの
dbp:bytesが未定義のままdbp:dataのschema:rangeIncludesに出ている → 既存の Issue dbp:bytes が未定義で使われている #12 があるためスキップ。ProtoToJsonld.pyの schema.org 線形探索 → オープン PR#23で対応中のためスキップ。dbp_schema.protoとdbp_schema.ja.protoのメッセージ / フィールド番号 / 型は完全一致、生成物(dbp_schema.pb.go/src/dbp_schema.rs)も最新であることを確認済み。Closes #27
Generated with Claude Code