Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add two xfails related to Example 2 from RDF 1.1 TriG specification
The first xfail occurs during round tripping, TriG seems to be making some mistake when encoding blank nodes, as it is encoding that "Bob" knows someone who does not exist. This was reported by @gjhiggins in #1796 (comment) The second xfail seems to be related to hextuple parsing, when comparing the hextuple parsed result of Example 2 with the TriG parsed graph of Example 2 the graphs are not isomorphic more than 70% of the time, but sometimes they are isomorphic. Inoticed this while adding the xfail for the issue @gjhiggins noticed. Other changes: - Added `simple_quad` to variants tests with HexTuple and TriG format. - Added an additional exact_match assert for variants which can be used to sidestep some of the known issues with isomorphic graph detection. This is useful for graphs with no BNodes. - Also added round-tripping for `variants/simple_quad.trig`. - Various changes to ensure determensitic ordering so that it is easier to compare things visually and so that tests always do the exact same thing in the exact same order.
- Loading branch information
Showing
22 changed files
with
198 additions
and
21 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"quad_count": 7 | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
["_:b", "http://xmlns.com/foaf/0.1/mbox", "mailto:alice@work.example.org", "globalId", "", "http://example.org/alice"] | ||
["_:b", "http://xmlns.com/foaf/0.1/name", "Alice", "http://www.w3.org/2001/XMLSchema#string", "", "http://example.org/alice"] | ||
["_:a", "http://xmlns.com/foaf/0.1/mbox", "mailto:bob@oldcorp.example.org", "globalId", "", "http://example.org/bob"] | ||
["_:a", "http://xmlns.com/foaf/0.1/name", "Bob", "http://www.w3.org/2001/XMLSchema#string", "", "http://example.org/bob"] | ||
["_:a", "http://xmlns.com/foaf/0.1/knows", "_:b", "localId", "", "http://example.org/bob"] | ||
["http://example.org/bob", "http://purl.org/dc/terms/publisher", "Bob", "http://www.w3.org/2001/XMLSchema#string", "", ""] | ||
["http://example.org/alice", "http://purl.org/dc/terms/publisher", "Alice", "http://www.w3.org/2001/XMLSchema#string", "", ""] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"@graph": [ | ||
{ | ||
"@graph": [ | ||
{ | ||
"@id": "http://example.org/bob", | ||
"http://purl.org/dc/terms/publisher": "Bob" | ||
}, | ||
{ | ||
"@id": "http://example.org/alice", | ||
"http://purl.org/dc/terms/publisher": "Alice" | ||
} | ||
] | ||
}, | ||
{ | ||
"@graph": [ | ||
{ | ||
"@id": "_:a", | ||
"http://xmlns.com/foaf/0.1/knows": { | ||
"@id": "_:b" | ||
}, | ||
"http://xmlns.com/foaf/0.1/mbox": { | ||
"@id": "mailto:bob@oldcorp.example.org" | ||
}, | ||
"http://xmlns.com/foaf/0.1/name": "Bob" | ||
} | ||
], | ||
"@id": "http://example.org/bob" | ||
}, | ||
{ | ||
"@graph": [ | ||
{ | ||
"@id": "_:b", | ||
"http://xmlns.com/foaf/0.1/mbox": { | ||
"@id": "mailto:alice@work.example.org" | ||
}, | ||
"http://xmlns.com/foaf/0.1/name": "Alice" | ||
} | ||
], | ||
"@id": "http://example.org/alice" | ||
} | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
_:a <http://xmlns.com/foaf/0.1/knows> _:b <http://example.org/bob> . | ||
_:a <http://xmlns.com/foaf/0.1/mbox> <mailto:bob@oldcorp.example.org> <http://example.org/bob> . | ||
_:a <http://xmlns.com/foaf/0.1/name> "Bob" <http://example.org/bob> . | ||
_:b <http://xmlns.com/foaf/0.1/mbox> <mailto:alice@work.example.org> <http://example.org/alice> . | ||
_:b <http://xmlns.com/foaf/0.1/name> "Alice" <http://example.org/alice> . | ||
<http://example.org/alice> <http://purl.org/dc/terms/publisher> "Alice" . | ||
<http://example.org/bob> <http://purl.org/dc/terms/publisher> "Bob" . |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# from example 2 in https://www.w3.org/TR/trig/#sec-graph-statements | ||
|
||
# This document contains a default graph and two named graphs. | ||
|
||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix dc: <http://purl.org/dc/terms/> . | ||
@prefix foaf: <http://xmlns.com/foaf/0.1/> . | ||
|
||
# default graph | ||
{ | ||
<http://example.org/bob> dc:publisher "Bob" . | ||
<http://example.org/alice> dc:publisher "Alice" . | ||
} | ||
|
||
<http://example.org/bob> | ||
{ | ||
_:a foaf:name "Bob" . | ||
_:a foaf:mbox <mailto:bob@oldcorp.example.org> . | ||
_:a foaf:knows _:b . | ||
} | ||
|
||
<http://example.org/alice> | ||
{ | ||
_:b foaf:name "Alice" . | ||
_:b foaf:mbox <mailto:alice@work.example.org> . | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"quad_count": 3 | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"quad_count": 4 | ||
"quad_count": 4, | ||
"exact_match": true | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"quad_count": 1, | ||
"exact_match": true | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
["http://example.org/subject", "http://example.org/predicate", "http://example.org/object", "globalId", "", "http://example.org/graph"] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[ | ||
{ | ||
"@graph": [ | ||
{ | ||
"@id": "http://example.org/subject", | ||
"http://example.org/predicate": [ | ||
{ | ||
"@id": "http://example.org/object" | ||
} | ||
] | ||
} | ||
], | ||
"@id": "http://example.org/graph" | ||
} | ||
] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<http://example.org/subject> <http://example.org/predicate> <http://example.org/object> <http://example.org/graph> . |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@prefix example: <http://example.org/>. | ||
|
||
example:graph { | ||
example:subject example:predicate example:object . | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"quad_count": 1 | ||
"quad_count": 1, | ||
"exact_match": true | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<http://example.org/subject> <http://example.org/predicate> <http://example.org/object> . |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<http://example.org/subject> <http://example.org/predicate> <http://example.org/object> . |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"quad_count": 7 | ||
"quad_count": 7, | ||
"exact_match": true | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"quad_count": 1 | ||
"quad_count": 1, | ||
"exact_match": true | ||
} |