Part of #203. Preparatory to adding FittingResultVersion, extract the parts it will share in common with Dataset and ExperimentVersion; similarly for their views.
"Collection of files" type views:
Fields returned by JSON views are listed below. I'm not yet sure where extracted common methods for these would sensibly go. There might also have to be different versions for the repository and archive backed versions of file views. So possibly we should add methods to FileCollection and Entity?
- EntityVersionJsonView
- returns
{version: }
- version keys: id (sha), entityId (DB id), author (full_name), parsedOk, visibility, created (timestamp), name (entity.name), version (sha), files (strips manifest & metadata.rdf), commitMessage, numFiles, planned_experiments, url (:version), download_url (:entity_archive), change_url (:change_visibility)
- file keys: id (blob.name), name (=id), created, filetype (get_file_type()), size, url (:file_download)
- EntityComparisonJsonView
- returns
{getEntityInfos: {entities: [versions]}}
- version keys: id (sha), entityId (DB id) [unused?], author (full_name), parsedOk (False) [unused], visibility [unused?], created (timestamp), name (entity.name), version (sha), files (strips manifest & metadata.rdf), commitMessage, numFiles
- file keys: id (blob.name) [unused?], name (=id), author (full_name), created, filetype (get_file_type()), size, url (:file_download)
- DatasetJsonView
- returns
{version: }
- version keys: id (DB id), author, parsedOk (False), visibility, created, name, files, numFiles, download_url (datasets:archive)
- file keys: id (.name), name, author, created, filetype, masterFile (bool), size, url (:file_download)
- ExperimentVersionJsonView
- returns
{version: }
- version keys: as DatasetJsonView PLUS status, experimentId, version (=id)
- file keys: as DatasetJsonView
- ExperimentComparisonJsonView
- returns
{getEntityInfos: {entities: [versions]}}
- version keys: as DatasetJsonView PLUS status, experimentId, versionId (=id), url (:version), modelName, protoName, modelVersion, protoVersion, runNumber
- file keys: as DatasetJsonView
Part of #203. Preparatory to adding
FittingResultVersion, extract the parts it will share in common withDatasetandExperimentVersion; similarly for their views.core.models.FileCollectionMixinused byDatasetandExperimentVersionabs_path,archive_name,archive_path,filesopen_file,mkdirDataset.is_visible_to_user- only used by tests!NotImplementedErrorin the mixin versiondatasetsviews to use the namespace trick, and inherit from/reuse them inexperiments"Collection of files" type views:
datasetsexperimentsdatasetsFields returned by JSON views are listed below. I'm not yet sure where extracted common methods for these would sensibly go. There might also have to be different versions for the repository and archive backed versions of file views. So possibly we should add methods to
FileCollectionandEntity?{version: }{getEntityInfos: {entities: [versions]}}{version: }{version: }{getEntityInfos: {entities: [versions]}}