diff --git a/openbb_providers/README.md b/openbb_providers/README.md index b5d038ec478..c5b251e7799 100644 --- a/openbb_providers/README.md +++ b/openbb_providers/README.md @@ -65,7 +65,7 @@ Close for closing price column name in data from one provider might be coded as ### 1. Defining : OpenBB QueryParams ```python -from openbb_providers.openbb_provider.model.data.stock_eod import StockEODQueryParams +from openbb_provider.model.data.stock_eod import StockEODQueryParams query = StockEODQueryParams( symbol="AAPL", @@ -76,7 +76,7 @@ query = StockEODQueryParams( ### 2. Querying the Provider Table : OpenBB QueryParams -> OpenBB Data ```python -from openbb_providers.openbb_provider.provider.provider_registry import provider_registry +from openbb_provider.provider.provider_registry import provider_registry data = provider_registry.fetch(provider_name="fmp", query=query) print(data) diff --git a/openbb_sdk/builtin_extensions/providers/providers_router.py b/openbb_sdk/builtin_extensions/providers/providers_router.py index 8906f88f982..ff590f842da 100644 --- a/openbb_sdk/builtin_extensions/providers/providers_router.py +++ b/openbb_sdk/builtin_extensions/providers/providers_router.py @@ -1,9 +1,8 @@ """OpenBB Provider command Coverage Router.""" +from openbb_provider.provider.abstract.provider import ProviderName from openbb_sdk_core.app.model.command_output import CommandOutput from openbb_sdk_core.app.router import CommandMap, Router -from openbb_providers.openbb_provider.provider.abstract.provider import ProviderName - router = Router() diff --git a/openbb_sdk/openbb/__init__.py b/openbb_sdk/openbb/__init__.py index 2c4d7d901bc..b2e463193b6 100644 --- a/openbb_sdk/openbb/__init__.py +++ b/openbb_sdk/openbb/__init__.py @@ -1,4 +1,11 @@ # flake8: noqa -from openbb_sdk.openbb_sdk_core.openbb_sdk_core.app.static.command_runner_wrapper import ( - app, -) +from openbb_sdk_core.app.static.command_runner_wrapper import app as openbb + + +def _rebuild_python_interface() -> None: + """Rebuild the Python SDK.""" + from openbb_sdk_core.app.static.package_builder import ( # pylint: disable=import-outside-toplevel + PackageBuilder, + ) + + PackageBuilder.build() diff --git a/openbb_sdk/openbb_sdk_core/openbb_sdk_core/app/model/system_settings.py b/openbb_sdk/openbb_sdk_core/openbb_sdk_core/app/model/system_settings.py index a409aca2528..eecd13bd8d2 100644 --- a/openbb_sdk/openbb_sdk_core/openbb_sdk_core/app/model/system_settings.py +++ b/openbb_sdk/openbb_sdk_core/openbb_sdk_core/app/model/system_settings.py @@ -2,17 +2,11 @@ import platform as pl # I do this so that the import doesn't conflict with the from pathlib import Path from typing import List, Literal, Optional -import tomli from pydantic import Field, root_validator, validator from openbb_sdk_core.app.model.abstract.tagged import Tagged from openbb_sdk_core.logs.utils.system_utils import get_branch, get_commit_hash -with open( - Path(__file__).parent.parent.parent.parent / "pyproject.toml", mode="rb" -) as f: - pyproject = tomli.load(f) - class SystemSettings(Tagged): run_in_isolation: bool = Field( @@ -30,7 +24,8 @@ class SystemSettings(Tagged): platform: str = str(pl.platform()) # OpenBB section - version: str = pyproject["tool"]["poetry"]["version"] + # TODO: Get the version of the SDK from somewhere that's not pyproject.toml + version: str = "4.0.0dev" home_directory: str = str(Path.home()) openbb_directory: str = str(Path(home_directory, ".openbb")) diff --git a/openbb_sdk/openbb_sdk_core/openbb_sdk_core/app/query.py b/openbb_sdk/openbb_sdk_core/openbb_sdk_core/app/query.py index 89f903866b9..78e5d68376d 100644 --- a/openbb_sdk/openbb_sdk_core/openbb_sdk_core/app/query.py +++ b/openbb_sdk/openbb_sdk_core/openbb_sdk_core/app/query.py @@ -4,11 +4,9 @@ import warnings from dataclasses import asdict from typing import Any, Dict, Optional +from openbb_provider.provider.provider_registry import build_provider_registry from pydantic import BaseModel -from openbb_providers.openbb_provider.provider.provider_registry import ( - build_provider_registry, -) from openbb_sdk_core.app.model.abstract.warning import OpenBBWarning from openbb_sdk_core.app.model.command_context import CommandContext from openbb_sdk_core.app.provider_interface import (