Samples¶
Sample
¶
Bases: Item, HasSynthesisInfo
A model for representing an experimental sample.
Attributes:
| Name | Type | Description |
|---|---|---|
blocks_obj |
dict[str, DataBlockResponse]
|
A mapping from block ID to block data. |
chemform |
str | None
|
A string representation of the chemical formula or composition associated with this sample. |
collections |
list[Collection]
|
Inlined info for the collections associated with this item. |
creator_ids |
list[PyObjectId]
|
The database IDs of the user(s) who created the item. |
creators |
list[Person] | None
|
Inlined info for the people associated with this item. |
date |
IsoformatDateTime | None
|
A relevant 'creation' timestamp for the entry (e.g., purchase date, synthesis date). |
description |
str | None
|
A description of the item, either in plain-text or a markup language. |
display_order |
list[str]
|
The order in which to display block data in the UI. |
file_ObjectIds |
list[PyObjectId]
|
Links to object IDs of files stored within the database. |
files |
list[File] | None
|
Any files attached to this sample. |
immutable_id |
PyObjectId
|
The immutable database ID of the entry. |
item_id |
HumanReadableIdentifier
|
A locally unique, human-readable identifier for the entry. This ID is mutable. |
last_modified |
IsoformatDateTime | None
|
The timestamp at which the entry was last modified. |
name |
str | None
|
An optional human-readable/usable name for the entry. |
refcode |
Refcode
|
A globally unique immutable ID comprised of the deployment prefix (e.g., |
relationships |
list[TypedRelationship] | None
|
A list of related entries and their types. |
revision |
int
|
The revision number of the entry. |
revisions |
dict[int, Any] | None
|
An optional mapping from old revision numbers to the model state at that revision. |
synthesis_constituents |
list[Constituent]
|
A list of references to constituent materials giving the amount and relevant inlined details of consituent items. |
synthesis_description |
str | None
|
Free-text details of the procedure applied to synthesise the sample |
type |
str
|
The resource type of the entry. |
blocks_obj
¶
A mapping from block ID to block data.
chemform
¶
A string representation of the chemical formula or composition associated with this sample.
collections
¶
collections: list[Collection] = Field([])
Inlined info for the collections associated with this item.
creator_ids
¶
The database IDs of the user(s) who created the item.
creators
¶
Inlined info for the people associated with this item.
date
¶
date: IsoformatDateTime | None
A relevant 'creation' timestamp for the entry (e.g., purchase date, synthesis date).
description
¶
description: str | None
A description of the item, either in plain-text or a markup language.
display_order
¶
The order in which to display block data in the UI.
file_ObjectIds
¶
Links to object IDs of files stored within the database.
immutable_id
¶
immutable_id: PyObjectId = Field(None, title='Immutable ID', alias='_id', format='uuid')
The immutable database ID of the entry.
item_id
¶
item_id: HumanReadableIdentifier
A locally unique, human-readable identifier for the entry. This ID is mutable.
last_modified
¶
last_modified: IsoformatDateTime | None = None
The timestamp at which the entry was last modified.
refcode
¶
refcode: Refcode = None
A globally unique immutable ID comprised of the deployment prefix (e.g., grey)
and a locally unique string, ideally created with some consistent scheme.
relationships
¶
relationships: list[TypedRelationship] | None = None
A list of related entries and their types.
revisions
¶
An optional mapping from old revision numbers to the model state at that revision.
synthesis_constituents
¶
A list of references to constituent materials giving the amount and relevant inlined details of consituent items.
synthesis_description
¶
synthesis_description: str | None = None
Free-text details of the procedure applied to synthesise the sample
type
¶
The resource type of the entry.
add_missing_synthesis_relationships
¶
add_missing_synthesis_relationships(values)
Add any missing sample synthesis constituents to parent relationships
check_id_names
¶
check_id_names(values)
Slightly upsetting hack: this case should be covered by the pydantic setting for populating fields by alias names.