This document describes the structure and components of the Django site and how it relates to the Postgres Data Model described here
The ESCALATE Django app contains:
core
app - Site for managing and accessing data in Postgresrest_api
app - Rest API built on Django models defined incore
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:
-
Views
view
in Django refers to the Python code that renders a page
-
Models
model
in Django refers to the database modelmodel
may also refer to a machine learning model, which can be referred to asML model
These models are defined in ./core/models/view_tables/*
- Action: actual activity to be performed (by actor/person/systemtool/organization); associated with actionunits, parameters and/or calculations
- ActionDef: specification of an action
- ActionUnit: measurement of action performed; contains a source and optionally a destination that the action is performed on
- Actor: object that act on, or with any of the entities
- BaseBomMaterial: instance of BillOfMaterials that associate inventories, vessels, and materials
- BillOfMaterials: container of all materials (from inventory) that can or will be addressed in the experiment
- BomCompositeMaterials: bill of materials specific to composite materials and mixtures
- BomMaterial: bill of materials specific to materials
- BomVessel: bill of materials specific to vessels
- Calculation: actual function performing a transformation or calculation with one or more parameters
- CalculationDef: specification of calculations
- Condition: type of action sequence object that determines (by way of assoc. calculation) the path taken for subsequent action
- Contents: defines materials contained within a vessel instance
- DefaultValues: template for nominal and actual values
- DescriptorTemplate: template for multiple model instance descriptors
- ExperimentCompletedInstance: proxy model of ExpermentInstance that contains finished experiments
- 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
- ExperimentPendingInstance: proxy model of ExpermentInstance that contains pending experiments
- ExperimentTemplate: template that specifies experiments that can be created
- 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
- Inventory: inventory template; defines owner/operator/lab associated with inventory
- InventoryMaterial: instance of inventory model; collection of 'actual' materials assignable to an organization (lab)
- Material: 'ideal' singleton, material can have unlimited reference names, properties and calculations (descriptors) assigned
- MaterialIdentifier: descriptors for materials; can be composed of multiple definitions
- MaterialIdentifierDef: individual descriptor for MaterialIdentifier
- MaterialType: defines the type of material within multiple template models
- Mixture: composite materials and components associated with the creation of the mixture; material types can be defined and accessed
- MolecularDescriptor: descriptor for molecular materials
- Note: text that can be associated with any entity
- Organization: organization that act on, or with any of the entities
- Outcome: container of measures that address purpose or aim of experiment
- OutcomeValue: stores the nominal and actual values related to an outcome instance
- OutcomeTemplate: template for outcomes; contains associated experiment and default values
- Parameter: actual characterization of an activity or calculation; of which action or calculation can have zero to many
- ParameterDef: specification of Parameter model
- Person: personal details of an individual including association with organizations
- Property: characterization of a material; of which a material can have zero to many
- PropertyTemplate: template for Property instance; contains default values for property instances
- ReactionParameters: quick access to specific parameters associated within an experiment
- Reagent: instance of ReagentTemplate; associates a ReagentTemplate with an ExperimentInstance
- ReagentTemplate: template for reagent instance
- ReagentMaterialTemplate: template for reagent material instance; material type defined in MaterialType model
- ReagentMaterial: instance of ReagentMaterialTemplate; associates Reagent and InventoryMaterial with ReagentMaterialTemplate
- ReagentMaterialValue: nominal and actual values for a reagent material within an experiment
- ReagentMaterialValueTemplate: template for reagent material value instance; material type defined in MaterialType model
- Status: text describing the state or status of an entity
- Systemtool: software that act on, or with any of the entities
- SystemtoolType: defines type of software
- Tag: short descriptive text that can be associated with any entity
- TagAssign: associates a tag with a model instance
- TagType: defines the type of tag
- 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.
- UdfDef: description of UDF
- ValueInstance: instance of DefaultValues model; contains specific nominal and actual values and associates with the Outcome model
- Vessel: template for vessel instance
- VesselInstance: experiment container; child of Vessel model and defines a specific instance of that template
- VesselType: describes the type of vessel for a Vessel template
API endpoints are available for most models. Below are the API endpoint URLs for a local installation.
- action: "http://localhost:8000/api/action/",
- actiondef: "http://localhost:8000/api/action-def/",
- actionunit: "http://localhost:8000/api/action-unit/",
- actor: "http://localhost:8000/api/actor/",
- basebommaterial: "http://localhost:8000/api/base-bom-material/",
- billofmaterials: "http://localhost:8000/api/bill-of-materials/",
- bomcompositematerial: "http://localhost:8000/api/bom-composite-material/",
- bommaterial: "http://localhost:8000/api/bom-material/"",
- contents: "http://localhost:8000/api/contents/",
- defaultvalues: "http://localhost:8000/api/default-values/",
- descriptortemplate: "http://localhost:8000/api/descriptor-template/",
- experimentdescriptor: "http://localhost:8000/api/experiment-descriptor/",
- experimentinstance: "http://localhost:8000/api/experiment-instance/",
- experimenttemplate: "http://localhost:8000/api/experiment-template/",
- experimenttype: "http://localhost:8000/api/experiment-type/",
- inventory: "http://localhost:8000/api/inventory/",
- inventorymaterial: "http://localhost:8000/api/inventory-material/",
- material: "http://localhost:8000/api/material/",
- materialidentifier: "http://localhost:8000/api/material-identifier/",
- materialidentifierdef: "http://localhost:8000/api/material-identifier-def/",
- materialtype: "http://localhost:8000/api/material-type/",
- measure: "http://localhost:8000/api/measure/",
- measuredef: "http://localhost:8000/api/measure-def/",
- measuretype: "http://localhost:8000/api/measure-type/",
- mixture: "http://localhost:8000/api/mixture/",
- moleculardescriptor: "http://localhost:8000/api/molecular-descriptor/",
- organization: "http://localhost:8000/api/organization/",
- Outcome: "http://localhost:8000/api/outcome-instance/",
- outcometemplate: "http://localhost:8000/api/outcome-template/",
- parameterdef: "http://localhost:8000/api/parameter-def/",
- person: "http://localhost:8000/api/person/",
- propertytemplate: "http://localhost:8000/api/property-template/",
- reagent: "http://localhost:8000/api/reagent/",
- reagentmaterial: "http://localhost:8000/api/reagent-material/",
- reagentmaterialtemplate: "http://localhost:8000/api/reagent-material-template/",
- reagentmaterialvalue: "http://localhost:8000/api/reagent-material-value/",
- reagentmaterialvaluetemplate: "http://localhost:8000/api/reagent-material-value-template/",
- reagenttemplate: "http://localhost:8000/api/reagent-template/",
- status: "http://localhost:8000/api/status/",
- systemtool: "http://localhost:8000/api/systemtool/",
- systemtooltype: "http://localhost:8000/api/systemtool-type/",
- tag: "http://localhost:8000/api/tag/",
- tagtype: "http://localhost:8000/api/tag-type/",
- typedef: "http://localhost:8000/api/type-def/",
- udfdef: "http://localhost:8000/api/udf-def/",
- unittype: "http://localhost:8000/api/unit-type/",
- vessel: "http://localhost:8000/api/vessel/",
- vesselinstance: "http://localhost:8000/api/vessel-instance/",
- vesseltype: "http://localhost:8000/api/vessel-type/"
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.txt file for details