Settings
Settings class.
This class represents to global settings of the application.
:property data: The settings data
:type data: dict
data: dictInitialize self. See help(type(self)) for accurate signature.
dictBrickInfoModuleInfolistReturns a variable for a specific brick. Raises an error if the variable does not exist
strstrstrstrgws_core.brick.brick_dto.BrickInfo | NoneGet the data directory of a brick. It contains the data downloaded for a brick.
strstrGet the main data director for the brick. It contains folder for each brick containing data of the brick.
strRetrieve all brick migration logs.
BrickMigrationsLogsdictGet the default data directory. Depending on if the lab is in dev or prod mode, the appropriate directory is returned.
strGet the data extensions directory. It contains folder for each brick containing data extensions of the brick.
strstrstrstrGet the log directory
strstrstrdictReturns all the paths of all the brick used by the Application
strstrgws_core.core.utils.settings_dto.PipPackage | NonelistlistReturn the root temp dir. Isolated per worker when running parallel tests.
strgws_core.user.user_dto.SpaceDict | NoneReturns a variable for a specific brick. Returns None if the variable does not exist
strstrstr | NoneboolSave brick migration logs to settings.
BrickMigrationsLogsstrAnyboolstrlistSpaceDictSettingsDTOReturn the log dir
boolstrstrstrstrstrReturns the port where all the external request to app are sent.
intReturns the sub domain of the app
strstr | NoneGet the community API URL and check if it's set. Raise an error if it's not set.
strstr | NoneGet the community front URL and check if it's set. Raise an error if it's not set.
strstrstrReturns the front version of the lab
strstrstrDbConfigSettingsstrstrReturn 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)
LabEnvironmentstrReturns the name of the lab
strstrLabModeReturns the name of the lab
strstrReturn the file path where the lab start logs are stored
strstrReturn the path where the monitor disk data is stored
strReturn the maximum number of lines to keep in the monitor log. This is the maximum number of lines to keep in the monitor log. With 1 log every 30 seconds, this is 86400 lines for 1 month.
intReturn the required free disk space in bytes. This is the minimum free disk space required to avoid disk full. Once reached, no more data can be uploaded or scenario run. By default it is set to 10% of the disk space with a minimum of 5GB and a maximum of 20GB.
int | NoneReturn the tick interval for the monitor cleanup in seconds. This is the interval at which the monitor data is cleaned up.
intReturn the tick interval for the monitor log in seconds. This is the interval at which the monitor data is logged.
intReturn the open ai api key
strGet an environment variable and raise an error if it's not set.
strstr | NonestrReturn the reflex access token to authenticate reflex app
str | NoneReturn the space api key
strReturn the space api url
strReturn the space front url
strstrstrDbConfigReturn the test DB name, suffixed with the current worker id when present.
Set by pytest-xdist (PYTEST_XDIST_WORKER=gw0, gw1, ...) or manually via GWS_TEST_WORKER_ID. Each worker gets its own schema so parallel tests don't stomp on each other when truncating tables.
strReturn the test dir, suffixed with the worker id for parallel test isolation.
Each pytest-xdist worker (or any caller setting GWS_TEST_WORKER_ID) gets its own directory so concurrent tests don't stomp on each other's data, kvstore, filestore, logs, etc.
strstrstrReturn the virtual host of the machine like tokyo.gencovery.io
strreturn true if the gpu is available
boolSettingsboolTrue when lab is running on a desktop (data lab desktop)
boolboolTrue when lab is running locally in dev mode
boolboolTrue when lab is running locally or on a desktop in prod mode
boolboolMake a unique temp dir
strstrstrstrstr