Princeton-LSI-ResearchComputing / tracebase

Mouse Metabolite Tracing Data Repository for the Rabinowitz Lab
MIT License
4 stars 1 forks source link

Make submission process backward compatible with the legacy rabinowitz data #1032

Closed hepcat72 closed 1 month ago

hepcat72 commented 2 months ago

FEATURE REQUEST

Inspiration

The new submission process made a few column changes necessary for inter-sheet interactions, to support features like dynamic autofill and dynamic drop-down population (based on other sheets' content). This means that if you try to submit old animal/sample sheets to the build-a-submission page or try to load old data using the new StudyLoader, you would run into exceptions.

Description

Given the new ConvertedTableLoader class, it should be fairly straightforward to support legacy data by making the new SamplesLoader and AnimalsLoader inherit from ConvertedTableLoader instead of directly from TableLoader and define the changes necessary to convert version 2 data to version 3. There would also have to be some code added to detect version, but that should similarly be straightforward.

The following is a rough estimate of the changes necessary:

Make StudyLoader able to recognize the versions and call StudiesLoader, even if the sheet is not present. So make StudiesLoader inherit from ConvertedTableLoader as well.

Update DataValidationView to determine the submitted file version and apply that version to the methods that check version, and accept version 2.

Alternatives

One alternative would be to edit the existing rabinowitz repo data to convert v2 data to v3.

Dependencies

This issue cannot be started until the completion of the following issue(s)/ pull request(s):

Comment

None


ISSUE OWNER SECTION

Assumptions

  1. List of assumptions that the code will not explicitly address/check
  2. E.g. We will assume input is correct (explaining why there is no validation)

Limitations

  1. A list of things this work will specifically not do
  2. E.g. This feature will only handle the most frequent use case X

Affected Components

Requirements

DESIGN

Interface Change description

None provided

Code Change Description

None provided

Tests

hepcat72 commented 2 months ago

Possibly the same as #1047

hepcat72 commented 2 months ago

I have an error-free version of the "backward_compatibility" branch, but there are still some things I want to do. I might not do all of this in one PR. In fact, some of what I've done could/should be broken up, but I need to organize my thoughts on what's left to do...

hepcat72 commented 1 month ago

Done. Remaining issues were split off to separate issues.