Skip to content

Commit 148e4a2

Browse files
authored
Fix SPARQL test data (#1981)
This patch syncs the content of `test/data/suites/w3c/dawg-data-r2/` and `test/data/suites/w3c/sparql11/` with the upstream sources for these tests so we know that we are running the offical test suites. Other changes: - Use `.gitattributes` to instruct git to not tamper with the content of `test/data/suites/w3c/`. - Add an ingore for one more test of SPARQL which fails after this sync. - Ignore some extraneous files that come from upstream sources, specifically .bak and MacOS files.
1 parent 3447dc1 commit 148e4a2

File tree

100 files changed

+2224
-860
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+2224
-860
lines changed

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# This is here to prevent git from tampering with test data, as this tampering
2+
# results in test failures as some test are sensitive to line endings.
3+
test/data/suites/w3c/** -text

test/data/fetcher.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -201,19 +201,19 @@ def _member_io(
201201
# pattern=re.compile(r"^(.+)$"),
202202
# ),
203203
# NOTE: Commented out as this contains local modifications.
204-
# ArchiveResource(
205-
# remote="https://www.w3.org/2009/sparql/docs/tests/sparql11-test-suite-20121023.tar.gz",
206-
# local_path=(DATA_PATH / "suites" / "w3c" / "sparql11"),
207-
# type=ArchiveType.TAR_GZ,
208-
# pattern=re.compile(r"^[^\/]+[\/](.+)$"),
209-
# ),
204+
ArchiveResource(
205+
remote="https://www.w3.org/2009/sparql/docs/tests/sparql11-test-suite-20121023.tar.gz",
206+
local_path=(DATA_PATH / "suites" / "w3c" / "sparql11"),
207+
type=ArchiveType.TAR_GZ,
208+
pattern=re.compile(r"^[^\/]+[\/](.+)$"),
209+
),
210210
# NOTE: Commented out as this contains local modifications.
211-
# ArchiveResource(
212-
# remote="https://www.w3.org/2001/sw/DataAccess/tests/data-r2.tar.gz",
213-
# local_path=(DATA_PATH / "suites" / "w3c" / "dawg-data-r2"),
214-
# type=ArchiveType.TAR_GZ,
215-
# pattern=re.compile(r"^[^\/]+[\/]data-r2[\/](.+)$"),
216-
# ),
211+
ArchiveResource(
212+
remote="https://www.w3.org/2001/sw/DataAccess/tests/data-r2.tar.gz",
213+
local_path=(DATA_PATH / "suites" / "w3c" / "dawg-data-r2"),
214+
type=ArchiveType.TAR_GZ,
215+
pattern=re.compile(r"^[^\/]+[\/]data-r2[\/](.+)$"),
216+
),
217217
FileResource(
218218
remote=Request(
219219
"http://www.w3.org/2000/01/rdf-schema#", headers={"Accept": "text/turtle"}

test/data/suites/w3c/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# These should normally go into $XDG_CONFIG_HOME/git/ignore but they occur in
2+
# test data so for now this is the best option to avoid having them in git.
3+
*.bak
4+
._*
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0"?>
2+
<sparql
3+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4+
xmlns:xs="http://www.w3.org/2001/XMLSchema#"
5+
xmlns="http://www.w3.org/2005/sparql-results#">
6+
<head>
7+
<variable name="a"/>
8+
<variable name="y"/>
9+
<variable name="d"/>
10+
<variable name="z"/>
11+
</head>
12+
<results>
13+
<result>
14+
<binding name="a">
15+
<uri>http://example/x1</uri>
16+
</binding>
17+
<binding name="y">
18+
<uri>http://www.w3.org/1999/02/22-rdf-syntax-ns#Property</uri>
19+
</binding>
20+
<binding name="d">
21+
<literal datatype="http://www.w3.org/2001/XMLSchema#integer">4</literal>
22+
</binding>
23+
</result>
24+
</results>
25+
</sparql>
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
PREFIX : <http://example.org/ns#>
2-
3-
SELECT ?x
4-
{ ?x ?p '''x''' }
5-
6-
1+
PREFIX : <http://example.org/ns#>
2+
3+
SELECT ?x
4+
{ ?x ?p '''x''' }
5+
6+
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
<?xml version="1.0"?>
2-
<sparql
3-
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4-
xmlns:xs="http://www.w3.org/2001/XMLSchema#"
5-
xmlns="http://www.w3.org/2005/sparql-results#" >
6-
<head>
7-
<variable name="x"/>
8-
</head>
9-
<results>
10-
<result>
11-
<binding name="x">
12-
<uri>http://example.org/ns#x1</uri>
13-
</binding>
14-
</result>
15-
</results>
16-
</sparql>
1+
<?xml version="1.0"?>
2+
<sparql
3+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4+
xmlns:xs="http://www.w3.org/2001/XMLSchema#"
5+
xmlns="http://www.w3.org/2005/sparql-results#" >
6+
<head>
7+
<variable name="x"/>
8+
</head>
9+
<results>
10+
<result>
11+
<binding name="x">
12+
<uri>http://example.org/ns#x1</uri>
13+
</binding>
14+
</result>
15+
</results>
16+
</sparql>
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
PREFIX : <http://example.org/ns#>
2-
3-
SELECT ?x
4-
{ ?x ?p """x""" }
5-
6-
1+
PREFIX : <http://example.org/ns#>
2+
3+
SELECT ?x
4+
{ ?x ?p """x""" }
5+
6+
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
<?xml version="1.0"?>
2-
<sparql
3-
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4-
xmlns:xs="http://www.w3.org/2001/XMLSchema#"
5-
xmlns="http://www.w3.org/2005/sparql-results#" >
6-
<head>
7-
<variable name="x"/>
8-
</head>
9-
<results>
10-
<result>
11-
<binding name="x">
12-
<uri>http://example.org/ns#x1</uri>
13-
</binding>
14-
</result>
15-
</results>
16-
</sparql>
1+
<?xml version="1.0"?>
2+
<sparql
3+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4+
xmlns:xs="http://www.w3.org/2001/XMLSchema#"
5+
xmlns="http://www.w3.org/2005/sparql-results#" >
6+
<head>
7+
<variable name="x"/>
8+
</head>
9+
<results>
10+
<result>
11+
<binding name="x">
12+
<uri>http://example.org/ns#x1</uri>
13+
</binding>
14+
</result>
15+
</results>
16+
</sparql>
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
<?xml version="1.0"?>
2-
<sparql
3-
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4-
xmlns:xs="http://www.w3.org/2001/XMLSchema#"
5-
xmlns="http://www.w3.org/2005/sparql-results#" >
6-
<head>
7-
<variable name="x"/>
8-
</head>
9-
<results>
10-
<result>
11-
<binding name="x">
12-
<uri>http://example.org/ns#x2</uri>
13-
</binding>
14-
</result>
15-
</results>
16-
</sparql>
1+
<?xml version="1.0"?>
2+
<sparql
3+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4+
xmlns:xs="http://www.w3.org/2001/XMLSchema#"
5+
xmlns="http://www.w3.org/2005/sparql-results#" >
6+
<head>
7+
<variable name="x"/>
8+
</head>
9+
<results>
10+
<result>
11+
<binding name="x">
12+
<uri>http://example.org/ns#x2</uri>
13+
</binding>
14+
</result>
15+
</results>
16+
</sparql>
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
<?xml version="1.0"?>
2-
<sparql
3-
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4-
xmlns:xs="http://www.w3.org/2001/XMLSchema#"
5-
xmlns="http://www.w3.org/2005/sparql-results#" >
6-
<head>
7-
<variable name="x"/>
8-
</head>
9-
<results>
10-
<result>
11-
<binding name="x">
12-
<uri>http://example.org/ns#x3</uri>
13-
</binding>
14-
</result>
15-
</results>
16-
</sparql>
1+
<?xml version="1.0"?>
2+
<sparql
3+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4+
xmlns:xs="http://www.w3.org/2001/XMLSchema#"
5+
xmlns="http://www.w3.org/2005/sparql-results#" >
6+
<head>
7+
<variable name="x"/>
8+
</head>
9+
<results>
10+
<result>
11+
<binding name="x">
12+
<uri>http://example.org/ns#x3</uri>
13+
</binding>
14+
</result>
15+
</results>
16+
</sparql>

0 commit comments

Comments
 (0)