diff --git a/tests/objects/experiment_41_elab.json b/tests/objects/experiment_41_elab.json new file mode 100644 index 0000000..257952a --- /dev/null +++ b/tests/objects/experiment_41_elab.json @@ -0,0 +1,326 @@ +{ + "access_key": null, + "body": "", + "body_html": "", + "canread": "{\"base\": 40, \"teams\": [], \"users\": [], \"teamgroups\": []}", + "canread_is_immutable": 0, + "canwrite": "{\"base\": 20, \"teams\": [], \"users\": [], \"teamgroups\": []}", + "canwrite_is_immutable": 0, + "category": 2, + "category_color": "8b8d43", + "category_title": "Deposition", + "comments": [], + "compounds": [], + "containers": [], + "content_type": 1, + "created_at": "2026-01-07 13:22:35", + "custom_id": null, + "date": "2026-01-07", + "elabid": "20260107-6884c5639c2573cd4104a3f3b93bcd5a16e4c63e", + "events_start": null, + "events_start_itemid": null, + "exclusive_edit_mode": null, + "experiments_links": [], + "firstname": "Emiliano", + "fullname": "Emiliano Di Gennaro", + "id": 41, + "is_pinned": 0, + "items_links": [ + { + "entityid": 855, + "title": "Na-26-001", + "custom_id": null, + "elabid": "20260107-e83642d2b806e5db5ebb0d6309d874f4b4461114", + "link_state": 1, + "is_bookable": 0, + "page": "database.php", + "type": "items", + "category_title": "NEW_Sample", + "category_color": "29aeb9", + "status_title": "Available", + "status_color": "6a7753" + }, + { + "entityid": 466, + "title": "Target di prova", + "custom_id": null, + "elabid": "20250224-58dbf45c5bb2f6c4f6745889da7b05a32645f83b", + "link_state": 1, + "is_bookable": 0, + "page": "database.php", + "type": "items", + "category_title": "PLD Target", + "category_color": "1a5fb4", + "status_title": null, + "status_color": null + } + ], + "lastchangeby": 2, + "lastname": "Di Gennaro", + "locked": 0, + "locked_at": null, + "lockedby": null, + "metadata": "{\"elabftw\": {\"extra_fields_groups\": [{\"id\": 4, \"name\": \"Process\"}, {\"id\": 6, \"name\": \"Post Annealing\"}, {\"id\": 3, \"name\": \"Instruments\"}]}, \"extra_fields\": {\"Sample\": {\"type\": \"items\", \"value\": 855, \"group_id\": 4, \"position\": 0}, \"Target\": {\"type\": \"items\", \"value\": 466, \"group_id\": 4, \"position\": 2, \"required\": true}, \"Chamber\": {\"type\": \"items\", \"value\": 72, \"group_id\": 3, \"position\": 0}, \"Duration\": {\"type\": \"number\", \"unit\": \"s\", \"units\": [\"s\", \"min\"], \"value\": \"365\", \"group_id\": 4, \"position\": 9}, \"Thickness\": {\"type\": \"number\", \"unit\": \"u.c.\", \"units\": [\"u.c.\", \"s\"], \"value\": \"4\", \"group_id\": 4, \"position\": 11}, \"Buffer gas\": {\"type\": \"select\", \"value\": \"O2\", \"options\": [\"O2\", \"N2\", \"Ar\", \"\"], \"group_id\": 4, \"position\": 5}, \"Duration PA\": {\"type\": \"number\", \"unit\": \"s\", \"units\": [\"s\", \"min\"], \"value\": \"\", \"group_id\": 6}, \"Laser System\": {\"type\": \"text\", \"value\": \"excimer 1\", \"group_id\": 3}, \"RHEED System\": {\"type\": \"text\", \"value\": \"staib 2\", \"group_id\": 3}, \"Buffer gas PA\": {\"type\": \"select\", \"value\": \"O2\", \"options\": [\"O2\", \"N2\", \"Ar\", \"\"], \"group_id\": 6, \"position\": 3}, \"Heating Method\": {\"type\": \"select\", \"value\": \"Radiative Heater\", \"options\": [\"Radiative Heater\", \"Laser Heater\"], \"group_id\": 4, \"position\": 7}, \"Laser Intensity\": {\"type\": \"number\", \"unit\": \"J/(s cm^2)\", \"units\": [\"J/(s cm^2)\"], \"value\": \"1.5\", \"group_id\": 4, \"position\": 8}, \"Repetition rate\": {\"type\": \"number\", \"unit\": \"Hz\", \"units\": [\"Hz\"], \"value\": \"1\", \"group_id\": 4, \"position\": 10}, \"Process pressure \": {\"type\": \"number\", \"unit\": \"mbar\", \"units\": [\"mbar\"], \"value\": \"1e-3\", \"group_id\": 4, \"position\": 6}, \"Heater temperature \": {\"type\": \"number\", \"unit\": \"°C\", \"units\": [\"°C\"], \"value\": \"650\", \"group_id\": 4, \"position\": 3}, \"Process pressure PA\": {\"type\": \"number\", \"unit\": \"mbar\", \"units\": [\"mbar\"], \"value\": \"\", \"group_id\": 6, \"position\": 4}, \"Heater temperature PA\": {\"type\": \"number\", \"unit\": \"°C\", \"units\": [\"°C\"], \"value\": \"\", \"group_id\": 6}, \"Heater-target distance\": {\"type\": \"number\", \"unit\": \"mm\", \"units\": [\"mm\"], \"value\": \"4\", \"group_id\": 4, \"position\": 4}, \"Layer Progressive Number\": {\"type\": \"number\", \"unit\": \"\", \"units\": [], \"value\": \"1\", \"group_id\": 4, \"position\": 1, \"required\": true}}}", + "metadata_decoded": { + "elabftw": { + "extra_fields_groups": [ + { + "id": 4, + "name": "Process" + }, + { + "id": 6, + "name": "Post Annealing" + }, + { + "id": 3, + "name": "Instruments" + } + ] + }, + "extra_fields": { + "Sample": { + "type": "items", + "value": 855, + "group_id": 4, + "position": 0 + }, + "Target": { + "type": "items", + "value": 466, + "group_id": 4, + "position": 2, + "required": true + }, + "Chamber": { + "type": "items", + "value": 72, + "group_id": 3, + "position": 0 + }, + "Duration": { + "type": "number", + "unit": "s", + "units": [ + "s", + "min" + ], + "value": "365", + "group_id": 4, + "position": 9 + }, + "Thickness": { + "type": "number", + "unit": "u.c.", + "units": [ + "u.c.", + "s" + ], + "value": "4", + "group_id": 4, + "position": 11 + }, + "Buffer gas": { + "type": "select", + "value": "O2", + "options": [ + "O2", + "N2", + "Ar", + "" + ], + "group_id": 4, + "position": 5 + }, + "Duration PA": { + "type": "number", + "unit": "s", + "units": [ + "s", + "min" + ], + "value": "", + "group_id": 6 + }, + "Laser System": { + "type": "text", + "value": "excimer 1", + "group_id": 3 + }, + "RHEED System": { + "type": "text", + "value": "staib 2", + "group_id": 3 + }, + "Buffer gas PA": { + "type": "select", + "value": "O2", + "options": [ + "O2", + "N2", + "Ar", + "" + ], + "group_id": 6, + "position": 3 + }, + "Heating Method": { + "type": "select", + "value": "Radiative Heater", + "options": [ + "Radiative Heater", + "Laser Heater" + ], + "group_id": 4, + "position": 7 + }, + "Laser Intensity": { + "type": "number", + "unit": "J/(s cm^2)", + "units": [ + "J/(s cm^2)" + ], + "value": "1.5", + "group_id": 4, + "position": 8 + }, + "Repetition rate": { + "type": "number", + "unit": "Hz", + "units": [ + "Hz" + ], + "value": "1", + "group_id": 4, + "position": 10 + }, + "Process pressure ": { + "type": "number", + "unit": "mbar", + "units": [ + "mbar" + ], + "value": "1e-3", + "group_id": 4, + "position": 6 + }, + "Heater temperature ": { + "type": "number", + "unit": "°C", + "units": [ + "°C" + ], + "value": "650", + "group_id": 4, + "position": 3 + }, + "Process pressure PA": { + "type": "number", + "unit": "mbar", + "units": [ + "mbar" + ], + "value": "", + "group_id": 6, + "position": 4 + }, + "Heater temperature PA": { + "type": "number", + "unit": "°C", + "units": [ + "°C" + ], + "value": "", + "group_id": 6 + }, + "Heater-target distance": { + "type": "number", + "unit": "mm", + "units": [ + "mm" + ], + "value": "4", + "group_id": 4, + "position": 4 + }, + "Layer Progressive Number": { + "type": "number", + "unit": "", + "units": [], + "value": "1", + "group_id": 4, + "position": 1, + "required": true + } + } + }, + "modified_at": "2026-01-07 13:24:45", + "next_step": "add process data", + "orcid": "0000-0003-4231-9776", + "page": "experiments", + "rating": 0, + "recent_comment": null, + "related_experiments_links": [ + { + "entityid": 43, + "title": "NEW PLD Deposition Layer I", + "custom_id": null, + "link_state": 1, + "page": "experiments.php", + "type": "experiments", + "category_title": "Deposition", + "category_color": "8b8d43", + "status_title": null, + "status_color": null + } + ], + "related_items_links": [], + "sharelink": "https://elabftw.fisica.unina.it:8080/experiments.php?mode=view&id=41", + "state": 1, + "status": 1, + "status_color": "29AEB9", + "status_title": "Running", + "steps": [ + { + "id": 23, + "item_id": 41, + "body": "add process data", + "ordering": 1, + "finished": 0, + "finished_time": null, + "deadline": null, + "deadline_notif": 0 + }, + { + "id": 24, + "item_id": 41, + "body": "add RHEED data", + "ordering": 2, + "finished": 0, + "finished_time": null, + "deadline": null, + "deadline_notif": 0 + }, + { + "id": 25, + "item_id": 41, + "body": "add RHEED images", + "ordering": 3, + "finished": 0, + "finished_time": null, + "deadline": null, + "deadline_notif": 0 + } + ], + "tags": null, + "tags_id": null, + "team": 1, + "team_name": "Default team", + "timestamped": 0, + "timestamped_at": null, + "timestampedby": null, + "title": "NEW PLD Deposition Layer", + "type": "experiments", + "uploads": [], + "userid": 2 +} diff --git a/tests/objects/experiment_43_elab.json b/tests/objects/experiment_43_elab.json new file mode 100644 index 0000000..f30de37 --- /dev/null +++ b/tests/objects/experiment_43_elab.json @@ -0,0 +1,341 @@ +{ + "access_key": null, + "body": "", + "body_html": "", + "canread": "{\"base\": 40, \"teams\": [], \"users\": [], \"teamgroups\": []}", + "canread_is_immutable": 0, + "canwrite": "{\"base\": 20, \"teams\": [], \"users\": [], \"teamgroups\": []}", + "canwrite_is_immutable": 0, + "category": 2, + "category_color": "8b8d43", + "category_title": "Deposition", + "comments": [], + "compounds": [], + "containers": [], + "content_type": 1, + "created_at": "2026-01-16 16:24:55", + "custom_id": null, + "date": "2026-01-16", + "elabid": "20260116-feb1909d7c0efd02d5b7694d8d3475cc654351d0", + "events_start": null, + "events_start_itemid": null, + "exclusive_edit_mode": null, + "experiments_links": [ + { + "entityid": 41, + "title": "NEW PLD Deposition Layer", + "custom_id": null, + "elabid": "20260107-6884c5639c2573cd4104a3f3b93bcd5a16e4c63e", + "link_state": 1, + "page": "experiments.php", + "type": "experiments", + "category_title": "Deposition", + "category_color": "8b8d43", + "status_title": "Running", + "status_color": "29AEB9" + } + ], + "firstname": "Emiliano", + "fullname": "Emiliano Di Gennaro", + "id": 43, + "is_pinned": 0, + "items_links": [ + { + "entityid": 855, + "title": "Na-26-001", + "custom_id": null, + "elabid": "20260107-e83642d2b806e5db5ebb0d6309d874f4b4461114", + "link_state": 1, + "is_bookable": 0, + "page": "database.php", + "type": "items", + "category_title": "NEW_Sample", + "category_color": "29aeb9", + "status_title": "Available", + "status_color": "6a7753" + }, + { + "entityid": 466, + "title": "Target di prova", + "custom_id": null, + "elabid": "20250224-58dbf45c5bb2f6c4f6745889da7b05a32645f83b", + "link_state": 1, + "is_bookable": 0, + "page": "database.php", + "type": "items", + "category_title": "PLD Target", + "category_color": "1a5fb4", + "status_title": null, + "status_color": null + }, + { + "entityid": 858, + "title": "ETO for deposition", + "custom_id": null, + "elabid": "20260116-715e68e8a5144fcc18c45aa87d9623411e59a1a3", + "link_state": 1, + "is_bookable": 0, + "page": "database.php", + "type": "items", + "category_title": "PLD Target", + "category_color": "1a5fb4", + "status_title": null, + "status_color": null + } + ], + "lastchangeby": 2, + "lastname": "Di Gennaro", + "locked": 0, + "locked_at": null, + "lockedby": null, + "metadata": "{\"elabftw\": {\"extra_fields_groups\": [{\"id\": 4, \"name\": \"Process\"}, {\"id\": 6, \"name\": \"Post Annealing\"}, {\"id\": 3, \"name\": \"Instruments\"}]}, \"extra_fields\": {\"Sample\": {\"type\": \"items\", \"value\": 855, \"group_id\": 4, \"position\": 0}, \"Target\": {\"type\": \"items\", \"value\": 858, \"group_id\": 4, \"position\": 2, \"required\": true}, \"Chamber\": {\"type\": \"items\", \"value\": 72, \"group_id\": 3, \"position\": 0}, \"Duration\": {\"type\": \"number\", \"unit\": \"s\", \"units\": [\"s\", \"min\"], \"value\": \"120\", \"group_id\": 4, \"position\": 9}, \"Thickness\": {\"type\": \"number\", \"unit\": \"u.c.\", \"units\": [\"u.c.\", \"s\"], \"value\": \"4\", \"group_id\": 4, \"position\": 11}, \"Buffer gas\": {\"type\": \"select\", \"value\": \"O2\", \"options\": [\"O2\", \"N2\", \"Ar\", \"\"], \"group_id\": 4, \"position\": 5}, \"Duration PA\": {\"type\": \"number\", \"unit\": \"s\", \"units\": [\"s\", \"min\"], \"value\": \"\", \"group_id\": 6}, \"Laser System\": {\"type\": \"text\", \"value\": \"excimer 1\", \"group_id\": 3}, \"RHEED System\": {\"type\": \"text\", \"value\": \"staib 2\", \"group_id\": 3}, \"Buffer gas PA\": {\"type\": \"select\", \"value\": \"O2\", \"options\": [\"O2\", \"N2\", \"Ar\", \"\"], \"group_id\": 6, \"position\": 3}, \"Heating Method\": {\"type\": \"select\", \"value\": \"Radiative Heater\", \"options\": [\"Radiative Heater\", \"Laser Heater\"], \"group_id\": 4, \"position\": 7}, \"Laser Intensity\": {\"type\": \"number\", \"unit\": \"J/(s cm^2)\", \"units\": [\"J/(s cm^2)\"], \"value\": \"1.5\", \"group_id\": 4, \"position\": 8}, \"Repetition rate\": {\"type\": \"number\", \"unit\": \"Hz\", \"units\": [\"Hz\"], \"value\": \"1\", \"group_id\": 4, \"position\": 10}, \"Process pressure \": {\"type\": \"number\", \"unit\": \"mbar\", \"units\": [\"mbar\"], \"value\": \"1e-3\", \"group_id\": 4, \"position\": 6}, \"Heater temperature \": {\"type\": \"number\", \"unit\": \"°C\", \"units\": [\"°C\"], \"value\": \"550\", \"group_id\": 4, \"position\": 3}, \"Process pressure PA\": {\"type\": \"number\", \"unit\": \"mbar\", \"units\": [\"mbar\"], \"value\": \"\", \"group_id\": 6, \"position\": 4}, \"Heater temperature PA\": {\"type\": \"number\", \"unit\": \"°C\", \"units\": [\"°C\"], \"value\": \"\", \"group_id\": 6}, \"Heater-target distance\": {\"type\": \"number\", \"unit\": \"mm\", \"units\": [\"mm\"], \"value\": \"4\", \"group_id\": 4, \"position\": 4}, \"Layer Progressive Number\": {\"type\": \"number\", \"unit\": \"\", \"units\": [], \"value\": \"2\", \"group_id\": 4, \"position\": 1, \"required\": true}}}", + "metadata_decoded": { + "elabftw": { + "extra_fields_groups": [ + { + "id": 4, + "name": "Process" + }, + { + "id": 6, + "name": "Post Annealing" + }, + { + "id": 3, + "name": "Instruments" + } + ] + }, + "extra_fields": { + "Sample": { + "type": "items", + "value": 855, + "group_id": 4, + "position": 0 + }, + "Target": { + "type": "items", + "value": 858, + "group_id": 4, + "position": 2, + "required": true + }, + "Chamber": { + "type": "items", + "value": 72, + "group_id": 3, + "position": 0 + }, + "Duration": { + "type": "number", + "unit": "s", + "units": [ + "s", + "min" + ], + "value": "120", + "group_id": 4, + "position": 9 + }, + "Thickness": { + "type": "number", + "unit": "u.c.", + "units": [ + "u.c.", + "s" + ], + "value": "4", + "group_id": 4, + "position": 11 + }, + "Buffer gas": { + "type": "select", + "value": "O2", + "options": [ + "O2", + "N2", + "Ar", + "" + ], + "group_id": 4, + "position": 5 + }, + "Duration PA": { + "type": "number", + "unit": "s", + "units": [ + "s", + "min" + ], + "value": "", + "group_id": 6 + }, + "Laser System": { + "type": "text", + "value": "excimer 1", + "group_id": 3 + }, + "RHEED System": { + "type": "text", + "value": "staib 2", + "group_id": 3 + }, + "Buffer gas PA": { + "type": "select", + "value": "O2", + "options": [ + "O2", + "N2", + "Ar", + "" + ], + "group_id": 6, + "position": 3 + }, + "Heating Method": { + "type": "select", + "value": "Radiative Heater", + "options": [ + "Radiative Heater", + "Laser Heater" + ], + "group_id": 4, + "position": 7 + }, + "Laser Intensity": { + "type": "number", + "unit": "J/(s cm^2)", + "units": [ + "J/(s cm^2)" + ], + "value": "1.5", + "group_id": 4, + "position": 8 + }, + "Repetition rate": { + "type": "number", + "unit": "Hz", + "units": [ + "Hz" + ], + "value": "1", + "group_id": 4, + "position": 10 + }, + "Process pressure ": { + "type": "number", + "unit": "mbar", + "units": [ + "mbar" + ], + "value": "1e-3", + "group_id": 4, + "position": 6 + }, + "Heater temperature ": { + "type": "number", + "unit": "°C", + "units": [ + "°C" + ], + "value": "550", + "group_id": 4, + "position": 3 + }, + "Process pressure PA": { + "type": "number", + "unit": "mbar", + "units": [ + "mbar" + ], + "value": "", + "group_id": 6, + "position": 4 + }, + "Heater temperature PA": { + "type": "number", + "unit": "°C", + "units": [ + "°C" + ], + "value": "", + "group_id": 6 + }, + "Heater-target distance": { + "type": "number", + "unit": "mm", + "units": [ + "mm" + ], + "value": "4", + "group_id": 4, + "position": 4 + }, + "Layer Progressive Number": { + "type": "number", + "unit": "", + "units": [], + "value": "2", + "group_id": 4, + "position": 1, + "required": true + } + } + }, + "modified_at": "2026-01-16 16:25:59", + "next_step": "add process data", + "orcid": "0000-0003-4231-9776", + "page": "experiments", + "rating": 0, + "recent_comment": null, + "related_experiments_links": [], + "related_items_links": [], + "sharelink": "https://elabftw.fisica.unina.it:8080/experiments.php?mode=view&id=43", + "state": 1, + "status": null, + "status_color": null, + "status_title": null, + "steps": [ + { + "id": 29, + "item_id": 43, + "body": "add process data", + "ordering": 1, + "finished": 0, + "finished_time": null, + "deadline": null, + "deadline_notif": 0 + }, + { + "id": 30, + "item_id": 43, + "body": "add RHEED data", + "ordering": 2, + "finished": 0, + "finished_time": null, + "deadline": null, + "deadline_notif": 0 + }, + { + "id": 31, + "item_id": 43, + "body": "add RHEED images", + "ordering": 3, + "finished": 0, + "finished_time": null, + "deadline": null, + "deadline_notif": 0 + } + ], + "tags": null, + "tags_id": null, + "team": 1, + "team_name": "Default team", + "timestamped": 0, + "timestamped_at": null, + "timestampedby": null, + "title": "NEW PLD Deposition Layer I", + "type": "experiments", + "uploads": [], + "userid": 2 +} diff --git a/tests/scripts/basic_parser.py b/tests/scripts/basic_parser.py new file mode 100644 index 0000000..473a0f4