Rerun jupyternotebooks to check their functionality after relocating them to notebooks. OpenBis related python scripts still need to be tested.

This commit is contained in:
2024-11-24 10:45:40 +01:00
parent 02ded9c11a
commit c257ab6072
6 changed files with 7402 additions and 85 deletions

View File

@ -23,11 +23,29 @@
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Imports successful!\n"
]
}
],
"source": [
"import src.metadata_review_lib as metadata_annotation\n",
"import src.hdf5_vis as hdf5_vis\n",
"import os"
"import os\n",
"from nbutils import add_project_path_to_sys_path\n",
"\n",
"\n",
"# Add project root to sys.path\n",
"add_project_path_to_sys_path()\n",
"\n",
"try:\n",
" import src.hdf5_ops as hdf5_ops\n",
" import pipelines.metadata_revision as metadata_revision\n",
" print(\"Imports successful!\")\n",
"except ImportError as e:\n",
" print(f\"Import error: {e}\")"
]
},
{
@ -46,7 +64,7 @@
"metadata": {},
"outputs": [],
"source": [
"hdf5_file_path = \"output_files/kinetic_flowtube_study_2023-06-29_LuciaI.h5\""
"hdf5_file_path = \"../output_files/collection_kinetic_flowtube_study_LuciaI_2022-01-31_2023-06-29/kinetic_flowtube_study_LuciaI_2023-06-29.h5\""
]
},
{
@ -62,11 +80,19 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The YAML file representation output_files/collection_kinetic_flowtube_study_LuciaI_2022-01-31_2023-06-29/kinetic_flowtube_study_LuciaI_2023-06-29.json of the HDF5 file output_files/collection_kinetic_flowtube_study_LuciaI_2022-01-31_2023-06-29/kinetic_flowtube_study_LuciaI_2023-06-29.h5 was created successfully.\n"
]
}
],
"source": [
"yaml_file_path = hdf5_vis.take_yml_snapshot_of_hdf5_file(hdf5_file_path)\n",
"yaml_file_path = hdf5_ops.serialize_metadata(hdf5_file_path,output_format='json')\n",
"\n",
"if os.path.exists(yaml_file_path):\n",
" print(f'The YAML file representation {yaml_file_path} of the HDF5 file {hdf5_file_path} was created successfully.')"
@ -118,7 +144,7 @@
"outputs": [],
"source": [
"\n",
"metadata_annotation.update_hdf5_file_with_review(hdf5_file_path,yaml_file_path)"
"metadata_revision.update_hdf5_file_with_review(hdf5_file_path,yaml_file_path)"
]
}
],