Displaying Processing Results in the frontend

This commit is contained in:
GotthardG
2025-03-17 16:45:50 +01:00
parent 5a0047b6d5
commit 68f87f0d8d
5 changed files with 271 additions and 172 deletions

View File

@ -3,8 +3,8 @@
{
"metadata": {
"ExecuteTime": {
"end_time": "2025-03-17T10:32:07.119518Z",
"start_time": "2025-03-17T10:32:06.622836Z"
"end_time": "2025-03-17T15:41:26.497650Z",
"start_time": "2025-03-17T15:41:25.771778Z"
}
},
"cell_type": "code",
@ -385,8 +385,8 @@
{
"metadata": {
"ExecuteTime": {
"end_time": "2025-03-17T10:32:10.718097Z",
"start_time": "2025-03-17T10:32:10.716192Z"
"end_time": "2025-03-17T15:41:47.722623Z",
"start_time": "2025-03-17T15:41:47.720727Z"
}
},
"cell_type": "code",
@ -736,8 +736,8 @@
{
"metadata": {
"ExecuteTime": {
"end_time": "2025-03-17T10:46:08.211213Z",
"start_time": "2025-03-17T10:46:08.193139Z"
"end_time": "2025-03-17T15:42:07.300875Z",
"start_time": "2025-03-17T15:42:07.279495Z"
}
},
"cell_type": "code",
@ -750,12 +750,12 @@
"from aareDBclient.rest import ApiException\n",
"\n",
"# Your actual sample and experiment IDs\n",
"sample_id = 123 # Replace with valid IDs\n",
"sample_id = sample_id # Replace with valid IDs\n",
"run_id = 1 # Replace with valid run_id\n",
"\n",
"# Create random Results payload\n",
"results_data = Results(\n",
" pipeline=\"autoproc\",\n",
" pipeline=\"fastproc\",\n",
" resolution=round(random.uniform(1.0, 4.0), 2),\n",
" unit_cell=f\"{random.uniform(20, 120):.2f}, {random.uniform(20, 120):.2f}, \"\n",
" f\"{random.uniform(20, 120):.2f}, {random.uniform(60, 120):.2f}, \"\n",
@ -804,9 +804,9 @@
"output_type": "stream",
"text": [
"DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): 127.0.0.1:8000\n",
"/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/urllib3/connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host '127.0.0.1'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings\n",
"/Users/gotthardg/PycharmProjects/aaredb/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host '127.0.0.1'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings\n",
" warnings.warn(\n",
"DEBUG:urllib3.connectionpool:https://127.0.0.1:8000 \"POST /samples/processing-results HTTP/1.1\" 200 369\n"
"DEBUG:urllib3.connectionpool:https://127.0.0.1:8000 \"POST /samples/processing-results HTTP/1.1\" 200 367\n"
]
},
{
@ -814,11 +814,11 @@
"output_type": "stream",
"text": [
"API call successful:\n",
"ResultResponse(id=2, sample_id=123, run_id=1, result=Results(pipeline='autoproc', resolution=1.94, unit_cell='23.86, 89.07, 37.39, 63.99, 88.77, 81.42', spacegroup='P41212', rmerge=0.072, rmeas=0.07, isig=29.58, cc=0.758, cchalf=0.915, completeness=93.12, multiplicity=6.1, nobs=279922, total_refl=83994, unique_refl=47041, comments='Random auto-generated test entry'))\n"
"ResultResponse(id=4, sample_id=247, run_id=1, result=Results(pipeline='fastproc', resolution=3.93, unit_cell='56.27, 40.58, 26.64, 93.74, 90.52, 99.53', spacegroup='C2', rmerge=0.097, rmeas=0.13, isig=21.29, cc=0.989, cchalf=0.802, completeness=98.46, multiplicity=6.35, nobs=273232, total_refl=217336, unique_refl=11189, comments='Random auto-generated test entry'))\n"
]
}
],
"execution_count": 9
"execution_count": 3
},
{
"metadata": {