Skip to content

Commit 48a1ae6

Browse files
committed
csvtests: use slots
1 parent 1563ee9 commit 48a1ae6

File tree

2 files changed

+42
-34
lines changed

2 files changed

+42
-34
lines changed

tests/test_loaders_dumpers/models/table.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Auto generated from table.yaml by pythongen.py version: 0.9.0
2-
# Generation date: 2022-09-29T09:11:32
2+
# Generation date: 2022-10-10T16:55:54
33
# Schema: table
44
#
55
# id: https://w3id.org/linkml/examples/table
@@ -127,20 +127,20 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
127127
class slots:
128128
pass
129129

130-
slots.object__name = Slot(uri=TABLE.name, name="object__name", curie=TABLE.curie('name'),
131-
model_uri=TABLE.object__name, domain=None, range=Optional[str])
130+
slots.rows = Slot(uri=TABLE.rows, name="rows", curie=TABLE.curie('rows'),
131+
model_uri=TABLE.rows, domain=None, range=Optional[Union[Dict[Union[str, RowColumnA], Union[dict, Row]], List[Union[dict, Row]]]])
132132

133-
slots.object__value = Slot(uri=TABLE.value, name="object__value", curie=TABLE.curie('value'),
134-
model_uri=TABLE.object__value, domain=None, range=Optional[str])
133+
slots.columnA = Slot(uri=TABLE.columnA, name="columnA", curie=TABLE.curie('columnA'),
134+
model_uri=TABLE.columnA, domain=None, range=URIRef)
135135

136-
slots.row__columnA = Slot(uri=TABLE.columnA, name="row__columnA", curie=TABLE.curie('columnA'),
137-
model_uri=TABLE.row__columnA, domain=None, range=URIRef)
136+
slots.objectB = Slot(uri=TABLE.objectB, name="objectB", curie=TABLE.curie('objectB'),
137+
model_uri=TABLE.objectB, domain=None, range=Optional[Union[dict, Object]])
138138

139-
slots.row__objectB = Slot(uri=TABLE.objectB, name="row__objectB", curie=TABLE.curie('objectB'),
140-
model_uri=TABLE.row__objectB, domain=None, range=Optional[Union[dict, Object]])
139+
slots.columnC = Slot(uri=TABLE.columnC, name="columnC", curie=TABLE.curie('columnC'),
140+
model_uri=TABLE.columnC, domain=None, range=Optional[str])
141141

142-
slots.row__columnC = Slot(uri=TABLE.columnC, name="row__columnC", curie=TABLE.curie('columnC'),
143-
model_uri=TABLE.row__columnC, domain=None, range=Optional[str])
142+
slots.name = Slot(uri=TABLE.name, name="name", curie=TABLE.curie('name'),
143+
model_uri=TABLE.name, domain=None, range=Optional[str])
144144

145-
slots.table__rows = Slot(uri=TABLE.rows, name="table__rows", curie=TABLE.curie('rows'),
146-
model_uri=TABLE.table__rows, domain=None, range=Optional[Union[Dict[Union[str, RowColumnA], Union[dict, Row]], List[Union[dict, Row]]]])
145+
slots.value = Slot(uri=TABLE.value, name="value", curie=TABLE.curie('value'),
146+
model_uri=TABLE.value, domain=None, range=Optional[str])

tests/test_loaders_dumpers/models/table.yaml

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,41 @@ classes:
1616
Object:
1717
description: |-
1818
An object (bnode) which needs embedding in a single row
19-
attributes:
20-
name:
21-
range: string
22-
value:
23-
range: string
19+
slots:
20+
- name
21+
- value
2422

2523
Row:
2624
description: |-
2725
A single data point made up of columns.
28-
attributes:
29-
columnA:
30-
range: uriorcurie
31-
identifier: true
32-
objectB:
33-
range: Object
34-
inlined: true
35-
columnC:
36-
range: string
37-
multivalued: false
26+
slots:
27+
- columnA
28+
- objectB
29+
- columnC
3830

3931
Table:
4032
description: |-
4133
Container of rows.
4234
tree_root: true
43-
attributes:
44-
rows:
45-
range: Row
46-
inlined: true
47-
inlined_as_list: true
48-
multivalued: true
35+
slots:
36+
- rows
37+
38+
slots:
39+
rows:
40+
range: Row
41+
inlined: true
42+
inlined_as_list: true
43+
multivalued: true
44+
columnA:
45+
range: uriorcurie
46+
identifier: true
47+
objectB:
48+
range: Object
49+
inlined: true
50+
columnC:
51+
range: string
52+
multivalued: false
53+
name:
54+
range: string
55+
value:
56+
range: string

0 commit comments

Comments
 (0)