GallowayLabMIT / rushd

Package for maintaining robust, reproducible data management
MIT License
0 stars 0 forks source link

Warn users when they are passing dictionaries as metadata entries #4

Closed meson800 closed 2 years ago

meson800 commented 2 years ago

Currently, if you pass metadata with duplicate keys as a dictionary, e.g.:

metadata:
  condition:
    1: A1-A8
    2: B1-B8
    1: C1-C8

then the first "1" key disappears into the ether, being replaced by the second entry in the dictionary. The correct way to pass metadata keys is via:

metadata:
  condition:
    - 1: A1-A8
    - 2: B1-B8
    - 1: C1-C8

We should throw a warning if the first type is passed.

Additionally, line 88 in flow.py should be in a try-catch that re-throws a KeyError with a better exception that actually describes the error ("KeyError: A5" => "Found an FCS file for well A5, but does not assign a value to this well!")