Common reference metadata
Description
Were created calibpipe
and sqlalchemy
containers to store common reference metadata, and wrote test to upload them and check their connection to each other. Metadata tables are connected to the main data table through primary key named ID
which is autoincremented value. Currently I implemented metadata uploading as secondary to the uploading of the data, i.e.
- First step: we upload to the CalibPipe DB our calibration calculations.
- Second step: we retrieve the primary key of this last uploaded data record and connect to this key all appropriate metadata tables.
Few comments with explanation how is working primary key ID
in the optical throughput table. It is implemented only in the sqlalchemy container
, which allows us not to think about it while calculating the optical throughput values and filling with them calibpipe container
. According to the design of PostgreSQL database system (and sqlalchemy which leverages this feature), this ID
field always will be automatically created with proper auto incrementing from the last highest value during DB insertion.
Commits
-
Test to check uploading and attachment of metadata
-
Minor changes to calibpipe metadata containers
-
Added SQL containers for metadata
-
Added first sql reference metadata container
-
Created metadaata calibpipe containers
-
Renamed file for storing throughput containers
Related Issue
Closes #141 (closed) #137 (closed) #136 (closed) #135 (closed)
How Has This Been Tested?
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.