Skip to content

Commit b48127f

Browse files
committed
adapting tests
1 parent bf3caa4 commit b48127f

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

test/projects/TEC/mapping.ttl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
];
3333
rr:subjectMap [
3434
a rr:SubjectMap;
35-
rr:template "ecfo_instance:CF_{id}";
35+
rr:template "https://w3id.org/ecfkg/i/UK/BEIS/2016/CF_{id}";
3636
];
3737
rr:predicateObjectMap [
3838
rr:predicateMap [
@@ -172,7 +172,7 @@
172172
];
173173
rr:objectMap [
174174
a rr:ObjectMap;
175-
rr:template "ecfo_instance:applicablePeriod/{valid_from}/{valid_to}";
175+
rr:template "https://w3id.org/ecfkg/i/UK/BEIS/2016/applicablePeriod/{valid_from}/{valid_to}";
176176
rr:termType rr:IRI
177177
];
178178
];
@@ -265,7 +265,7 @@
265265
];
266266
rr:subjectMap [
267267
a rr:SubjectMap;
268-
rr:template "ecfo_instance:applicablePeriod/{valid_from}/{valid_to}/start";
268+
rr:template "https://w3id.org/ecfkg/i/UK/BEIS/2016/applicablePeriod/{valid_from}/{valid_to}/start";
269269
];
270270
rr:predicateObjectMap [
271271
rr:predicateMap [
@@ -299,7 +299,7 @@
299299
];
300300
rr:subjectMap [
301301
a rr:SubjectMap;
302-
rr:template "ecfo_instance:applicablePeriod/{valid_from}/{valid_to}/end";
302+
rr:template "https://w3id.org/ecfkg/i/UK/BEIS/2016/applicablePeriod/{valid_from}/{valid_to}/end";
303303
];
304304
rr:predicateObjectMap [
305305
rr:predicateMap [
@@ -333,7 +333,7 @@
333333
];
334334
rr:subjectMap [
335335
a rr:SubjectMap;
336-
rr:template "ecfo_instance:applicablePeriod/{valid_from}/{valid_to}";
336+
rr:template "https://w3id.org/ecfkg/i/UK/BEIS/2016/applicablePeriod/{valid_from}/{valid_to}";
337337
];
338338
rr:predicateObjectMap [
339339
rr:predicateMap [
@@ -352,7 +352,7 @@
352352
];
353353
rr:objectMap [
354354
a rr:ObjectMap;
355-
rr:template "ecfo_instance:applicablePeriod/{valid_from}/{valid_to}/start";
355+
rr:template "https://w3id.org/ecfkg/i/UK/BEIS/2016/applicablePeriod/{valid_from}/{valid_to}/start";
356356
rr:termType rr:IRI
357357
];
358358
];
@@ -363,7 +363,7 @@
363363
];
364364
rr:objectMap [
365365
a rr:ObjectMap;
366-
rr:template "ecfo_instance:applicablePeriod/{valid_from}/{valid_to}/end";
366+
rr:template "https://w3id.org/ecfkg/i/UK/BEIS/2016/applicablePeriod/{valid_from}/{valid_to}/end";
367367
rr:termType rr:IRI
368368
];
369369
].

test/r2rml/INVERSETC-0005/mapping.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ mappings:
4646
s: http://example.com/Patient/$(ID)
4747
po:
4848
- [rdf:type, foaf:Person]
49-
- [http://example.com/$(last_name), $(LastName), xsd:string]
49+
- [ex:$(last_name), $(LastName), xsd:string]
5050
- [ex:height, http://example.com/$(Height)]

test/r2rml/INVERSETC-0005/test_inversetc0005.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
__email__ = "[email protected]"
77
__name__ = "INVERSETC-0005 based on YARRRMLTC-0013"
88

9-
109
import os
1110
from ruamel.yaml import YAML
1211
import yatter
1312
from rdflib.graph import Graph
1413
from deepdiff import DeepDiff
14+
1515
R2RML_URI = 'http://www.w3.org/ns/r2rml#'
1616

1717

@@ -21,12 +21,14 @@ def test_inversetc0005():
2121
expected_mapping = yaml.load(file)
2222

2323
input_mapping = Graph()
24-
mapping_path = input_mapping.parse(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'mapping.ttl'), format="ttl")
24+
mapping_path = input_mapping.parse(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'mapping.ttl'),
25+
format="ttl")
2526
translated_mapping = yaml.load(str(yatter.inverse_translation(mapping_path, mapping_format=R2RML_URI)))
2627

2728
ddiff = DeepDiff(expected_mapping['mappings'], translated_mapping['mappings'], ignore_order=True)
28-
29+
print(expected_mapping['mappings'])
30+
print(translated_mapping['mappings'])
2931
if ddiff:
3032
assert False
3133
else:
32-
assert True
34+
assert True

0 commit comments

Comments
 (0)