Context file: Set @type to @id for terms that refer to a class
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 11
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
In the context file, use @id as the @type for any term where the range is a class.
For example, for createBy, which its range is Agent class, its entry in context file should look like this:
"createdBy": {
"@id": "https://spdx.org/rdf/3.1/terms/Core/createdBy",
"@type": "@id"
},
Currently we set the type as @vocab, but Agent is not a vocabulary.
Propose to change these lines:
to:
elif (o, RDF.type, OWL.Class) in g:
return {
"@id": subject,
"@type": "@id",
}
o here is not a vocabulary, because line 268, and it is a class, because line 276:
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start in spec_parser/rdf.py around lines 267-280 and inspect how context entries are generated for ranges that are vocabulary terms versus OWL classes. Update the class-handling branch so class ranges produce the proposed @id type, then verify that generated context entries such as createdBy use @type set to @id.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100