This issue extends/subsumes #130 to reflect updated thinking since the 2018 workshop. It's also related to #133 & #134.

As can be seen in this rough diagram we will have 6 primary kinds of 'thing' represented in the Web Lab, which follow 2 primary 'archetypes' for how they are stored.
Model - versioned, backed by git repository
Protocol - versioned, backed by git repository
FittingSpec - versioned, backed by git repository
- Links to a
Protocol (not specific version thereof) representing the experimental scenario which can be used to fit models
Prediction - versioned, collection of files in COMBINE Archive
- Links to (specific versions of) a
Model and Protocol, from which the prediction is derived
Dataset - not (yet?) versioned, collection of files in COMBINE Archive
- Links to a
Protocol (not specific version thereof) representing the experimental scenario which produced this dataset.
- At present this is fixed on dataset creation; we may wish to allow it to be updated later?
FittingResult - versioned, collection of files in COMBINE Archive
- Links to (specific versions of) a
Model, Protocol, FittingSpec and Dataset, and represents the result of fitting that model to that data under that spec + protocol.
- The particular protocol is implied by the choice of fitting spec & dataset, but the version of it is not so needs to be explicit. (And because
FittingSpec and Dataset may change in the future, probably best to keep a link here too.)
At present in the code, Model and Protocol inherit from a common base class Entity, and Prediction is called Experiment. These features largely derive from the representation in WL1, when all three were subclasses of Entity and versioning was done by the DB with collections of files in disk, no git repos.
The Entity base class may no longer make sense; with the exception of repocache there's little use of Entity.objects in the code. So possibly we want to get rid of it while adding FittingSpec, in preference of a more mixin-based approach? It depends on whether we can design repocache sensibly to cache all kinds of git repos if there isn't a common DB table for it to link to - we do have several crucial CachedEntityVersion.objects uses, but these always then filter either models or protocols. We only select generic 'entities' when filling the cache AFAICS. Or have 3 sets of cache tables all sharing the same code, so we start talking about CachedModel, CachedModelVersion, CachedModelTag, etc?
Where we want to end up is for templates, Javascript & Python code supporting each archetype to be reused as much as possible, never just copied & renamed. In doing so we need to consider how things are split between Django apps.
Creating/editing a fitting spec should look basically the same as for models & protocols.
This issue extends/subsumes #130 to reflect updated thinking since the 2018 workshop. It's also related to #133 & #134.
As can be seen in this rough diagram we will have 6 primary kinds of 'thing' represented in the Web Lab, which follow 2 primary 'archetypes' for how they are stored.
Model- versioned, backed by git repositoryProtocol- versioned, backed by git repositoryFittingSpec- versioned, backed by git repositoryProtocol(not specific version thereof) representing the experimental scenario which can be used to fit modelsPrediction- versioned, collection of files in COMBINE ArchiveModelandProtocol, from which the prediction is derivedDataset- not (yet?) versioned, collection of files in COMBINE ArchiveProtocol(not specific version thereof) representing the experimental scenario which produced this dataset.FittingResult- versioned, collection of files in COMBINE ArchiveModel,Protocol,FittingSpecandDataset, and represents the result of fitting that model to that data under that spec + protocol.FittingSpecandDatasetmay change in the future, probably best to keep a link here too.)At present in the code,
ModelandProtocolinherit from a common base classEntity, andPredictionis calledExperiment. These features largely derive from the representation in WL1, when all three were subclasses of Entity and versioning was done by the DB with collections of files in disk, no git repos.The
Entitybase class may no longer make sense; with the exception ofrepocachethere's little use ofEntity.objectsin the code. So possibly we want to get rid of it while addingFittingSpec, in preference of a more mixin-based approach? It depends on whether we can designrepocachesensibly to cache all kinds of git repos if there isn't a common DB table for it to link to - we do have several crucialCachedEntityVersion.objectsuses, but these always then filter either models or protocols. We only select generic 'entities' when filling the cache AFAICS. Or have 3 sets of cache tables all sharing the same code, so we start talking aboutCachedModel,CachedModelVersion,CachedModelTag, etc?Where we want to end up is for templates, Javascript & Python code supporting each archetype to be reused as much as possible, never just copied & renamed. In doing so we need to consider how things are split between Django apps.
Creating/editing a fitting spec should look basically the same as for models & protocols.