You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix inversion of mappings containing subject_type or object_type slots. (#595)
* 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.
0 commit comments