Closed ablot closed 2 years ago
This should solve the issues you had @yiran25 (to find dataset names and other part of flexilims names).
@znamensk and @yiran25, could you review the CHANGELOG.md
and tell if any of the changes sound like a bad idea? I can revert some (for instance put back Dataset.name
)
Parsing any flexilims name is impossible. Underscores separate different levels but can also be present inside a level name. While we had a semi-working version with 2P data, it because totally unworkable with sample. Similarly finding a session name from a dataset is difficult (because it requires parsing or calling parents multiple times and checking type). To solve both issue, add to every entity a
genealogy
attributes that is the list of elements composing the flexilims name. For instance the genealogy for'BRAC34_S22_headfixed_R12_Retinotopy_harp_data'
is['BRAC34', 'S22_headfixed', 'R12_Retinotopy', 'harp_data']
.This required quite a large refactoring of
dataset
andsync_yaml
but seems to work (all tests passing locally). The helper functionutils.add_genealogy
is slow but should add all missing genealogy info from existing flexilims entries.