Config¶
Class that allows for reading and modification of a configuration (config) file. A config file is not required but using one will make using DAPT much easier to use and greatly increase increase it’s functionality. A configuration file is simply a JSON file. There are some reserved keys but you can add your own and refer to them throughout your program.
Fields¶
Fields | Description |
---|---|
last-test (str) |
The last test id that was run. |
user-name (str) |
The box username of the user. |
spreedsheet-id (str) |
The Google spreedsheet ID being used. |
sheets-creds-path (str) |
The Google Sheets credentials file path. |
sheet-worksheet-id (str) |
The Google Sheets worksheet id. Sheets are indexed at 0. |
sheet-worksheet-title (str) |
The Google Sheets worksheet title. |
client_id (str) |
Box API client ID. |
client_secret (str) |
Box API client secret. |
box-folder-id (str) |
The box folder id to use |
reset-time (str) |
The time that the box access-token needs to be refreshed. |
num-of-runs (int) |
The number of paramater sets to run. |
computer-strength (int) |
Any comments such as error messages relating to the parameter set. |
access-token (str) |
The box access token for the particular session. |
refresh-token (str) |
The box refresh token for the particular session. |
-
class
dapt.config.
Config
(path='config.json')¶ Class which loads and allows for editing of a config file
Parameters: path (string) – path to config file -
static
create
(path='config.json')¶ Creates a config file with the reserved keys inserted.
Parameters: path (string) – path where config file will be written
-
read_config
()¶ Reads the file with path set to self.path
Returns: Dictionary of config file
-
static
safe
(path='config.json')¶ Safe config file by removing accessToken and refreshToken.
Parameters: path (string) – path where config file will be writen
-
update_config
()¶ Change value for a given key in the config file
Returns: Dictionary of config file
-
static