Skip to content

Latest commit

 

History

History
188 lines (163 loc) · 11.2 KB

TECHNICAL.md

File metadata and controls

188 lines (163 loc) · 11.2 KB

Logo

ESCALATE v3 Data Model Overview

Table of Contents

Introduction

This document describes the structure and components of the Django site and how it relates to the Postgres Data Model described here


Overview

The ESCALATE Django app contains:

  1. core app - Site for managing and accessing data in Postgres
  2. rest_api app - Rest API built on Django models defined in core

Terminology

Terms used throughout this document may refer to different concepts in other systems. Unless specified, all terms used here refers to the Django ecosystem. Some examples are:

  1. Views

    • view in Django refers to the Python code that renders a page
  2. Models

    • model in Django refers to the database model
    • model may also refer to a machine learning model, which can be referred to as ML model

Core App

Models

These models are defined in ./core/models/view_tables/*

  1. Action: actual activity to be performed (by actor/person/systemtool/organization); associated with actionunits, parameters and/or calculations
  2. ActionDef: specification of an action
  3. ActionUnit: measurement of action performed; contains a source and optionally a destination that the action is performed on
  4. Actor: object that act on, or with any of the entities
  5. BaseBomMaterial: instance of BillOfMaterials that associate inventories, vessels, and materials
  6. BillOfMaterials: container of all materials (from inventory) that can or will be addressed in the experiment
  7. BomCompositeMaterials: bill of materials specific to composite materials and mixtures
  8. BomMaterial: bill of materials specific to materials
  9. BomVessel: bill of materials specific to vessels
  10. Calculation: actual function performing a transformation or calculation with one or more parameters
  11. CalculationDef: specification of calculations
  12. Condition: type of action sequence object that determines (by way of assoc. calculation) the path taken for subsequent action
  13. Contents: defines materials contained within a vessel instance
  14. DefaultValues: template for nominal and actual values
  15. DescriptorTemplate: template for multiple model instance descriptors
  16. ExperimentCompletedInstance: proxy model of ExpermentInstance that contains finished experiments
  17. ExperimentInstance: container specifying one or more action sequences (of actions) operating on or with one or more materials and capturing one or more measures and/or observables at any level of experiment detail
  18. ExperimentPendingInstance: proxy model of ExpermentInstance that contains pending experiments
  19. ExperimentTemplate: template that specifies experiments that can be created
  20. Edocument: electronic document that can be defined and a file can be associated; files can be uploaded via various forms within the UI or directly through the API
  21. Inventory: inventory template; defines owner/operator/lab associated with inventory
  22. InventoryMaterial: instance of inventory model; collection of 'actual' materials assignable to an organization (lab)
  23. Material: 'ideal' singleton, material can have unlimited reference names, properties and calculations (descriptors) assigned
  24. MaterialIdentifier: descriptors for materials; can be composed of multiple definitions
  25. MaterialIdentifierDef: individual descriptor for MaterialIdentifier
  26. MaterialType: defines the type of material within multiple template models
  27. Mixture: composite materials and components associated with the creation of the mixture; material types can be defined and accessed
  28. MolecularDescriptor: descriptor for molecular materials
  29. Note: text that can be associated with any entity
  30. Organization: organization that act on, or with any of the entities
  31. Outcome: container of measures that address purpose or aim of experiment
  32. OutcomeValue: stores the nominal and actual values related to an outcome instance
  33. OutcomeTemplate: template for outcomes; contains associated experiment and default values
  34. Parameter: actual characterization of an activity or calculation; of which action or calculation can have zero to many
  35. ParameterDef: specification of Parameter model
  36. Person: personal details of an individual including association with organizations
  37. Property: characterization of a material; of which a material can have zero to many
  38. PropertyTemplate: template for Property instance; contains default values for property instances
  39. ReactionParameters: quick access to specific parameters associated within an experiment
  40. Reagent: instance of ReagentTemplate; associates a ReagentTemplate with an ExperimentInstance
  41. ReagentTemplate: template for reagent instance
  42. ReagentMaterialTemplate: template for reagent material instance; material type defined in MaterialType model
  43. ReagentMaterial: instance of ReagentMaterialTemplate; associates Reagent and InventoryMaterial with ReagentMaterialTemplate
  44. ReagentMaterialValue: nominal and actual values for a reagent material within an experiment
  45. ReagentMaterialValueTemplate: template for reagent material value instance; material type defined in MaterialType model
  46. Status: text describing the state or status of an entity
  47. Systemtool: software that act on, or with any of the entities
  48. SystemtoolType: defines type of software
  49. Tag: short descriptive text that can be associated with any entity
  50. TagAssign: associates a tag with a model instance
  51. TagType: defines the type of tag
  52. Udf: User Defined Field; For example, if we want to start tracking ‘challenge problem #’ within an experiment. Instead of creating a new column in experiment, we could define a udf(udf_def) and it’s associated value(val) type, in this case: text. Then we could allow the user (API) to create a specific instance of that udf_def, and associate it with a specific experiment, where the experiment_uuid is the ref_udf_uuid.
  53. UdfDef: description of UDF
  54. ValueInstance: instance of DefaultValues model; contains specific nominal and actual values and associates with the Outcome model
  55. Vessel: template for vessel instance
  56. VesselInstance: experiment container; child of Vessel model and defines a specific instance of that template
  57. VesselType: describes the type of vessel for a Vessel template

Rest API

API endpoints are available for most models. Below are the API endpoint URLs for a local installation.

  1. action: "http://localhost:8000/api/action/",
  2. actiondef: "http://localhost:8000/api/action-def/",
  3. actionunit: "http://localhost:8000/api/action-unit/",
  4. actor: "http://localhost:8000/api/actor/",
  5. basebommaterial: "http://localhost:8000/api/base-bom-material/",
  6. billofmaterials: "http://localhost:8000/api/bill-of-materials/",
  7. bomcompositematerial: "http://localhost:8000/api/bom-composite-material/",
  8. bommaterial: "http://localhost:8000/api/bom-material/"",
  9. contents: "http://localhost:8000/api/contents/",
  10. defaultvalues: "http://localhost:8000/api/default-values/",
  11. descriptortemplate: "http://localhost:8000/api/descriptor-template/",
  12. experimentdescriptor: "http://localhost:8000/api/experiment-descriptor/",
  13. experimentinstance: "http://localhost:8000/api/experiment-instance/",
  14. experimenttemplate: "http://localhost:8000/api/experiment-template/",
  15. experimenttype: "http://localhost:8000/api/experiment-type/",
  16. inventory: "http://localhost:8000/api/inventory/",
  17. inventorymaterial: "http://localhost:8000/api/inventory-material/",
  18. material: "http://localhost:8000/api/material/",
  19. materialidentifier: "http://localhost:8000/api/material-identifier/",
  20. materialidentifierdef: "http://localhost:8000/api/material-identifier-def/",
  21. materialtype: "http://localhost:8000/api/material-type/",
  22. measure: "http://localhost:8000/api/measure/",
  23. measuredef: "http://localhost:8000/api/measure-def/",
  24. measuretype: "http://localhost:8000/api/measure-type/",
  25. mixture: "http://localhost:8000/api/mixture/",
  26. moleculardescriptor: "http://localhost:8000/api/molecular-descriptor/",
  27. organization: "http://localhost:8000/api/organization/",
  28. Outcome: "http://localhost:8000/api/outcome-instance/",
  29. outcometemplate: "http://localhost:8000/api/outcome-template/",
  30. parameterdef: "http://localhost:8000/api/parameter-def/",
  31. person: "http://localhost:8000/api/person/",
  32. propertytemplate: "http://localhost:8000/api/property-template/",
  33. reagent: "http://localhost:8000/api/reagent/",
  34. reagentmaterial: "http://localhost:8000/api/reagent-material/",
  35. reagentmaterialtemplate: "http://localhost:8000/api/reagent-material-template/",
  36. reagentmaterialvalue: "http://localhost:8000/api/reagent-material-value/",
  37. reagentmaterialvaluetemplate: "http://localhost:8000/api/reagent-material-value-template/",
  38. reagenttemplate: "http://localhost:8000/api/reagent-template/",
  39. status: "http://localhost:8000/api/status/",
  40. systemtool: "http://localhost:8000/api/systemtool/",
  41. systemtooltype: "http://localhost:8000/api/systemtool-type/",
  42. tag: "http://localhost:8000/api/tag/",
  43. tagtype: "http://localhost:8000/api/tag-type/",
  44. typedef: "http://localhost:8000/api/type-def/",
  45. udfdef: "http://localhost:8000/api/udf-def/",
  46. unittype: "http://localhost:8000/api/unit-type/",
  47. vessel: "http://localhost:8000/api/vessel/",
  48. vesselinstance: "http://localhost:8000/api/vessel-instance/",
  49. vesseltype: "http://localhost:8000/api/vessel-type/"

Authors

See also the list of contributors who participated in this project.


License

This project is licensed under the MIT License - see the LICENSE.txt file for details


Acknowledgments