From a9b4d2070faab977e9784a457afc195fc1a513e2 Mon Sep 17 00:00:00 2001 From: Henrique Joaquim Date: Mon, 22 Jan 2024 15:02:32 +0000 Subject: [PATCH] Release OpenBB Platform v`4.1.3` (#5983) * fixing pyproject.toml * adding pandas-ta to technical package for publishing * bumping technical * test for pyproject toml --- .../extensions/technical/pyproject.toml | 5 ++-- openbb_platform/pyproject.toml | 6 ++--- openbb_platform/tests/test_pyproject_toml.py | 24 +++++++++++++++++++ 3 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 openbb_platform/tests/test_pyproject_toml.py diff --git a/openbb_platform/extensions/technical/pyproject.toml b/openbb_platform/extensions/technical/pyproject.toml index ba9b0f820ce0..ac7fbdb4cec2 100644 --- a/openbb_platform/extensions/technical/pyproject.toml +++ b/openbb_platform/extensions/technical/pyproject.toml @@ -1,16 +1,17 @@ [tool.poetry] name = "openbb-technical" -version = "1.1.1" +version = "1.1.2" description = "Technical Analysis extension for OpenBB" authors = ["OpenBB Team "] readme = "README.md" packages = [{ include = "openbb_technical" }] [tool.poetry.dependencies] -python = ">=3.8,<3.12" # scipy forces python <4.0 explicitly +python = ">=3.8,<3.12" # scipy forces python <4.0 explicitly scipy = "^1.10.1" statsmodels = "^0.14.0" scikit-learn = "^1.3.1" +pandas-ta = "^0.3.14b" openbb-core = "^1.1.1" [build-system] diff --git a/openbb_platform/pyproject.toml b/openbb_platform/pyproject.toml index 324cebc95d05..70799cffa73d 100644 --- a/openbb_platform/pyproject.toml +++ b/openbb_platform/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "openbb" -version = "4.1.2" +version = "4.1.3" description = "OpenBB" authors = ["OpenBB Team "] readme = "README.md" @@ -48,7 +48,7 @@ openbb-wsj = { version = "^1.1.1", optional = true } openbb-charting = { version = "^1.1.1", optional = true } openbb-econometrics = { version = "^1.1.1", optional = true } openbb-quantitative = { version = "^1.1.1", optional = true } -openbb-technical = { version = "^1.1.1", optional = true } +openbb-technical = { version = "^1.1.2", optional = true } [tool.poetry.extras] alpha_vantage = ["openbb-alpha-vantage"] @@ -81,7 +81,7 @@ all = [ "openbb-seeking-alpha", "openbb-stockgrid", "openbb-technical", - "openbb-wsj" + "openbb-wsj", ] [build-system] diff --git a/openbb_platform/tests/test_pyproject_toml.py b/openbb_platform/tests/test_pyproject_toml.py new file mode 100644 index 000000000000..f250dfb2aa02 --- /dev/null +++ b/openbb_platform/tests/test_pyproject_toml.py @@ -0,0 +1,24 @@ +import toml + + +def test_optional_packages(): + data = toml.load("openbb_platform/pyproject.toml") + dependencies = data["tool"]["poetry"]["dependencies"] + extras = data["tool"]["poetry"]["extras"] + all_packages = extras["all"] + + default_packages = [] + optional_packages = [] + + for package, details in dependencies.items(): + if isinstance(details, dict) and details.get("optional") is True: + optional_packages.append(package) + else: + default_packages.append(package) + + # check that optional packages have the same content as all_packages and extras + assert sorted(optional_packages) == sorted(all_packages) + assert sorted(optional_packages) == sorted(extras["all"]) + + # assert that there is no overlap between default and optional packages + assert set(default_packages).isdisjoint(set(optional_packages))