-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
3 changed files
with
30 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)) |