Skip to content

Commit ffa2314

Browse files
committed
test case fix: reference duplicate
1 parent 65e852c commit ffa2314

File tree

3 files changed

+40
-42
lines changed

3 files changed

+40
-42
lines changed

lib/bald/tests/integration/CDL/multi_array_reference.cdl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ variables:
77
prefix_list:bald__ = "http://binary-array-ld.net/latest/" ;
88
prefix_list:metce__ = "http://codes.wmo.int/common/observation-type/METCE/2013/" ;
99
prefix_list:rdf__ = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" ;
10-
prefix_list:some_vocab__ = "http://binary-array-ld.net/latest/" ;
1110

1211
int data_variable1(pdim0, pdim1) ;
1312
data_variable1:bald__references = "location_variable" ;
@@ -34,10 +33,10 @@ variables:
3433
location_reference_system:pcode = "4897";
3534

3635
int set_collection ;
37-
set_collection:some_vocab__references = "data_variable1 data_variable2" ;
36+
set_collection:bald__references = "data_variable1 data_variable2" ;
3837

3938
int list_collection ;
40-
list_collection:some_vocab__references = "data_variable1,data_variable2" ;
39+
list_collection:bald__references = "data_variable1,data_variable2" ;
4140

4241

4342
// global attributes:

lib/bald/tests/integration/TTL/multi_array_reference.ttl

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
@prefix metce: <http://codes.wmo.int/common/observation-type/METCE/2013/> .
33
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
44
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
5-
@prefix some_vocab: <http://binary-array-ld.net/latest/> .
65
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
76
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
87

9-
<file://CDL/multi_array_reference.cdl> a some_vocab:Container ;
10-
some_vocab:contains <file://CDL/multi_array_reference.cdl/data_variable1>,
8+
<file://CDL/multi_array_reference.cdl> a bald:Container ;
9+
bald:contains <file://CDL/multi_array_reference.cdl/data_variable1>,
1110
<file://CDL/multi_array_reference.cdl/data_variable1_pdim0_ref>,
1211
<file://CDL/multi_array_reference.cdl/data_variable2>,
1312
<file://CDL/multi_array_reference.cdl/data_variable2_pdim0_ref>,
@@ -17,59 +16,59 @@
1716
<file://CDL/multi_array_reference.cdl/pdim0>,
1817
<file://CDL/multi_array_reference.cdl/pdim1>,
1918
<file://CDL/multi_array_reference.cdl/set_collection> ;
20-
some_vocab:isPrefixedBy "prefix_list" .
19+
bald:isPrefixedBy "prefix_list" .
2120

22-
<file://CDL/multi_array_reference.cdl/data_variable1> a some_vocab:Array ;
23-
some_vocab:references <file://CDL/multi_array_reference.cdl/data_variable1_pdim0_ref>,
21+
<file://CDL/multi_array_reference.cdl/data_variable1> a bald:Array ;
22+
bald:references <file://CDL/multi_array_reference.cdl/data_variable1_pdim0_ref>,
2423
<file://CDL/multi_array_reference.cdl/location_variable>,
2524
<file://CDL/multi_array_reference.cdl/pdim1> ;
26-
some_vocab:shape "(11, 17)" ;
25+
bald:shape "(11, 17)" ;
2726
<long_name> "Gerald" ;
2827
<obtype> metce:SamplingObservation .
2928

30-
<file://CDL/multi_array_reference.cdl/data_variable2> a some_vocab:Array ;
31-
some_vocab:references <file://CDL/multi_array_reference.cdl/data_variable2_pdim0_ref>,
29+
<file://CDL/multi_array_reference.cdl/data_variable2> a bald:Array ;
30+
bald:references <file://CDL/multi_array_reference.cdl/data_variable2_pdim0_ref>,
3231
<file://CDL/multi_array_reference.cdl/location_variable>,
3332
<file://CDL/multi_array_reference.cdl/pdim1> ;
34-
some_vocab:shape "(11, 17)" ;
33+
bald:shape "(11, 17)" ;
3534
<long_name> "Imelda" ;
3635
<obtype> metce:SamplingObservation .
3736

38-
<file://CDL/multi_array_reference.cdl/list_collection> a some_vocab:Subject ;
39-
some_vocab:references <file://CDL/multi_array_reference.cdl/data_variable1_pdim0_ref>,
37+
<file://CDL/multi_array_reference.cdl/list_collection> a bald:Subject ;
38+
bald:references <file://CDL/multi_array_reference.cdl/data_variable1_pdim0_ref>,
4039
<file://CDL/multi_array_reference.cdl/data_variable2_pdim0_ref> .
4140

