For sake of ease, define secret sections as config sections that the user should not touch. Meaning, the user should not touch any entry in the section. Based on the modules we have, I assumed that sections were either entirely secret or entirely customizable (i.e. Scheduler is customizable, DBClient is secret). If this doesn't hold true, I can easily switch to commenting on each entry that the user shouldn't touch (although it would look a lot more messy).
Major changes:
DBClient now uses Configuration Manager and pulls from configuration.ini to get its necessary configurations. I uncommented and ran its tests as a sanity check that it still works.
For configurations that belong in a secret section, the corresponding entry for question is SECRET
The Configuration Manager then filters entries in questions.csv based on whether the value of question is SECRET or not. If the value is SECRET, then don't ask the user a question and just fill out the entry in the secret section using the default value. If not, the behavior is the same as before.
Throughout this, the Configuration Manager keeps track of what the secret sections are. After the configuration.ini is created, the Configuration Manager then adds comments above secret sections to show they should not be touched.
Tests are also updated to test that values in secret sections are not affected by user input (i.e. they remain as the "default" values)
This is what secret sections would look like now:
; DO NOT MODIFY THIS SECTION
[DB_CLIENT]
user = datashark
db = datasharkdb
host = datasharkdatabase.cwnzqu4zi2kl.us-west-1.rds.amazonaws.com
port = 5432
table_name = category_labels
max_tries = 3
wait_time = 10
For sake of ease, define secret sections as config sections that the user should not touch. Meaning, the user should not touch any entry in the section. Based on the modules we have, I assumed that sections were either entirely secret or entirely customizable (i.e. Scheduler is customizable, DBClient is secret). If this doesn't hold true, I can easily switch to commenting on each entry that the user shouldn't touch (although it would look a lot more messy).
Major changes:
configuration.ini
to get its necessary configurations. I uncommented and ran its tests as a sanity check that it still works.question
isSECRET
questions.csv
based on whether the value of question isSECRET
or not. If the value isSECRET
, then don't ask the user a question and just fill out the entry in the secret section using the default value. If not, the behavior is the same as before.configuration.ini
is created, the Configuration Manager then adds comments above secret sections to show they should not be touched.This is what secret sections would look like now: