summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Radovanovic <74266147+IgorWounds@users.noreply.github.com>2024-05-27 15:23:35 +0200
committerGitHub <noreply@github.com>2024-05-27 15:23:35 +0200
commit8d2c4ee8d1895fcd7abde52d0156c93f41bdc5ab (patch)
treeb6a648f95e8cf3296a1e8613f9e89504f1cd06a4
parent58e8ada6f4fd28f53a62ba461f790e6012cdc8be (diff)
parentbfad015fcb19f3f2d96d9296cfe33589ef17c0a0 (diff)
Merge branch 'develop' into feature/stream-fetcher
-rw-r--r--.codespell.ignore1
-rw-r--r--.codespell.skip2
-rw-r--r--.github/workflows/general-linting.yml19
-rw-r--r--.pre-commit-config.yaml2
-rw-r--r--openbb_platform/core/openbb_core/app/logs/handlers/path_tracking_file_handler.py2
-rw-r--r--openbb_platform/core/openbb_core/app/model/api_settings.py4
-rw-r--r--openbb_platform/core/openbb_core/app/static/package_builder.py2
-rw-r--r--openbb_platform/core/openbb_core/provider/standard_models/balance_sheet_growth.py130
-rw-r--r--openbb_platform/core/openbb_core/provider/standard_models/cash_flow_growth.py117
-rw-r--r--openbb_platform/core/openbb_core/provider/standard_models/income_statement_growth.py102
-rw-r--r--openbb_platform/core/openbb_core/provider/standard_models/upcoming_release_days.py23
-rw-r--r--openbb_platform/core/poetry.lock288
-rw-r--r--openbb_platform/core/pyproject.toml2
-rw-r--r--openbb_platform/extensions/derivatives/integration/test_derivatives_api.py1
-rw-r--r--openbb_platform/extensions/derivatives/integration/test_derivatives_python.py1
-rw-r--r--openbb_platform/extensions/equity/integration/test_equity_api.py46
-rw-r--r--openbb_platform/extensions/equity/integration/test_equity_python.py43
-rw-r--r--openbb_platform/extensions/equity/openbb_equity/discovery/discovery_router.py14
-rw-r--r--openbb_platform/obbject_extensions/charting/openbb_charting/core/openbb_figure.py2
-rw-r--r--openbb_platform/openbb/assets/reference.json780
-rw-r--r--openbb_platform/openbb/package/derivatives_options.py14
-rw-r--r--openbb_platform/openbb/package/equity_fundamental.py542
-rw-r--r--openbb_platform/providers/fmp/openbb_fmp/models/balance_sheet.py4
-rw-r--r--openbb_platform/providers/fmp/openbb_fmp/models/balance_sheet_growth.py222
-rw-r--r--openbb_platform/providers/fmp/openbb_fmp/models/cash_flow.py5
-rw-r--r--openbb_platform/providers/fmp/openbb_fmp/models/cash_flow_growth.py185
-rw-r--r--openbb_platform/providers/fmp/openbb_fmp/models/income_statement.py9
-rw-r--r--openbb_platform/providers/fmp/openbb_fmp/models/income_statement_growth.py173
-rw-r--r--openbb_platform/providers/fmp/tests/record/http/test_fmp_fetchers/test_fmp_balance_sheet_growth_fetcher.yaml2
-rw-r--r--openbb_platform/providers/fmp/tests/record/http/test_fmp_fetchers/test_fmp_cash_flow_statement_growth_fetcher.yaml2
-rw-r--r--openbb_platform/providers/fmp/tests/test_fmp_fetchers.py6
-rw-r--r--openbb_platform/providers/intrinio/openbb_intrinio/models/balance_sheet.py10
-rw-r--r--openbb_platform/providers/intrinio/openbb_intrinio/models/cash_flow.py11
-rw-r--r--openbb_platform/providers/intrinio/openbb_intrinio/models/income_statement.py30
-rw-r--r--openbb_platform/providers/polygon/openbb_polygon/models/balance_sheet.py109
-rw-r--r--openbb_platform/providers/polygon/openbb_polygon/models/cash_flow.py59
-rw-r--r--openbb_platform/providers/polygon/openbb_polygon/models/income_statement.py34
-rw-r--r--openbb_platform/providers/seeking_alpha/openbb_seeking_alpha/__init__.py12
-rw-r--r--openbb_platform/providers/seeking_alpha/openbb_seeking_alpha/models/calendar_earnings.py144
-rw-r--r--openbb_platform/providers/seeking_alpha/openbb_seeking_alpha/models/forward_eps_estimates.py207
-rw-r--r--openbb_platform/providers/seeking_alpha/openbb_seeking_alpha/models/forward_sales_estimates.py179
-rw-r--r--openbb_platform/providers/seeking_alpha/openbb_seeking_alpha/models/upcoming_release_days.py108
-rw-r--r--openbb_platform/providers/seeking_alpha/openbb_seeking_alpha/utils/helpers.py40
-rw-r--r--openbb_platform/providers/seeking_alpha/tests/record/http/test_seeking_alpha_fetchers/test_sa_calendar_earnings_fetcher.yaml400
-rw-r--r--openbb_platform/providers/seeking_alpha/tests/record/http/test_seeking_alpha_fetchers/test_sa_forward_eps_estimates.yaml223
-rw-r--r--openbb_platform/providers/seeking_alpha/tests/record/http/test_seeking_alpha_fetchers/test_sa_forward_sales_estimates.yaml208
-rw-r--r--openbb_platform/providers/seeking_alpha/tests/record/http/test_seeking_alpha_fetchers/test_sa_upcoming_release_days_fetcher.yaml249
-rw-r--r--openbb_platform/providers/seeking_alpha/tests/test_seeking_alpha_fetchers.py40
-rw-r--r--openbb_platform/providers/yfinance/openbb_yfinance/__init__.py2
-rw-r--r--openbb_platform/providers/yfinance/openbb_yfinance/models/balance_sheet.py5
-rw-r--r--openbb_platform/providers/yfinance/openbb_yfinance/models/cash_flow.py5
-rw-r--r--openbb_platform/providers/yfinance/openbb_yfinance/models/income_statement.py5
-rw-r--r--openbb_platform/providers/yfinance/openbb_yfinance/models/options_chains.py159
-rw-r--r--openbb_platform/providers/yfinance/tests/record/http/test_yfinance_fetchers/test_y_finance_options_chains_fetcher.yaml3557
-rw-r--r--openbb_platform/providers/yfinance/tests/test_yfinance_fetchers.py12
-rw-r--r--website/content/sdk/data-available/alternative.md2
-rw-r--r--website/generate_excel_markdown.py2
57 files changed, 6813 insertions, 1744 deletions
diff --git a/.codespell.ignore b/.codespell.ignore
index c0b8680423f..5c79719a67d 100644
--- a/.codespell.ignore
+++ b/.codespell.ignore
@@ -44,3 +44,4 @@ wew
yeld
zar
zlot
+bootup \ No newline at end of file
diff --git a/.codespell.skip b/.codespell.skip
index c7beee59c67..f83dcca0908 100644
--- a/.codespell.skip
+++ b/.codespell.skip
@@ -14,3 +14,5 @@
./build/pyinstaller
./website/config.toml
./**/node_modules
+./frontend-components/**
+./website/content/terminal/reference/crypto/onchain/** \ No newline at end of file
diff --git a/.github/workflows/general-linting.yml b/.github/workflows/general-linting.yml
index 792886414d6..d6d51d4e1f4 100644
--- a/.github/workflows/general-linting.yml
+++ b/.github/workflows/general-linting.yml
@@ -45,8 +45,8 @@ jobs:
if: github.event_name == 'pull_request'
run: |
# "Checking PR diff"
- echo "platform_files=$(git diff --diff-filter=d --name-only origin/${{ github.base_ref }}...${{ github.head_ref }} | grep 'openbb_platform/.*\.py$' | grep -v 'openbb_platform/openbb/package' | grep -v 'integration' | grep -v 'tests' | xargs)" >> $GITHUB_ENV
- echo $platform_files
+ echo "diff_files=$(git diff --diff-filter=d --name-only origin/${{ github.base_ref }}...${{ github.head_ref }} | grep 'openbb_platform/.*\.py$|cli/.*\.py$' | grep -v 'openbb_platform/openbb/package' | grep -v 'integration' | grep -v 'tests' | xargs)" >> $GITHUB_ENV
+ echo $diff_files
- uses: actions/cache@v3
with:
@@ -58,16 +58,17 @@ jobs:
pip install openbb-devtools
pip install types-pytz types-requests types-termcolor types-tabulate types-PyYAML types-python-dateutil types-setuptools types-six
- run: bandit -x ./tests -r . || true
- - run: black --diff --check .
- run: codespell --ignore-words=.codespell.ignore --skip="$(tr '\n' ',' < .codespell.skip | sed 's/,$//')" --quiet-level=2
- - run: ruff .
- run: |
- # Run linters for openbb_platform
- if [ -n "${{ env.platform_files }}" ]; then
- pylint ${{ env.platform_files }}
- pydocstyle ${{ env.platform_files }}
+ # Run linters for openbb_platform | cli
+ if [ -n "${{ env.diff_files }}" ]; then
+ black --diff --check ${{ env.diff_files }}
+ mypy ${{ env.diff_files }} --ignore-missing-imports --scripts-are-modules --check-untyped-defs
+ pydocstyle ${{ env.diff_files }}
+ pylint ${{ env.diff_files }}
+ ruff check ${{ env.diff_files }}
else
- echo "No Python files changed in openbb_platform"
+ echo "No Python files changed in openbb_platform | cli"
fi
markdown-link-check:
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index af8134cbce1..0b0a2174e4d 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -14,7 +14,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/charliermarsh/ruff-pre-commit
- rev: "v0.4.4"
+ rev: "v0.4.5"
hooks:
- id: ruff
- repo: https://github.com/pycqa/pydocstyle
diff --git a/openbb_platform/core/openbb_core/app/logs/handlers/path_tracking_file_handler.py b/openbb_platform/core/openbb_core/app/logs/handlers/path_tracking_file_handler.py
index acf8a50d5cc..6b7ab2a55ba 100644
--- a/openbb_platform/core/openbb_core/app/logs/handlers/path_tracking_file_handler.py
+++ b/openbb_platform/core/openbb_core/app/logs/handlers/path_tracking_file_handler.py
@@ -5,7 +5,7 @@ from copy import deepcopy
from logging.handlers import TimedRotatingFileHandler
from pathlib import Path
-# IMPORTATION THIRDPARTY
+# IMPORTATION THIRD PARTY
# IMPORTATION INTERNAL
from openbb_core.app.logs.models.logging_settings import LoggingSettings
from openbb_core.app.logs.utils.expired_files import (
diff --git a/openbb_platform/core/openbb_core/app/model/api_settings.py b/openbb_platform/core/openbb_core/app/model/api_settings.py
index f75b690ae6f..59ac1569902 100644
--- a/openbb_platform/core/openbb_core/app/model/api_settings.py
+++ b/openbb_platform/core/openbb_core/app/model/api_settings.py
@@ -20,7 +20,7 @@ class Servers(BaseModel):
model_config = ConfigDict(frozen=True)
- url: str = "http://localhost:8000"
+ url: str = ""
description: str = "Local OpenBB development server"
@@ -36,7 +36,7 @@ class APISettings(BaseModel):
contact_name: str = "OpenBB Team"
contact_url: str = "https://openbb.co"
contact_email: str = "hello@openbb.co"
- license_name: str = "MIT"
+ license_name: str = "AGPLv3"
license_url: str = (
"https://github.com/OpenBB-finance/OpenBBTerminal/blob/develop/LICENSE"
)
diff --git a/openbb_platform/core/openbb_core/app/static/package_builder.py b/openbb_platform/core/openbb_core/app/static/package_builder.py
index 82c6c234d8b..00fea7f5867 100644
--- a/openbb_platform/core/openbb_core/app/static/package_builder.py
+++ b/openbb_platform/core/openbb_core/app/static/package_builder.py
@@ -1684,6 +1684,8 @@ class ReferenceGenerator:
reference: Dict[str, Dict] = {}
for path, route in route_map.items():
+ # Initialize the provider parameter fields as an empty dictionary
+ provider_parameter_fields = {"type": ""}
# Initialize the reference fields as empty dictionaries
reference[path] = {field: {} for field in cls.REFERENCE_FIELDS}
# Route method is used to distinguish between GET and POST methods
diff --git a/openbb_platform/core/openbb_core/provider/standard_models/balance_sheet_growth.py b/openbb_platform/core/openbb_core/provider/standard_models/balance_sheet_growth.py
index e2aff45cb5d..429a623407c 100644
--- a/openbb_platform/core/openbb_core/provider/standard_models/balance_sheet_growth.py
+++ b/openbb_platform/core/openbb_core/provider/standard_models/balance_sheet_growth.py
@@ -1,23 +1,26 @@
"""Balance Sheet Statement Growth Standard Model."""
from datetime import date as dateType
-from typing import List, Optional, Set, Union
+from typing import Optional
from pydantic import Field, field_validator
from openbb_core.provider.abstract.data import Data
from openbb_core.provider.abstract.query_params import QueryParams
-from openbb_core.provider.utils.descriptions import (
- DATA_DESCRIPTIONS,
- QUERY_DESCRIPTIONS,
-)
+from openbb_core.provider.utils.descriptions import QUERY_DESCRIPTIONS
class BalanceSheetGrowthQueryParams(QueryParams):
"""Balance Sheet Statement Growth Query."""
symbol: str = Field(description=QUERY_DESCRIPTIONS.get("symbol", ""))
- limit: int = Field(default=10, description=QUERY_DESCRIPTIONS.get("limit", ""))
+ period: str = Field(
+ default="annual",
+ description=QUERY_DESCRIPTIONS.get("period", ""),
+ )
+ limit: Optional[int] = Field(
+ default=10, description=QUERY_DESCRIPTIONS.get("limit", "")
+ )
@field_validator("symbol", mode="before", check_fields=False)
@classmethod
@@ -25,113 +28,20 @@ class BalanceSheetGrowthQueryParams(QueryParams):
"""Convert field to uppercase."""
return v.upper()
+ @field_validator("period", mode="before", check_fields=False)
+ @classmethod
+ def to_lower(cls, v: Optional[str]) -> Optional[str]:
+ """Convert field to lowercase."""
+ return v.lower() if v else v
+
class BalanceSheetGrowthData(Data):
"""Balance Sheet Statement Growth Data."""
- symbol: Optional[str] = Field(
- default=None, description=DATA_DESCRIPTIONS.get("symbol", "")
- )
- date: dateType = Field(description=DATA_DESCRIPTIONS.get("date", ""))
- period: str = Field(description="Reporting period.")
- growth_cash_and_cash_equivalents: float = Field(
- description="Growth rate of cash and cash equivalents."
- )
- growth_short_term_investments: float = Field(
- description="Growth rate of short-term investments."
- )
- growth_cash_and_short_term_investments: float = Field(
- description="Growth rate of cash and short-term investments."
- )
- growth_net_receivables: float = Field(description="Growth rate of net receivables.")
- growth_inventory: float = Field(description="Growth rate of inventory.")
- growth_other_current_assets: float = Field(
- description="Growth rate of other current assets."
- )
- growth_total_current_assets: float = Field(
- description="Growth rate of total current assets."
- )
- growth_property_plant_equipment_net: float = Field(
- description="Growth rate of net property, plant, and equipment."
- )
- growth_goodwill: float = Field(description="Growth rate of goodwill.")
- growth_intangible_assets: float = Field(
- description="Growth rate of intangible assets."
- )
- growth_goodwill_and_intangible_assets: float = Field(
- description="Growth rate of goodwill and intangible assets."
- )
- growth_long_term_investments: float = Field(
- description="Growth rate of long-term investments."
- )
- growth_tax_assets: float = Field(description="Growth rate of tax assets.")
- growth_other_non_current_assets: float = Field(
- description="Growth rate of other non-current assets."
- )
- growth_total_non_current_assets: float = Field(
- description="Growth rate of total non-current assets."
- )
- growth_other_assets: float = Field(description="Growth rate of other assets.")
- growth_total_assets: float = Field(description="Growth rate of total assets.")
- growth_account_payables: float = Field(
- description="Growth rate of accounts payable."
- )
- growth_short_term_debt: float = Field(description="Growth rate of short-term debt.")
- growth_tax_payables: float = Field(description="Growth rate of tax payables.")
- growth_deferred_revenue: float = Field(
- description="Growth rate of deferred revenue."
+ period_ending: dateType = Field(description="The end date of the reporting period.")
+ fiscal_period: Optional[str] = Field(
+ description="The fiscal period of the report.", default=None
)
- growth_other_current_liabilities: float = Field(
- description="Growth rate of other current liabilities."
+ fiscal_year: Optional[int] = Field(
+ description="The fiscal year of the fiscal period.", default=None
)
- growth_total_