42-
<file://CDL/multi_array_reference.cdl/set_collection> a some_vocab:Subject ;
43-
some_vocab:references <file://CDL/multi_array_reference.cdl/data_variable1_pdim0_ref>,
41+
<file://CDL/multi_array_reference.cdl/set_collection> a bald:Subject ;
42+
bald:references <file://CDL/multi_array_reference.cdl/data_variable1_pdim0_ref>,
4443
<file://CDL/multi_array_reference.cdl/data_variable2_pdim0_ref> .
4544

46-
<file://CDL/multi_array_reference.cdl/location_reference_system> a some_vocab:Subject ;
47-
some_vocab:array <file://CDL/multi_array_reference.cdl/location_reference_system> ;
45+
<file://CDL/multi_array_reference.cdl/location_reference_system> a bald:Subject ;
46+
bald:array <file://CDL/multi_array_reference.cdl/location_reference_system> ;
4847
<pcode> "4897" .
4948

50-
<file://CDL/multi_array_reference.cdl/data_variable1_pdim0_ref> a some_vocab:Reference,
51-
some_vocab:Subject ;
52-
some_vocab:array <file://CDL/multi_array_reference.cdl/pdim0> ;
53-
some_vocab:childBroadcast "(11, 1)" .
49+
<file://CDL/multi_array_reference.cdl/data_variable1_pdim0_ref> a bald:Reference,
50+
bald:Subject ;
51+
bald:array <file://CDL/multi_array_reference.cdl/pdim0> ;
52+
bald:childBroadcast "(11, 1)" .
5453

55-
<file://CDL/multi_array_reference.cdl/data_variable2_pdim0_ref> a some_vocab:Reference,
56-
some_vocab:Subject ;
57-
some_vocab:array <file://CDL/multi_array_reference.cdl/pdim0> ;
58-
some_vocab:childBroadcast "(11, 1)" .
54+
<file://CDL/multi_array_reference.cdl/data_variable2_pdim0_ref> a bald:Reference,
55+
bald:Subject ;
56+
bald:array <file://CDL/multi_array_reference.cdl/pdim0> ;
57+
bald:childBroadcast "(11, 1)" .
5958

60-
<file://CDL/multi_array_reference.cdl/location_variable> a some_vocab:Array,
61-
some_vocab:Reference ;
62-
some_vocab:array <file://CDL/multi_array_reference.cdl/location_variable> ;
63-
some_vocab:references <file://CDL/multi_array_reference.cdl/location_reference_system> ;
64-
some_vocab:shape "(11, 17)" .
59+
<file://CDL/multi_array_reference.cdl/location_variable> a bald:Array,
60+
bald:Reference ;
61+
bald:array <file://CDL/multi_array_reference.cdl/location_variable> ;
62+
bald:references <file://CDL/multi_array_reference.cdl/location_reference_system> ;
63+
bald:shape "(11, 17)" .
6564

66-
<file://CDL/multi_array_reference.cdl/pdim0> a some_vocab:Array,
67-
some_vocab:Reference ;
68-
some_vocab:array <file://CDL/multi_array_reference.cdl/pdim0> ;
69-
some_vocab:shape "(11,)" .
65+
<file://CDL/multi_array_reference.cdl/pdim0> a bald:Array,
66+
bald:Reference ;
67+
bald:array <file://CDL/multi_array_reference.cdl/pdim0> ;
68+
bald:shape "(11,)" .
7069

71-
<file://CDL/multi_array_reference.cdl/pdim1> a some_vocab:Array,
72-
some_vocab:Reference ;
73-
some_vocab:array <file://CDL/multi_array_reference.cdl/pdim1> ;
74-
some_vocab:shape "(17,)" .
70+
<file://CDL/multi_array_reference.cdl/pdim1> a bald:Array,
71+
bald:Reference ;
72+
bald:array <file://CDL/multi_array_reference.cdl/pdim1> ;
73+
bald:shape "(17,)" .
7574

lib/bald/tests/integration/test_multi_array_reference.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ def test_load(self):
3030
with self.temp_filename('.nc') as tfile:
3131
subprocess.check_call(['ncgen', '-o', tfile, cdlfile])
3232
inputs = bald.load_netcdf(tfile)
33-
set_collection = inputs.bald__contains[6].some_vocab__references
33+
set_collection = inputs.bald__contains[6].bald__references
3434
self.assertTrue(isinstance(set_collection, set))
35-
list_collection = inputs.bald__contains[7].some_vocab__references
35+
list_collection = inputs.bald__contains[7].bald__references
3636
self.assertTrue(isinstance(list_collection, list))
3737

3838
def test_turtle(self):

0 commit comments

Comments
 (0)