DB integration for optical throughput calibration
Description
This MR introduces the usage of a local PostgreSQL DataBase for storing the output of the optical throughput calibration. It also performs a refactoring of the pre-existent code.
Related Issue
Closes #36 (closed).
How Has This Been Tested?
A third test has been added to the throughput calibration tests, to check that results are correctly stored in the DB and that the version of the table is saved/updated correctly according to the following logic:
- search for a compatible table in the DB (same major version)
- if a compatible table is present, update its minor version if the new one is greater
- if no compatible table is present, simply insert a new table of the new version in the DB
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
-
My code follows the code style of this project. -
My change requires a change to the documentation. -
I have updated the documentation accordingly. -
I have read the CONTRIBUTING document. -
I have added tests to cover my changes. -
All new and existing tests passed.
Edited by Antonio Di Pilato