Commit 03a204a
authored
* Add missing slots to COLUMN_INVERT_DICTIONARY.
Mapping inversion requires, among other things, to know which are the
slots whose value must be inverted. For example, knowing that
`subject_id` must be inverted with `object_id`, `subject_label` must be
inverted with `object_label`, and so on.
This knowledge is provided, in SSSOM-Py, in the
`COLUMN_INVERT_DICTIONARY` map in the `sssom.constants` module.
That map is missing the `subject_type` and `object_type` slots,
resulting in SSSOM-Py being unable to invert any mapping set that
contains one of those slots.
We add the missing entries to the `COLUMN_INVERT_DICTIONARY` map.
closes #554
* Add all "asymmetric" slots to the asymmetric test case.
The test supposed to ensure that "asymmetric" mapping sets (sets that
contain some `subject_*` columns without their `object_*` counterparts,
or the other way round) only contains a couple of asymmetric slots.
As a result, it didn't catch the problem caused by the absence of
`subject_type` and `object_type` in the COLUMN_INVERT_DICTIONARY map.
We fill the `asymmetric.tsv` set so that it contains _all_ the slots
that require switching when a mapping set is inverted.
1 parent 744a36d commit 03a204a
2 files changed
+8
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
| 169 | + | |
168 | 170 | | |
169 | 171 | | |
170 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
0 commit comments