Autodesk / molecular-simulation-tools

Web applications for molecular modeling using the Molecular Design Toolkit
http://molsim.bionano.autodesk.com
Apache License 2.0
16 stars 10 forks source link

MVP: Refactor pipeDatas #284

Closed justinmc closed 7 years ago

justinmc commented 7 years ago

Part of the MVP push: https://github.com/Autodesk/molecular-simulation-tools/issues/283

pipeDatas needs to be refactored as a nested data structure. The biggest hurdle to this is make sure that all uses of pipeDatas have both the widgetId and the pipeId needed to access the data they're looking for (instead of just the pipeId for the flat structure now).

justinmc commented 7 years ago

As of https://github.com/Autodesk/molecular-simulation-tools/pull/280, pipeDatas is now saved as pipeDatasByWidget in this structure:

{
  <widgetId>: [ <pipeData>, ... ],
  ...
}

The PipeDataRecord now contains pipeName (previously id), and widgetId, so that you can always find its location in pipeDatasByWidget given just a pipeData.