Update test functions and bump version to 0.1.0a18

Refactor `testfunctions.ipynb` by standardizing API client code blocks and improving structure with `%` cells. Added PUT calls for updating TELL positions and GET requests for fetching pucks. Updated `pyproject.toml` to increment version to 0.1.0a18.
This commit is contained in:
GotthardG
2025-01-10 10:50:53 +01:00
parent d6910411f1
commit f10a5eaec2
2 changed files with 25 additions and 27 deletions

View File

@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project] [project]
name = "aareDB" name = "aareDB"
version = "0.1.0a17" version = "0.1.0a18"
description = "Backend for next gen sample management system" description = "Backend for next gen sample management system"
authors = [{name = "Guillaume Gotthard", email = "guillaume.gotthard@psi.ch"}] authors = [{name = "Guillaume Gotthard", email = "guillaume.gotthard@psi.ch"}]
license = {text = "MIT"} license = {text = "MIT"}

View File

@ -6,8 +6,8 @@
"metadata": { "metadata": {
"collapsed": true, "collapsed": true,
"ExecuteTime": { "ExecuteTime": {
"end_time": "2025-01-10T09:29:02.923917Z", "end_time": "2025-01-10T09:49:30.517077Z",
"start_time": "2025-01-10T09:29:02.921595Z" "start_time": "2025-01-10T09:49:30.163714Z"
} }
}, },
"source": [ "source": [
@ -32,18 +32,18 @@
"name": "stdout", "name": "stdout",
"output_type": "stream", "output_type": "stream",
"text": [ "text": [
"0.1.0a15\n", "0.1.0a17\n",
"['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_create_sample_event_samples_samples_sample_id_events_post_serialize', '_get_all_pucks_with_samples_and_events_samples_pucks_samples_get_serialize', '_get_last_sample_event_samples_samples_sample_id_events_last_get_serialize', '_get_samples_with_events_samples_puck_id_samples_get_serialize', 'create_sample_event_samples_samples_sample_id_events_post', 'create_sample_event_samples_samples_sample_id_events_post_with_http_info', 'create_sample_event_samples_samples_sample_id_events_post_without_preload_content', 'get_all_pucks_with_samples_and_events_samples_pucks_samples_get', 'get_all_pucks_with_samples_and_events_samples_pucks_samples_get_with_http_info', 'get_all_pucks_with_samples_and_events_samples_pucks_samples_get_without_preload_content', 'get_last_sample_event_samples_samples_sample_id_events_last_get', 'get_last_sample_event_samples_samples_sample_id_events_last_get_with_http_info', 'get_last_sample_event_samples_samples_sample_id_events_last_get_without_preload_content', 'get_samples_with_events_samples_puck_id_samples_get', 'get_samples_with_events_samples_puck_id_samples_get_with_http_info', 'get_samples_with_events_samples_puck_id_samples_get_without_preload_content']\n" "['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_create_sample_event_samples_samples_sample_id_events_post_serialize', '_get_all_pucks_with_samples_and_events_samples_pucks_samples_get_serialize', '_get_last_sample_event_samples_samples_sample_id_events_last_get_serialize', '_get_samples_with_events_samples_puck_id_samples_get_serialize', 'create_sample_event_samples_samples_sample_id_events_post', 'create_sample_event_samples_samples_sample_id_events_post_with_http_info', 'create_sample_event_samples_samples_sample_id_events_post_without_preload_content', 'get_all_pucks_with_samples_and_events_samples_pucks_samples_get', 'get_all_pucks_with_samples_and_events_samples_pucks_samples_get_with_http_info', 'get_all_pucks_with_samples_and_events_samples_pucks_samples_get_without_preload_content', 'get_last_sample_event_samples_samples_sample_id_events_last_get', 'get_last_sample_event_samples_samples_sample_id_events_last_get_with_http_info', 'get_last_sample_event_samples_samples_sample_id_events_last_get_without_preload_content', 'get_samples_with_events_samples_puck_id_samples_get', 'get_samples_with_events_samples_puck_id_samples_get_with_http_info', 'get_samples_with_events_samples_puck_id_samples_get_without_preload_content']\n"
] ]
} }
], ],
"execution_count": 76 "execution_count": 2
}, },
{ {
"metadata": { "metadata": {
"ExecuteTime": { "ExecuteTime": {
"end_time": "2025-01-10T09:29:05.237483Z", "end_time": "2025-01-10T09:49:32.425248Z",
"start_time": "2025-01-10T09:29:05.212262Z" "start_time": "2025-01-10T09:49:32.398398Z"
} }
}, },
"cell_type": "code", "cell_type": "code",
@ -70,20 +70,20 @@
"text": [ "text": [
"The response of PucksApi->get_pucks_by_slot_pucks_slot_slot_identifier_get:\n", "The response of PucksApi->get_pucks_by_slot_pucks_slot_slot_identifier_get:\n",
"\n", "\n",
"[PuckWithTellPosition(id=1, puck_name='CPS-4093', puck_type='unipuck', puck_location_in_dewar='1', dewar_id=1, dewar_name='Dewar_test', user='e16371', samples=None, tell_position='D1'),\n", "[PuckWithTellPosition(id=1, puck_name='CPS-4093', puck_type='unipuck', puck_location_in_dewar=1, dewar_id=1, dewar_name='Dewar_test', user='e16371', samples=None, tell_position='D1'),\n",
" PuckWithTellPosition(id=2, puck_name='CPS-4178', puck_type='unipuck', puck_location_in_dewar='2', dewar_id=1, dewar_name='Dewar_test', user='e16371', samples=None, tell_position=None),\n", " PuckWithTellPosition(id=2, puck_name='CPS-4178', puck_type='unipuck', puck_location_in_dewar=2, dewar_id=1, dewar_name='Dewar_test', user='e16371', samples=None, tell_position=None),\n",
" PuckWithTellPosition(id=3, puck_name='PSIMX-122', puck_type='unipuck', puck_location_in_dewar='3', dewar_id=1, dewar_name='Dewar_test', user='e16371', samples=None, tell_position=None),\n", " PuckWithTellPosition(id=3, puck_name='PSIMX-122', puck_type='unipuck', puck_location_in_dewar=3, dewar_id=1, dewar_name='Dewar_test', user='e16371', samples=None, tell_position=None),\n",
" PuckWithTellPosition(id=4, puck_name='E-07', puck_type='unipuck', puck_location_in_dewar='4', dewar_id=1, dewar_name='Dewar_test', user='e16371', samples=None, tell_position=None),\n", " PuckWithTellPosition(id=4, puck_name='E-07', puck_type='unipuck', puck_location_in_dewar=4, dewar_id=1, dewar_name='Dewar_test', user='e16371', samples=None, tell_position=None),\n",
" PuckWithTellPosition(id=5, puck_name='CPS-6597', puck_type='unipuck', puck_location_in_dewar='5', dewar_id=1, dewar_name='Dewar_test', user='e16371', samples=None, tell_position=None),\n", " PuckWithTellPosition(id=5, puck_name='CPS-6597', puck_type='unipuck', puck_location_in_dewar=5, dewar_id=1, dewar_name='Dewar_test', user='e16371', samples=None, tell_position=None),\n",
" PuckWithTellPosition(id=6, puck_name='PSIMX-078', puck_type='unipuck', puck_location_in_dewar='6', dewar_id=1, dewar_name='Dewar_test', user='e16371', samples=None, tell_position=None),\n", " PuckWithTellPosition(id=6, puck_name='PSIMX-078', puck_type='unipuck', puck_location_in_dewar=6, dewar_id=1, dewar_name='Dewar_test', user='e16371', samples=None, tell_position=None),\n",
" PuckWithTellPosition(id=7, puck_name='1002', puck_type='unipuck', puck_location_in_dewar='7', dewar_id=1, dewar_name='Dewar_test', user='e16371', samples=None, tell_position=None),\n", " PuckWithTellPosition(id=7, puck_name='1002', puck_type='unipuck', puck_location_in_dewar=7, dewar_id=1, dewar_name='Dewar_test', user='e16371', samples=None, tell_position=None),\n",
" PuckWithTellPosition(id=15, puck_name='PSIMX123', puck_type='unipuck', puck_location_in_dewar='1', dewar_id=4, dewar_name='Huang', user='e16371', samples=None, tell_position=None),\n", " PuckWithTellPosition(id=15, puck_name='PSIMX123', puck_type='unipuck', puck_location_in_dewar=1, dewar_id=4, dewar_name='Huang', user='e16371', samples=None, tell_position=None),\n",
" PuckWithTellPosition(id=16, puck_name='PSIMX125', puck_type='unipuck', puck_location_in_dewar='2', dewar_id=4, dewar_name='Huang', user='e16371', samples=None, tell_position=None),\n", " PuckWithTellPosition(id=16, puck_name='PSIMX125', puck_type='unipuck', puck_location_in_dewar=2, dewar_id=4, dewar_name='Huang', user='e16371', samples=None, tell_position=None),\n",
" PuckWithTellPosition(id=17, puck_name='PSIMX127', puck_type='unipuck', puck_location_in_dewar='3', dewar_id=4, dewar_name='Huang', user='e16371', samples=None, tell_position=None),\n", " PuckWithTellPosition(id=17, puck_name='PSIMX127', puck_type='unipuck', puck_location_in_dewar=3, dewar_id=4, dewar_name='Huang', user='e16371', samples=None, tell_position=None),\n",
" PuckWithTellPosition(id=18, puck_name='PSIMX128', puck_type='unipuck', puck_location_in_dewar='4', dewar_id=4, dewar_name='Huang', user='e16371', samples=None, tell_position=None),\n", " PuckWithTellPosition(id=18, puck_name='PSIMX128', puck_type='unipuck', puck_location_in_dewar=4, dewar_id=4, dewar_name='Huang', user='e16371', samples=None, tell_position=None),\n",
" PuckWithTellPosition(id=19, puck_name='PSIMX130', puck_type='unipuck', puck_location_in_dewar='5', dewar_id=4, dewar_name='Huang', user='e16371', samples=None, tell_position=None),\n", " PuckWithTellPosition(id=19, puck_name='PSIMX130', puck_type='unipuck', puck_location_in_dewar=5, dewar_id=4, dewar_name='Huang', user='e16371', samples=None, tell_position=None),\n",
" PuckWithTellPosition(id=20, puck_name='PSIMX131', puck_type='unipuck', puck_location_in_dewar='6', dewar_id=4, dewar_name='Huang', user='e16371', samples=None, tell_position=None),\n", " PuckWithTellPosition(id=20, puck_name='PSIMX131', puck_type='unipuck', puck_location_in_dewar=6, dewar_id=4, dewar_name='Huang', user='e16371', samples=None, tell_position=None),\n",
" PuckWithTellPosition(id=21, puck_name='PSIMX132', puck_type='unipuck', puck_location_in_dewar='7', dewar_id=4, dewar_name='Huang', user='e16371', samples=None, tell_position=None)]\n" " PuckWithTellPosition(id=21, puck_name='PSIMX132', puck_type='unipuck', puck_location_in_dewar=7, dewar_id=4, dewar_name='Huang', user='e16371', samples=None, tell_position=None)]\n"
] ]
}, },
{ {
@ -95,7 +95,7 @@
] ]
} }
], ],
"execution_count": 77 "execution_count": 3
}, },
{ {
"metadata": { "metadata": {
@ -160,8 +160,8 @@
{ {
"metadata": { "metadata": {
"ExecuteTime": { "ExecuteTime": {
"end_time": "2025-01-10T09:42:50.712826Z", "end_time": "2025-01-10T09:49:42.543974Z",
"start_time": "2025-01-10T09:42:50.684236Z" "start_time": "2025-01-10T09:49:42.522049Z"
} }
}, },
"cell_type": "code", "cell_type": "code",
@ -195,8 +195,6 @@
"text": [ "text": [
"The response of PucksApi->get_all_pucks_in_tell:\n", "The response of PucksApi->get_all_pucks_in_tell:\n",
"\n", "\n",
"CPS-4093\n",
"CPS-4093\n",
"CPS-4093\n" "CPS-4093\n"
] ]
}, },
@ -209,7 +207,7 @@
] ]
} }
], ],
"execution_count": 80 "execution_count": 4
}, },
{ {
"metadata": { "metadata": {