Settings
Settings class.
This class represents to global settings of the application.
:property data: The settings data
:type data: dict
Attributes
data: Dict
Functions
Initialize self. See help(type(self)) for accurate signature.
Name | Type | Default value | Description |
---|---|---|---|
data | dict |
Name | Type | Default value | Description |
---|---|---|---|
brick_info | BrickInfo |
Name | Type | Default value | Description |
---|---|---|---|
module_info | ModuleInfo |
List |
Get the data directory of a brick. It contains the data downloaded for a brick.
Name | Type | Default value | Description |
---|---|---|---|
brick_name | str | The name of the brick `` |
str |
Get the main data director for the brick. It contains folder for each brick containing data of the brick.
str |
Name | Type | Default value | Description |
---|---|---|---|
brick_name | str |
Optional |
Retrieve the list of all brick migrations
Dict |
Dict |
Returns the current working directory of the Application (i.e. the main brick directory)
str |
Name | Type | Default value | Description |
---|---|---|---|
k | str | ||
default | Any |
str |
Get the default data directory. Depending on if the lab is in dev or prod mode, the appropriate directory is returned.
str |
str |
str |
str |
Get the log directory
str |
str |
Dict |
Returns all the paths of all the brick used by the Application
str |
Name | Type | Default value | Description |
---|---|---|---|
name | str |
Optional |
Name | Type | Default value | Description |
---|---|---|---|
names | List |
List |
SpaceDict |
Returns a variable. Returns None
if the variable does not exist
Name | Type | Default value | Description |
---|---|---|---|
key | Any |
str |
Returns the variables dict
dict |
True when lab is running on a desktop in prod mode
bool |
True when lab is running locally in dev mode
bool |
bool |
Name | Type | Default value | Description |
---|---|---|---|
cwd | str |
Name | Type | Default value | Description |
---|---|---|---|
key | str | ||
val | Any |
Name | Type | Default value | Description |
---|---|---|---|
pip_freeze | List |
Name | Type | Default value | Description |
---|---|---|---|
space | SpaceDict |
Set a variable
Name | Type | Default value | Description |
---|---|---|---|
key | str | ||
value | str |
SettingsDTO |
Add a new brick migration log and update last migration version
Name | Type | Default value | Description |
---|---|---|---|
brick_name | str | ||
version | str |
Return the log dir
Name | Type | Default value | Description |
---|---|---|---|
is_test | bool |
str |
str |
str |
str |
Returns the front version of the lab
str |
str |
str |
DbConfig |
Settings |
str |
str |
Return the environment where the lab run ON_CLOUD : the lab is running on the cloud DESKTOP : the lab is running on a desktop LOCAL : the lab is running locally (for development purpose)
Literal |
str |
Returns the name of the lab
str |
Returns the name of the lab
str |
str |
str |
Return the open ai api key
str |
Return the root temp dir
str |
Return the space api key
str |
Return the space api url
str |
Returns the front version of the lab
str |
Returns the front version of the lab
int |
DbConfig |
str |
Return the virtual host of the machine like tokyo.gencovery.io
str |
return true if the gpu is available
bool |
Settings |
bool |
bool |
bool |
Make a unique temp dir
str |
Settings |