mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 20:42:26 +00:00
Feature/add version (#5861)
* add version to base doc * clean account doc * consistency
This commit is contained in:
@@ -61,7 +61,7 @@ async def startup():
|
||||
banner = rf"""
|
||||
|
||||
███╗
|
||||
█████████████████╔══█████████████████╗ OpenBB Platform {system.version}
|
||||
█████████████████╔══█████████████████╗ OpenBB Platform v{system.version}
|
||||
███╔══════════███║ ███╔══════════███║
|
||||
█████████████████║ █████████████████║ Authentication: {auth}
|
||||
╚═════════════███║ ███╔═════════════╝
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Account service."""
|
||||
"""Account."""
|
||||
# pylint: disable=W0212:protected-access
|
||||
import json
|
||||
from functools import wraps
|
||||
@@ -18,13 +18,11 @@ if TYPE_CHECKING:
|
||||
|
||||
|
||||
class Account:
|
||||
"""The account service handles the following commands.
|
||||
|
||||
/account
|
||||
login
|
||||
logout
|
||||
save
|
||||
refresh
|
||||
"""/account
|
||||
login
|
||||
logout
|
||||
save
|
||||
refresh
|
||||
"""
|
||||
|
||||
SESSION_FILE = ".hub_session.json"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
"""App factory."""
|
||||
from typing import Optional, Type, TypeVar
|
||||
|
||||
from openbb_core.app.command_runner import CommandRunner
|
||||
@@ -6,13 +7,10 @@ from openbb_core.app.model.user_settings import UserSettings
|
||||
from openbb_core.app.static.account import Account
|
||||
from openbb_core.app.static.container import Container
|
||||
from openbb_core.app.static.coverage import Coverage
|
||||
from openbb_core.app.version import VERSION
|
||||
|
||||
E = TypeVar("E", bound=Type[Container])
|
||||
|
||||
|
||||
class BaseApp:
|
||||
# fmt: off
|
||||
"""OpenBB Platform
|
||||
BASE_DOC = f"""OpenBB Platform v{VERSION}
|
||||
|
||||
Utilities:
|
||||
/account
|
||||
@@ -20,7 +18,10 @@ Utilities:
|
||||
/system
|
||||
/coverage
|
||||
"""
|
||||
# fmt: on
|
||||
|
||||
|
||||
class BaseApp:
|
||||
"""Base app."""
|
||||
|
||||
def __init__(self, command_runner: CommandRunner):
|
||||
self._command_runner = command_runner
|
||||
@@ -58,6 +59,6 @@ def create_app(extensions: Optional[E] = None) -> Type[BaseApp]:
|
||||
def __repr__(self) -> str:
|
||||
# pylint: disable=E1101
|
||||
ext_doc = extensions.__doc__ if extensions else ""
|
||||
return (super().__doc__ or "") + (ext_doc or "")
|
||||
return BASE_DOC + (ext_doc or "")
|
||||
|
||||
return App(command_runner=CommandRunner())
|
||||
|
||||
Reference in New Issue
Block a user