Skip to content

Added synthesis information to starting materials and made component collapsible #1101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Apr 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
0ec66af
Added synthesis information to starting materials
be-smith Mar 18, 2025
a2b8e69
Added collapsebility to synthesis information block
be-smith Mar 26, 2025
77c427e
Added collapsibility based on DataBlockBase.vue and changed formattin…
be-smith Mar 26, 2025
e67e10b
Added an isInitialised state so watchers don't fire on loading the pa…
be-smith Apr 8, 2025
0cca8a6
Cleared up logs and removed redundant methods
be-smith Apr 8, 2025
ccc64cf
Merge branch 'main' into bes/syninfo-sm
be-smith Apr 8, 2025
6a26de6
pre-commit changes
be-smith Apr 8, 2025
c0ed1d7
Fixed initial height of collapsed component
be-smith Apr 9, 2025
a5c7818
Added HasSynthesisInfo trait to samples and starting materials model
be-smith Apr 9, 2025
fdcb09d
Removed spurious css styles from SynthesisInformation.vue
be-smith Apr 9, 2025
5e5e3e7
Removed isInitialising etc and other extra bits that were trying to s…
be-smith Apr 9, 2025
72f2f69
Merge branch 'main' of https://github.com/datalab-org/datalab into be…
be-smith Apr 22, 2025
0f98a2b
Fixing cypress tests to expand synthesis information when creating em…
be-smith Apr 22, 2025
4e92029
Fixed calls to constituents to utils not sample - this is now control…
be-smith Apr 22, 2025
c3860a8
Merge branch 'main' into bes/syninfo-sm
ml-evs Apr 22, 2025
d41c8af
Moved validator to traits and removed from starting materials and sam…
be-smith Apr 30, 2025
23b6652
Merge branch 'bes/syninfo-sm' of https://github.com/datalab-org/datal…
be-smith Apr 30, 2025
8d4b312
Added Starting material creation form so can import from other sample…
be-smith Apr 30, 2025
b030369
Merge branch 'main' into bes/syninfo-sm
ml-evs Apr 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
194 changes: 97 additions & 97 deletions pydatalab/schemas/sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
"description": "A model for representing an experimental sample.",
"type": "object",
"properties": {
"synthesis_constituents": {
"title": "Synthesis Constituents",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/Constituent"
}
},
"synthesis_description": {
"title": "Synthesis Description",
"type": "string"
},
"blocks_obj": {
"title": "Blocks Obj",
"default": {},
Expand Down Expand Up @@ -121,24 +133,97 @@
"LiNiO2@C"
],
"type": "string"
},
"synthesis_constituents": {
"title": "Synthesis Constituents",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/Constituent"
}
},
"synthesis_description": {
"title": "Synthesis Description",
"type": "string"
}
},
"required": [
"item_id"
],
"definitions": {
"EntryReference": {
"title": "EntryReference",
"description": "A reference to a database entry by ID and type.\n\nCan include additional arbitarary metadata useful for\ninlining the item data.",
"type": "object",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"immutable_id": {
"title": "Immutable Id",
"type": "string"
},
"item_id": {
"title": "Item Id",
"minLength": 1,
"maxLength": 40,
"pattern": "^(?:[a-zA-Z0-9]+|[a-zA-Z0-9][a-zA-Z0-9._-]+[a-zA-Z0-9])$",
"type": "string"
},
"refcode": {
"title": "Refcode",
"minLength": 1,
"maxLength": 40,
"pattern": "^[a-z]{2,10}:(?:[a-zA-Z0-9]+|[a-zA-Z0-9][a-zA-Z0-9._-]+[a-zA-Z0-9])$",
"type": "string"
}
},
"required": [
"type"
]
},
"InlineSubstance": {
"title": "InlineSubstance",
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"chemform": {
"title": "Chemform",
"type": "string"
}
},
"required": [
"name"
]
},
"Constituent": {
"title": "Constituent",
"description": "A constituent of a sample.",
"type": "object",
"properties": {
"item": {
"title": "Item",
"anyOf": [
{
"$ref": "#/definitions/EntryReference"
},
{
"$ref": "#/definitions/InlineSubstance"
}
]
},
"quantity": {
"title": "Quantity",
"minimum": 0,
"type": "number"
},
"unit": {
"title": "Unit",
"default": "g",
"type": "string"
}
},
"required": [
"item",
"quantity"
]
},
"RelationshipType": {
"title": "RelationshipType",
"description": "An enumeration of the possible types of relationship between two entries.\n\n```mermaid\nclassDiagram\nclass entryC\nentryC --|> entryA: parent\nentryC ..|> entryD\nentryA <..> entryD: sibling\nentryA --|> entryB : child\n```",
Expand Down Expand Up @@ -556,91 +641,6 @@
"time_added",
"is_live"
]
},
"EntryReference": {
"title": "EntryReference",
"description": "A reference to a database entry by ID and type.\n\nCan include additional arbitarary metadata useful for\ninlining the item data.",
"type": "object",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"immutable_id": {
"title": "Immutable Id",
"type": "string"
},
"item_id": {
"title": "Item Id",
"minLength": 1,
"maxLength": 40,
"pattern": "^(?:[a-zA-Z0-9]+|[a-zA-Z0-9][a-zA-Z0-9._-]+[a-zA-Z0-9])$",
"type": "string"
},
"refcode": {
"title": "Refcode",
"minLength": 1,
"maxLength": 40,
"pattern": "^[a-z]{2,10}:(?:[a-zA-Z0-9]+|[a-zA-Z0-9][a-zA-Z0-9._-]+[a-zA-Z0-9])$",
"type": "string"
}
},
"required": [
"type"
]
},
"InlineSubstance": {
"title": "InlineSubstance",
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"chemform": {
"title": "Chemform",
"type": "string"
}
},
"required": [
"name"
]
},
"Constituent": {
"title": "Constituent",
"description": "A constituent of a sample.",
"type": "object",
"properties": {
"item": {
"title": "Item",
"anyOf": [
{
"$ref": "#/definitions/EntryReference"
},
{
"$ref": "#/definitions/InlineSubstance"
}
]
},
"quantity": {
"title": "Quantity",
"minimum": 0,
"type": "number"
},
"unit": {
"title": "Unit",
"default": "g",
"type": "string"
}
},
"required": [
"item",
"quantity"
]
}
}
}
97 changes: 97 additions & 0 deletions pydatalab/schemas/startingmaterial.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
"description": "A model for representing an experimental sample.",
"type": "object",
"properties": {
"synthesis_constituents": {
"title": "Synthesis Constituents",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/Constituent"
}
},
"synthesis_description": {
"title": "Synthesis Description",
"type": "string"
},
"blocks_obj": {
"title": "Blocks Obj",
"default": {},
Expand Down Expand Up @@ -193,6 +205,91 @@
"item_id"
],
"definitions": {
"EntryReference": {
"title": "EntryReference",
"description": "A reference to a database entry by ID and type.\n\nCan include additional arbitarary metadata useful for\ninlining the item data.",
"type": "object",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"immutable_id": {
"title": "Immutable Id",
"type": "string"
},
"item_id": {
"title": "Item Id",
"minLength": 1,
"maxLength": 40,
"pattern": "^(?:[a-zA-Z0-9]+|[a-zA-Z0-9][a-zA-Z0-9._-]+[a-zA-Z0-9])$",
"type": "string"
},
"refcode": {
"title": "Refcode",
"minLength": 1,
"maxLength": 40,
"pattern": "^[a-z]{2,10}:(?:[a-zA-Z0-9]+|[a-zA-Z0-9][a-zA-Z0-9._-]+[a-zA-Z0-9])$",
"type": "string"
}
},
"required": [
"type"
]
},
"InlineSubstance": {
"title": "InlineSubstance",
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"chemform": {
"title": "Chemform",
"type": "string"
}
},
"required": [
"name"
]
},
"Constituent": {
"title": "Constituent",
"description": "A constituent of a sample.",
"type": "object",
"properties": {
"item": {
"title": "Item",
"anyOf": [
{
"$ref": "#/definitions/EntryReference"
},
{
"$ref": "#/definitions/InlineSubstance"
}
]
},
"quantity": {
"title": "Quantity",
"minimum": 0,
"type": "number"
},
"unit": {
"title": "Unit",
"default": "g",
"type": "string"
}
},
"required": [
"item",
"quantity"
]
},
"RelationshipType": {
"title": "RelationshipType",
"description": "An enumeration of the possible types of relationship between two entries.\n\n```mermaid\nclassDiagram\nclass entryC\nentryC --|> entryA: parent\nentryC ..|> entryD\nentryA <..> entryD: sibling\nentryA --|> entryB : child\n```",
Expand Down
Loading