mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-29 13:32:08 +00:00
* adding BaseModel * initial version of the system model * creating setup functions and removing constants from config_terminal * removing log_supress const * fix test * merge * system handler * fix import * centralized configs setup * repr to use the BaseModel * updating i18n dict location * ignoring warning on wrong type-var * ruff * Update openbb_terminal/core/models/system_model.py Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> * Update openbb_terminal/core/models/system_model.py Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> * import literal * loading env files before the plot backend is called * fix tests/openbb_terminal/test_terminal_helper.py * tests need to have i18n initialized * fix seeking_alpha tests --------- Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
29 lines
915 B
Python
29 lines
915 B
Python
from typing import Literal
|
|
|
|
from pydantic.dataclasses import dataclass
|
|
|
|
from openbb_terminal.core.models import BaseModel
|
|
|
|
|
|
@dataclass(config=dict(validate_assignment=True, frozen=True))
|
|
class SystemModel(BaseModel):
|
|
"""Data model for system variables and configurations."""
|
|
|
|
# System version
|
|
VERSION = "2.5.1"
|
|
|
|
# Logging section
|
|
LOGGING_APP_NAME: str = "gst"
|
|
LOGGING_AWS_ACCESS_KEY_ID: str = "REPLACE_ME"
|
|
LOGGING_AWS_SECRET_ACCESS_KEY: str = "REPLACE_ME"
|
|
LOGGING_COMMIT_HASH: str = "REPLACE_ME"
|
|
LOGGING_FREQUENCY: Literal["D", "H", "M", "S"] = "H"
|
|
LOGGING_HANDLERS: Literal["stdout", "stderr", "noop", "file"] = "file"
|
|
LOGGING_ROLLING_CLOCK: bool = False
|
|
LOGGING_VERBOSITY: int = 20
|
|
LOGGING_SUB_APP: str = "terminal"
|
|
LOGGING_SUPPRESS: bool = False
|
|
|
|
def __repr__(self) -> str: # pylint: disable=useless-super-delegation
|
|
return super().__repr__()
|