SlangLab-NU / VoiceCollector

Apache License 2.0
1 stars 1 forks source link

2 add a sql database for running app locally #9

Closed jordan-git-lewis closed 1 year ago

jordan-git-lewis commented 1 year ago

The database runs locally in its current state. Known issues: in speak.py line 56 - DB is created here initially, but then it gets commented out to not overwrite the previous data. in speak.py line 64 - References are written to DB here. This will execute every time the program is run, which is unnecessary

Rao2321 commented 1 year ago
  1. moving all the names like database.db, schema.sql and other configurables to config file
  2. validating the input before inserting into the database
  3. having a check like if else if it is dev/local env and if the db exists and having else with creating db, because if X tries to clone the code and try to run it hsould ideally create the db without uncommenting
  4. and some unit test cases, from my understanding there are no unittesting code for db utils or connections i see only test cases for api, data utils and validations. this also includes testing connections to aws
jordan-git-lewis commented 1 year ago
  1. moving all the names like database.db, schema.sql and other configurables to config file
  2. validating the input before inserting into the database
  3. having a check like if else if it is dev/local env and if the db exists and having else with creating db, because if X tries to clone the code and try to run it hsould ideally create the db without uncommenting
  4. and some unit test cases, from my understanding there are no unittesting code for db utils or connections i see only test cases for api, data utils and validations. this also includes testing connections to aws

Updated the config.json to have variable names separated by APP and DATABASE. The program now pulls from that file accordingly, but let me know if there is a better way to write this

aanchan commented 1 year ago

Can add a TYPE variable to config.json in the DATABASE field to: