Test compact#t0080 is wrong
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 106
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
The test compact#t0080 is wrong, IMO.
The input (which is in expanded form) corresponds to the following dataset:
_:b0 <http://example.org/input> <http://example.org/gid> .
_:b1 <http://example.org/value> "x" <http://example.org/gid> .
however, the expected compacted result expands to the following dataset:
_:b0 <http://example.org/input> _:b1 .
_:b2 <http://example.org/value> "x" <http://example.org/gid> .
(and the JSON-LD expanded form has an extra level of @graph compared to the original input).
As noted by @gkellogg in a comment on a related issue:
the value of input (...) is not an anonymous named graph. (...) Arguably, the
inputterm should not be chosen, as it doesn't match.
Given the discrepancy between the input and the output, I would argue that the input term MUST not be chosen. The output of compact#t0080 should be:
{
"@context": {
"@vocab": "http://example.org/",
"input": {
"@container": "@graph"
}
},
"http://example.org/input": {
"@graph": {
"value": "x"
},
"@id": "http://example.org/gid"
}
}
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.
Research direction
Start with the compact#t0080 entry in the compact manifest and compare its input and expected output with the discussion in issue 512, especially the linked comment. Resolve whether the input term may be selected under the JSON-LD compaction rules, then update the test expectation only if the standard requires it and verify the expanded datasets match.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- data, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100