diff options
48 files changed, 836 insertions, 829 deletions
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000000..78807d629a5 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,13 @@ +{ + "name": "OpenBB Platform Dev Container", + "image": "mcr.microsoft.com/devcontainers/python:1-3.10-bookworm", + "postCreateCommand": "python3 -m venv obb && . obb/bin/activate && pip install poetry && python3 openbb_platform/dev_install.py --extras --cli", + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "ms-python.vscode-pylance" + ] + } + } +}
\ No newline at end of file diff --git a/README.md b/README.md index 58f7eb3773f..bba11f8a168 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,3 @@ -## Announcement - -OpenBB Terminal v3.2.5 will be the last release made available. - -As we transition our focus to the OpenBB Platform, this repository will soon be rebranded as OpenBB-finance/OpenBBPlatform. - -However, we are committed to continuing our mission to democratize investment research by helping users and contributors with financial data integration and standardization. - -To achieve that, we are working on a new CLI tool built on top of the OpenBB Platform that will soon be available to everyone for free. - -[![GitHub release](https://img.shields.io/github/release/OpenBB-finance/OpenBBTerminal.svg?maxAge=3600)](https://github.com/OpenBB-finance/OpenBBTerminal/releases) - ---- - <br /> <img src="https://github.com/OpenBB-finance/OpenBBTerminal/blob/develop/images/platform-light.svg?raw=true#gh-light-mode-only" alt="OpenBB Terminal logo" width="600"> <img src="https://github.com/OpenBB-finance/OpenBBTerminal/blob/develop/images/platform-dark.svg?raw=true#gh-dark-mode-only" alt="OpenBB Terminal logo" width="600"> diff --git a/cli/README.md b/cli/README.md index 2ab4656c0fa..8a83b426807 100644 --- a/cli/README.md +++ b/cli/README.md @@ -10,7 +10,7 @@ ## Overview -The OpenBB CLI is a command line interface that wraps [OpenBB Platform](https://docs.openbb.co/platform). +The OpenBB Platform CLI is a command line interface that wraps [OpenBB Platform](https://docs.openbb.co/platform). It offers a convenient way to interact with the OpenBB Platform and its extensions, as well as automate data collection via OpenBB Routine Scripts. @@ -26,7 +26,7 @@ pip install openbb-cli > Note: Find the most complete installation hints and tips [here](https://my.openbb.co/app/cli/installation). -After the installation is complete, you can deploy the OpenBB CLI by running the following command: +After the installation is complete, you can deploy the OpenBB Platform CLI by running the following command: ```bash openbb diff --git a/cli/openbb_cli/cli.py b/cli/openbb_cli/cli.py index 0d9e3e3d0fd..1937a05d37b 100644 --- a/cli/openbb_cli/cli.py +++ b/cli/openbb_cli/cli.py @@ -4,7 +4,7 @@ import sys def main(): - """Use the main entry point for the OpenBB CLI.""" + """Use the main entry point for the OpenBB Platform CLI.""" print("Loading...\n") # noqa: T201 # pylint: disable=import-outside-toplevel diff --git a/cli/tests/test_controllers_script_parser.py b/cli/tests/test_controllers_script_parser.py index 4363b0d79fe..488eab6b288 100644 --- a/cli/tests/test_controllers_script_parser.py +++ b/cli/tests/test_controllers_script_parser.py @@ -27,22 +27,18 @@ def test_is_reset(command, expected): assert is_reset(command) == expected -@pytest.mark.parametrize( - "keyword, expected_date", - [ - ( - "$LASTFRIDAY", - ( - datetime.now() - - timedelta(days=((datetime.now().weekday() - 4) % 7 + 7) % 7) - ).strftime("%Y-%m-%d"), - ), - ], -) -def test_match_and_return_openbb_keyword_date(keyword, expected_date): +def test_match_and_return_openbb_keyword_date(): """Test the match_and_return_openbb_keyword_date function.""" + keyword = "$LASTFRIDAY" result = match_and_return_openbb_keyword_date(keyword) - assert result == expected_date + expected = "" + if keyword == "$LASTFRIDAY": + today = datetime.now() + expected = today - timedelta(days=(today.weekday() + 3) % 7) + if expected >= today: + expected -= timedelta(days=7) + expected = expected.strftime("%Y-%m-%d") + assert result == expected def test_parse_openbb_script_basic(): @@ -100,7 +96,7 @@ def test_date_keyword_last_friday(): """Test the match_and_return_openbb_keyword_date function.""" today = datetime.now() last_friday = today - timedelta(days=(today.weekday() - 4 + 7) % 7) - if last_friday > today: + if last_friday >= today: last_friday -= timedelta(days=7) expected_date = last_friday.strftime("%Y-%m-%d") assert match_and_return_openbb_keyword_date("$LASTFRIDAY") == expected_date diff --git a/openbb_platform/openbb/assets/reference.json b/openbb_platform/openbb/assets/reference.json index 02313f2bfeb..95b70ffae4b 100644 --- a/openbb_platform/openbb/assets/reference.json +++ b/openbb_platform/openbb/assets/reference.json @@ -15754,15 +15754,15 @@ ], "fmp": [ { - "name": "date", + "name": "period_ending", "type": "date", - "description": "The date of the data.", + "description": "Period ending date.", "default": "", "optional": false, "choices": null }, { - "name": "period", + "name": "fiscal_period", "type": "str", "description": "Period of the data.", "default": "", @@ -15772,7 +15772,7 @@ { "name": "calendar_year", "type": "int", - "description": "Calendar year.", + "description": "Calendar year for the fiscal period.", "default": null, "optional": true, "choices": null @@ -15786,6 +15786,14 @@ "choices": null }, { + "name": "capex_per_share", + "type": "float", + "description": "Capital expenditures per share", + "default": null, + "optional": true, + "choices": null + }, + { "name": "net_income_per_share", "type": "float", "description": "Net income per share", @@ -15850,15 +15858,7 @@ "choices": null }, { - "name": "enterprise_value", - "type": "float", - "description": "Enterprise value", - "default": null, - "optional": true, - "choices": null - }, - { - "name": "price_to_sales_ratio", + "name": "price_to_sales", "type": "float", "description": "Price-to-sales ratio", "default": null, @@ -15866,7 +15866,7 @@ "choices": null }, { - "name": "pocf_ratio", + "name": "price_to_operating_cash_flow", "type": "float", "description": "Price-to-operating cash flow ratio", "default": null, @@ -15874,7 +15874,7 @@ "choices": null }, { - "name": "pfcf_ratio", + "name": "price_to_free_cash_flow", "type": "float", "description": "Price-to-free cash flow ratio", "default": null, @@ -15882,7 +15882,7 @@ "choices": null }, { - "name": "pb_ratio", + "name": "price_to_book", "type": "float", "description": "Price-to-book ratio", "default": null, @@ -15890,7 +15890,7 @@ "choices": null }, { - "name": "ptb_ratio", + "name": "price_to_tangible_book", "type": "float", "description": "Price-to-tangible book ratio", "default": null, @@ -15906,7 +15906,7 @@ "choices": null }, { - "name": "enterprise_value_over_ebitda", + "name": "ev_to_ebitda", "type": "float", "description": "Enterprise value-to-EBITDA ratio", "default": null, @@ -15946,6 +15946,14 @@ "choices": null }, { + "name": "debt_to_market_cap", + "type": "float", + "description": "Debt-to-market capitalization ratio", + "default": null, + "optional": true, + "choices": null + }, + { "name": "debt_to_equity", "type": "float", "description": "Debt-to-equity ratio", @@ -15994,14 +16002,6 @@ "choices": null }, { - "name": "dividend_yield", - "type": "float", - "description": "Dividend yield, as a normalized percent.", - "default": null, - "optional": true, - "choices": null - }, - { "name": "payout_ratio", "type": "float", "description": "Payout ratio", @@ -16066,38 +16066,6 @@ "choices": null }, { - "name": "graham_number", - "type": "float", - "description": "Graham number", - "default": null, - "optional": true, - "choices": null - }, - { - "name": "roic", - "type": "float", - "description": "Return on invested capital", - "default": null, - "optional": true, - "choices": null - }, - { - "name": "return_on_tangible_assets", - "type": "float", - "description": "Return on tangible assets", - "default": null, - "optional": true, - "choices": null - }, - { - "name": "graham_net_net", - "type": "float", - "description": "Graham net-net working capital", - "default": null, - "optional": true, - "choices": null - }, - { "name": "working_capital", "type": "float", "description": "Working capital", @@ -16122,6 +16090,14 @@ "choices": null }, { + "name": "enterprise_value", + "type": "float", + "description": "Enterprise value", + "default": null, + "optional": true, + "choices": null + }, + { "name": "invested_capital", "type": "float", "description": "Invested capital", @@ -16202,7 +16178,7 @@ "choices": null }, { - "name": "roe", + "name": "return_on_equity", "type": "float", "description": "Return on equity", "default": null, @@ -16210,9 +16186,41 @@ "choices": null }, { - "name": "capex_per_share", + "name": "return_on_invested_capital", "type": "float", - "description": "Capital expenditures per share", + "description": "Return on invested capital", + "default": null, + "optional": true, + "choices": null + }, + { + "name": "return_on_tangible_assets", + "type": "float", + "description": "Return on tangible assets", + "default": null, + "optional": true, + "choices": null + }, + { + "name": "dividend_yield", + "type": "float", + "description": "Dividend yield, as a normalized percent.", + "default": null, + "optional": true, + "choices": null + }, + { + "name": "graham_number", + "type": "float", + "description": "Graham number", + "default": null, + "optional": true, + "choices": null + }, + { + "name": "graham_net_net", + "type": "float", + "description": "Graham net-net working capital", "default": null, "optional": true, "choices": null @@ -30667,7 +30675,7 @@ { "name": "business_relevance_greater_than", "type": "float", - "description": "News stories will have a business relevance score more than this value. Unsupported for yahoo source.", + "description": "News stories will have a business relevance score more than this value. Unsupported for yahoo source. Value is a decimal between 0 and 1.", "default": null, "optional": true, "choices": null @@ -30675,7 +30683,7 @@ { "name": "business_relevance_less_than", "type": "float", - "description": "News stories will have a business relevance score less than this value. Unsupported for yahoo source.", + "description": "News stories will have a business relevance score less than this value. Unsupported for yahoo source. Value is a decimal between 0 and 1.", "default": null, "optional": true, "choices": null @@ -31208,7 +31216,7 @@ { "name": "business_relevance_greater_than", "type": "float", - "description": "News stories will have a business relevance score more than this value. Unsupported for yahoo source.", + "description": "News stories will have a business relevance score more than this value. Unsupported for yahoo source. Value is a decimal between 0 and 1.", "default": null, "optional": true, "choices": null @@ -31216,7 +31224,7 @@ { "name": "business_relevance_less_than", "type": "float", - "description": "News stories will have a business relevance score less than this value. Unsupported for yahoo source.", + "description": "News stories will have a business relevance score less than this value. Unsupported for yahoo source. Value is a decimal between 0 and 1.", "default": null, "optional": true, "choices": null diff --git a/openbb_platform/openbb/package/equity_fundamental.py b/openbb_platform/openbb/package/equity_fundamental.py index cc734d0f02a..90077853ac8 100644 --- a/openbb_platform/openbb/package/equity_fundamental.py +++ b/openbb_platform/openbb/package/equity_fundamental.py @@ -2420,14 +2420,16 @@ class ROUTER_equity_fundamental(Container): Market capitalization pe_ratio : Optional[float] Price-to-earnings ratio (P/E ratio) - date : Optional[date] - The date of the data. (provider: fmp) - period : Optional[str] + period_ending : Optional[date] + Period ending date. (provider: fmp) + fiscal_period : Optional[str] Period of the data. (provider: fmp) calendar_year : Optional[int] - Calendar year. (provider: fmp) + Calendar year for the fiscal period. (provider: fmp) revenue_per_share : Optional[float] Revenue per share (provider: fmp, yfinance) + capex_per_sha |