summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/general-linting.yml2
-rw-r--r--openbb_platform/core/tests/api/test_rest_api.py14
-rw-r--r--openbb_platform/extensions/derivatives/pyproject.toml2
-rw-r--r--openbb_platform/openbb/assets/reference.json10
-rw-r--r--openbb_platform/openbb/package/__extensions__.py4
-rw-r--r--openbb_platform/openbb/package/derivatives_options.py2
-rw-r--r--openbb_platform/providers/intrinio/openbb_intrinio/models/forward_eps_estimates.py4
-rw-r--r--openbb_platform/providers/intrinio/openbb_intrinio/models/forward_sales_estimates.py4
-rw-r--r--openbb_platform/providers/intrinio/openbb_intrinio/models/options_chains.py6
-rw-r--r--openbb_platform/providers/intrinio/pyproject.toml2
10 files changed, 32 insertions, 18 deletions
diff --git a/.github/workflows/general-linting.yml b/.github/workflows/general-linting.yml
index d6d51d4e1f4..82821ca6425 100644
--- a/.github/workflows/general-linting.yml
+++ b/.github/workflows/general-linting.yml
@@ -45,7 +45,7 @@ jobs:
if: github.event_name == 'pull_request'
run: |
# "Checking PR diff"
- 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=$(git diff --diff-filter=d --name-only origin/${{ github.base_ref }}...${{ github.head_ref }} | grep -E '^(openbb_platform|cli)/.*\.py$' | grep -v 'openbb_platform/openbb/package' | grep -v 'integration' | grep -v 'tests' | xargs)" >> $GITHUB_ENV
echo $diff_files
- uses: actions/cache@v3
diff --git a/openbb_platform/core/tests/api/test_rest_api.py b/openbb_platform/core/tests/api/test_rest_api.py
new file mode 100644
index 00000000000..af5b80ab6ab
--- /dev/null
+++ b/openbb_platform/core/tests/api/test_rest_api.py
@@ -0,0 +1,14 @@
+"""Test rest_api.py."""
+
+import pytest
+
+
+@pytest.mark.skip(
+ "This test forces a side effect that makes test_integration_tests_ to fail in the GitHub actions.",
+)
+def test_openapi():
+ """Test openapi schema generation."""
+ # pylint: disable=import-outside-toplevel
+ from openbb_core.api.rest_api import app
+
+ assert app.openapi()
diff --git a/openbb_platform/extensions/derivatives/pyproject.toml b/openbb_platform/extensions/derivatives/pyproject.toml
index c5fb85186b2..c83acbe4e1e 100644
--- a/openbb_platform/extensions/derivatives/pyproject.toml
+++ b/openbb_platform/extensions/derivatives/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "openbb-derivatives"
-version = "1.2.3"
+version = "1.2.4"
description = "Derivatives extension for OpenBB"
authors = ["OpenBB Team <hello@openbb.co>"]
license = "AGPL-3.0-only"
diff --git a/openbb_platform/openbb/assets/reference.json b/openbb_platform/openbb/assets/reference.json
index c1b63983a7a..c3220d6d0e1 100644
--- a/openbb_platform/openbb/assets/reference.json
+++ b/openbb_platform/openbb/assets/reference.json
@@ -1,5 +1,5 @@
{
- "openbb": "4.2.2",
+ "openbb": "4.2.3",
"info": {
"title": "OpenBB Platform (Python)",
"description": "Investment research for everyone, anywhere.",
@@ -9,7 +9,7 @@
"commodity@1.1.3",
"crypto@1.2.3",
"currency@1.2.3",
- "derivatives@1.2.3",
+ "derivatives@1.2.4",
"economy@1.2.3",
"equity@1.2.3",
"etf@1.2.3",
@@ -24,7 +24,7 @@
"federal_reserve@1.2.3",
"fmp@1.2.3",
"fred@1.2.3",
- "intrinio@1.2.3",
+ "intrinio@1.2.4",
"oecd@1.2.3",
"polygon@1.2.3",
"sec@1.2.3",
@@ -1216,7 +1216,7 @@
},
{
"name": "option_type",
- "type": "Literal[None, Union[ForwardRef('call'), ForwardRef('put')]]",
+ "type": "Literal['call', 'put']",
"description": "The option type, call or put, 'None' is both (default).",
"default": null,
"optional": true,
@@ -36806,4 +36806,4 @@
"description": "Financial market regulators data."
}
}
-} \ No newline at end of file
+}
diff --git a/openbb_platform/openbb/package/__extensions__.py b/openbb_platform/openbb/package/__extensions__.py
index c4501dad7db..c01bc54a306 100644
--- a/openbb_platform/openbb/package/__extensions__.py
+++ b/openbb_platform/openbb/package/__extensions__.py
@@ -23,7 +23,7 @@ Extensions:
- commodity@1.1.3
- crypto@1.2.3
- currency@1.2.3
- - derivatives@1.2.3
+ - derivatives@1.2.4
- economy@1.2.3
- equity@1.2.3
- etf@1.2.3
@@ -37,7 +37,7 @@ Extensions:
- federal_reserve@1.2.3
- fmp@1.2.3
- fred@1.2.3
- - intrinio@1.2.3
+ - intrinio@1.2.4
- oecd@1.2.3
- polygon@1.2.3
- sec@1.2.3
diff --git a/openbb_platform/openbb/package/derivatives_options.py b/openbb_platform/openbb/package/derivatives_options.py
index 31fac5248b6..269a05c86a7 100644
--- a/openbb_platform/openbb/package/derivatives_options.py
+++ b/openbb_platform/openbb/package/derivatives_options.py
@@ -43,7 +43,7 @@ class ROUTER_derivatives_options(Container):
The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio, yfinance.
date : Optional[datetime.date]
The end-of-day date for options chains data. (provider: intrinio)
- option_type : Literal[None, Union[ForwardRef('call'), ForwardRef('put')]]
+ option_type : Optional[Literal['call', 'put']]
The option type, call or put, 'None' is both (default). (provider: intrinio)
moneyness : Literal['otm', 'itm', 'all']
Return only contracts that are in or out of the money, default is 'all'. Parameter is ignored when a date is supplied. (provider: intrinio)
diff --git a/openbb_platform/providers/intrinio/openbb_intrinio/models/forward_eps_estimates.py b/openbb_platform/providers/intrinio/openbb_intrinio/models/forward_eps_estimates.py
index aebfcbd9c1f..c466d04711b 100644
--- a/openbb_platform/providers/intrinio/openbb_intrinio/models/forward_eps_estimates.py
+++ b/openbb_platform/providers/intrinio/openbb_intrinio/models/forward_eps_estimates.py
@@ -35,7 +35,7 @@ class IntrinioForwardEpsEstimatesQueryParams(ForwardEpsEstimatesQueryParams):
description="The future fiscal year to retrieve estimates for."
+ " When no symbol and year is supplied the current calendar year is used.",
)
- fiscal_period: Union[Literal["fy", "q1", "q2", "q3", "q4"], None] = Field(
+ fiscal_period: Optional[Literal["fy", "q1", "q2", "q3", "q4"]] = Field(
default=None,
description="The future fiscal period to retrieve estimates for.",
)
@@ -44,7 +44,7 @@ class IntrinioForwardEpsEstimatesQueryParams(ForwardEpsEstimatesQueryParams):
description="The future calendar year to retrieve estimates for."
+ " When no symbol and year is supplied the current calendar year is used.",
)
- calendar_period: Union[Literal["q1", "q2", "q3", "q4"], None] = Field(
+ calendar_period: Optional[Literal["q1", "q2", "q3", "q4"]] = Field(
default=None,
description="The future calendar period to retrieve estimates for.",
)
diff --git a/openbb_platform/providers/intrinio/openbb_intrinio/models/forward_sales_estimates.py b/openbb_platform/providers/intrinio/openbb_intrinio/models/forward_sales_estimates.py
index d68223a42b6..54cac4dacc3 100644
--- a/openbb_platform/providers/intrinio/openbb_intrinio/models/forward_sales_estimates.py
+++ b/openbb_platform/providers/intrinio/openbb_intrinio/models/forward_sales_estimates.py
@@ -35,7 +35,7 @@ class IntrinioForwardSalesEstimatesQueryParams(ForwardSalesEstimatesQueryParams)
description="The future fiscal year to retrieve estimates for."
+ " When no symbol and year is supplied the current calendar year is used.",
)
- fiscal_period: Union[Literal["fy", "q1", "q2", "q3", "q4"], None] = Field(
+ fiscal_period: Optional[Literal["fy", "q1", "q2", "q3", "q4"]] = Field(
default=None,
description="The future fiscal period to retrieve estimates for.",
)
@@ -44,7 +44,7 @@ class IntrinioForwardSalesEstimatesQueryParams(ForwardSalesEstimatesQueryParams)
description="The future calendar year to retrieve estimates for."
+ " When no symbol and year is supplied the current calendar year is used.",
)
- calendar_period: Union[Literal["q1", "q2", "q3", "q4"], None] = Field(
+ calendar_period: Optional[Literal["q1", "q2", "q3", "q4"]] = Field(
default=None,
description="The future calendar period to retrieve estimates for.",
)
diff --git a/openbb_platform/providers/intrinio/openbb_intrinio/models/options_chains.py b/openbb_platform/providers/intrinio/openbb_intrinio/models/options_chains.py
index e36828e8aee..9632bff8281 100644
--- a/openbb_platform/providers/intrinio/openbb_intrinio/models/options_chains.py
+++ b/openbb_platform/providers/intrinio/openbb_intrinio/models/options_chains.py
@@ -6,7 +6,7 @@ from datetime import (
datetime,
timedelta,
)
-from typing import Any, Dict, List, Literal, Optional, Union
+from typing import Any, Dict, List, Literal, Optional
from warnings import warn
from dateutil import parser
@@ -47,7 +47,7 @@ class IntrinioOptionsChainsQueryParams(OptionsChainsQueryParams):
date: Optional[dateType] = Field(
default=None, description="The end-of-day date for options chains data."
)
- option_type: Literal[None, Union["call", "put"]] = Field(
+ option_type: Optional[Literal["call", "put"]] = Field(
default=None,
description="The option type, call or put, 'None' is both (default).",
json_schema_extra={"choices": ["call", "put"]},
@@ -233,7 +233,7 @@ class IntrinioOptionsChainsFetcher(
# If the EOD chains are not available for the given date, try the previous day
if not results and query.date is not None:
date = get_weekday(date - timedelta(days=1)).strftime("%Y-%m-%d")
- urls = await get_urls(date)
+ urls = await get_urls(date.strftime("%Y-%m-%d"))
results = await amake_requests(urls, response_callback=callback, **kwargs)
if not results:
diff --git a/openbb_platform/providers/intrinio/pyproject.toml b/openbb_platform/providers/intrinio/pyproject.toml
index b2531ba4550..ab15cfd6d2c 100644
--- a/openbb_platform/providers/intrinio/pyproject.toml
+++ b/openbb_platform/providers/intrinio/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "openbb-intrinio"
-version = "1.2.3"
+version = "1.2.4"
description = "Intrinio extension for OpenBB"
authors = ["OpenBB Team <hello@openbb.co>"]
license = "AGPL-3.0-only"