dataset rules for tags are not coherent
When adding a dataset on a node, rules for checking tags are not coherent.
The expected behaviour (see DatasetManager.add_database
) is that data tags are unique, which (probably) means that data tags from a dataset on a node should be neither a subset nor a superset of the tags of another dataset on the same node (this includes the case where tags are exactly the same).
But the code does not exactly checks this condition, it just checks that not all tags from a tentative new dataset are not included in the tags of an existing dataset (new dataset tags list is not a subset of an existing dataset). Thus:
- adding dataset1 with tags
[ tag1 ]
then dataset2 with tags[ tag1, tag2 ]
is allowed - adding dataset2 with tags
[ tag1, tag2 ]
then dataset1 with tags[ tag1 ]
is not allowed
Moreover, this does not allow the researcher to select only dataset1: if researcher specifies [ tag1 ]
both dataset1 and dataset2 are selected.
As a node user, I want a coherent set of rules for tags for the datasets. Note: this is needed for #395 (closed)
Possible scenarios include:
- checking that tags for a proposed new dataset are neither a subset nor a superset of tags of each existing dataset on the same node (fix the expected behaviour)
- change tags semantics: each tag of a proposed new dataset must be different from each tag from each existing dataset on the same node
- change tags semantics: allow only one unique tag per dataset + tag of a proposed dataset must be different from tag of each existing dataset on the same node
- other ?
-
fix issue in CLI -
fix issue in GUI (which does not properly use DatasetManager
to access database, see #338 ) -
update documentation