Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion aind-slims-service-server/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ line_length = 79
profile = "black"

[tool.interrogate]
exclude = ["setup.py", "docs", "build"]
exclude = ["setup.py", "docs", "build", "env"]
fail-under = 100

[tool.pytest.ini_options]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@ def _parse_graph(
"ordr_cf_fluorescenceChannels_CellSegmentation",
)
)
spim_data.order_created_by = self.get_attr_or_none(
row,
"ordr_createdBy",
)
spim_data.order_project_id = self.get_attr_or_none(
row, "ordr_cf_fk_projectId", "displayValue"
)
if subject_id is None or subject_id == spim_data.subject_id:
spim_data_list.append(spim_data)
return spim_data_list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ class SlimsSpimData(BaseModel):
"""Expected Model that needs to be extracted from SLIMS"""

experiment_run_created_on: Optional[AwareDatetime] = None
order_created_by: Optional[str] = None
order_project_id: Optional[str] = None
specimen_id: Optional[str] = None
subject_id: Optional[str] = None
protocol_name: Optional[str] = None
Expand Down
2 changes: 2 additions & 0 deletions aind-slims-service-server/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ def test_imaging_data():
return [
SlimsSpimData(
experiment_run_created_on=1739383241200,
order_project_id="Some Project - Some Subproject 1",
order_created_by="PersonS",
specimen_id="BRN00000018",
subject_id="744742",
protocol_name="Imaging cleared mouse brains on SmartSPIM",
Expand Down
22 changes: 22 additions & 0 deletions aind-slims-service-server/tests/resources/imaging/order.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,28 @@
"value": null,
"hidden": false,
"editable": true
},
{
"datatype": "FOREIGN_KEY",
"name": "ordr_cf_fk_projectId",
"title": "Project ID",
"position": 19,
"value": 1975,
"hidden": false,
"editable": true,
"foreignTable": "ReferenceDataRecord",
"displayValue": "Some Project - Some Subproject 1",
"displayField": "ordr_cf_fk_projectId_display",
"foreignDisplayColumn": "rdrc_name"
},
{
"datatype": "STRING",
"name": "ordr_createdBy",
"title": "Created by",
"position": 30,
"value": "PersonS",
"hidden": false,
"editable": true
}
]
}
Expand Down