This package is intended to be used to read and write data from the OGP to a local database. The package is divided into two parts:
- CLI tool for automatic upload of data from the OGP to the local database.
- GUI to read data from the local database to the OGP
Set the output template of all OGP survey programs to be OGP_template.txt file. Make changes to the user input routine of every OGP survey program, as demonstrated below.
Clone the repository and install the required packages:
git clone [email protected]:cmu-hgc-mac/HGC_OGP_DB.git
Run the following command to postprocess and upload the OGP survey results to the database:
cd HGC_OGP_DB
python rwOGP/main.py
In Python 3.6 or greater on the OGP computer:
pip install git+https://github.com/cmu-hgc-mac/HGC_OGP_DB.git
Then run in terminal
uploadOGPresults
If run for the first time, this prompts user to enter a secure folder/directory to create a configuration file containing information about database connection and OGP survey results. Modify the configuration file to include the correct information.
Running this command after will automatically postprocess and upload the OGP survey results to the database.
- Check if OGP survey program is properly named. Spaces are very likely to cause parsing issues and therefore should be avoided. Correct Example: CMU_OGP_module_survey_2024
This GUI contains two tabs: 'View Plots' and 'Upload Files'.
- View plots shows plots data from the OGP. (TBD: Change limit on number of files)
- Upload Files lets the user upload .XLS output files containing OGP meaurements to the local db.
- The watch directory must contain the following subdirectories for the GUI to work:
- baseplates
- hexaboards
- protomodules
- modules
- The OGP inspection files must be configured to write to these locations by default type.
- The .XLS files must be saved with the ID of the component and will be used as the part ID in the db.
- The watch directory must contain the following subdirectories for the GUI to work:
- If the template is changed, how data is parsed from the OGP output files will also need to be modified accordingly in
src/param.py
. - The meta data needs to follow the format:
Otherwise ttp package will have trouble parsing the data.
LastModified: {ProjectLastModified} Runtime: {RunDateTime}
Install postgreSQL-15 with pgAdmin4 on your computers. Make sure you add psql
to your path.