This commit is contained in:
Diogo Sousa
2023-08-18 16:45:11 +01:00
parent 3b312138a6
commit 271ab8b38a
3 changed files with 7 additions and 3 deletions

View File

@@ -34,7 +34,9 @@ class LoggingSettings:
# System
self.commit_hash: Optional[str] = system_settings.logging_commit_hash
self.branch: Optional[str] = get_branch(self.commit_hash) if self.commit_hash else None
self.branch: Optional[str] = (
get_branch(self.commit_hash) if self.commit_hash else None
)
self.app_name: str = system_settings.logging_app_name
self.app_id: str = get_app_id(user_data_directory)
self.session_id: str = get_session_id()

View File

@@ -19,7 +19,9 @@ GITHUB_PROJECT_URL = (
UNKNOWN_COMMIT_PLACEHOLDER = "unknown-commit"
UNKNOWN_BRANCH_PLACEHOLDER = "unknown-branch"
REPOSITORY_DIRECTORY = Path(__file__).parent.parent.parent.parent.parent.parent.parent.parent
REPOSITORY_DIRECTORY = Path(
__file__
).parent.parent.parent.parent.parent.parent.parent.parent
def get_commit_hash() -> str:

View File

@@ -13,7 +13,7 @@ from openbb_core.app.constants import (
SYSTEM_SETTINGS_PATH,
USER_SETTINGS_PATH,
)
from openbb_core.app.logs.utils.system_utils import get_branch, get_commit_hash
from openbb_core.app.logs.utils.system_utils import get_commit_hash
from openbb_core.app.model.abstract.tagged import Tagged
FrozenField = partial(Field, allow_mutation=False)