Mentions légales du service

Skip to content

Fix incoherent tag handling

VESIN Marc requested to merge feature/471-fix-dataset-tags into develop

MR description

This MR adresses #471 (closed): change behaviour of dataset tags when adding or modifying a dataset, to make this behaviour coherent:

  • modify DatasetManager functions
    • for adding a dataset (add_database) to properly check tags using a new dedicated function (search_conflicting_tags). This fixes the CLI
    • for updating a dataset (modify_database_info). This function was unused, so we changed the prototype to make it match the needs of the GUI. Also added proper checks with search_conflicting_tags.
  • fix GUI to do the checks. As GUI currently does not properly use DatasetManager (see #338) this requires some distinct fixes. We changed the Flask server routes for adding/updating datasets to use the DatasetManager (minimal refactoring needed to fix the issue)
  • adapt and add unit tests

What can be tested, under both CLI and GUI:

  • add a dataset with same tags as an existing dataset (conflict)
  • add a dataset with subset of tags from an existing dataset (conflict)
  • add a dataset with superset of tags from an existing dataset (conflict)
  • add twice the default dataset with same tags (conflict)
  • update tags from a dataset to be same tags as an existing dataset (conflict)
  • update tags from a dataset to be subset of tags from an existing dataset (conflict)
  • update tags from a dataset to be superset of tags from an existing dataset (conflict)
  • several scenarios of adding dataset with some tags common with existing datasets, but not all (ok)
  • ...

Developer Certificate Of Origin (DCO)

By opening this merge request, you agree the Developer Certificate of Origin (DCO)

This DCO essentially means that:

  • you offer the changes under the same license agreement as the project, and
  • you have the right to do that,
  • you did not steal somebody else’s work.

License

Project code files should begin with these comment lines to help trace their origin:

# This file is originally part of Fed-BioMed
# SPDX-License-Identifier: Apache-2.0

Code files can be reused from another project with a compatible non-contaminating license. They shall retain the original license and copyright mentions. The CREDIT.md file and credit/ directory shall be completed and updated accordingly.

Guidelines for MR review

General:

Specific to some cases:

  • update all conda envs consistently (development and vpn, Linux and MacOS)
  • if modified researcher (eg new attributes in classes) check if breakpoint needs update (breakpoint/load_breakpoint in Experiment(), save_state/load_state in aggregators, strategies, secagg, etc.)

Merge request reports