Merge provider and core into core (#5774)

* small changes - moving provider inside the core

* uptade readme

* lint

* remove old provider readme

* leftovers

* refactor website examples

* ruff

* fix nox

* relock

* fix fails_to_deliver headers

* fix for tests that have renamed endpoints

* fix discovery

* removed test for renamed endpoint

* fix broken syntax - test_search_financial_attributes

* fix cash/income/balance

* fix derivatives tests

* fix etf tests

* fix news tests

* fix regulators

* black

* wrong test param

* sort equity gainers/losers by percent

* platform markdown generation import

* Hotfix/fix int tests core merge (#5779)

* removing tests on old endpoint

* removing visualization on old endpoint

* fixing equity tests

* fixing examples

* fix news tests

* fix index test

* example

* add comments

* example

---------

Co-authored-by: Diogo Sousa <montezdesousa@gmail.com>

---------

Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
Co-authored-by: Diogo Sousa <montezdesousa@gmail.com>
Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>
This commit is contained in:
Henrique Joaquim
2023-11-22 13:48:01 +00:00
committed by GitHub
parent 9da18eefe3
commit 4400cd9a8f
674 changed files with 2498 additions and 2527 deletions

View File

@@ -10,11 +10,10 @@ Publishing checklist:
Consider using the `--dry-run` flag to check if everything is correct before publishing.
Also, it might be a good idea to run the script in batches to ensure that the packages are published correctly and the dependencies pick the correct versions.
Example, the `openbb-core` needs to pick the latest `openbb-provider` version and extension packages need to pick the latest `openbb-core` version.
Example, the extension packages need to pick the latest `openbb-core` version.
Suggested batch order:
1. Batch 1. Core
1. `openbb-provider`
2. `openbb-core`
1. `openbb-core`
2. Batch 2. Extensions
1. `openbb-charting`
2. `openbb-crypto`

View File

@@ -49,7 +49,6 @@ def build():
# need to pop these from the dependencies
DEPENDENCIES.pop("openbb-core", None)
DEPENDENCIES.pop("openbb-provider", None)
# add the sub packages
for package_name, path in SUB_PACKAGES.items():

View File

@@ -10,7 +10,6 @@ CORE_PACKAGES = ["platform/provider", "platform/core"]
EXTENSION_PACKAGES = ["extensions", "providers"]
CMD = [sys.executable, "-m", "poetry"]
CORE_DEPENDENCIES_UPDATE_CMD = ["add", "openbb-provider=latest"]
EXTENSION_DEPENDENCIES_UPDATE_CMD = ["add", "openbb-core=latest"]
VERSION_BUMP_CMD = ["version", "prerelease"]
PUBLISH_CMD = ["publish", "--build"]
@@ -40,15 +39,6 @@ def parse_args():
return parser.parse_args()
def update_core_dependencies(path: Path):
"""Update the core dependencies"""
subprocess.run(
CMD + CORE_DEPENDENCIES_UPDATE_CMD, # noqa: S603
cwd=path.parent,
check=True,
)
def update_extension_dependencies(path: Path):
"""Update the extension dependencies"""
subprocess.run(
@@ -74,17 +64,11 @@ def publish(dry_run: bool = False, core: bool = False, extensions: bool = False)
package_paths.extend(EXTENSION_PACKAGES)
for sub_path in package_paths:
is_core = sub_path in CORE_PACKAGES
is_extension = sub_path in EXTENSION_PACKAGES
for path in PLATFORM_PATH.rglob(f"{sub_path}/**/pyproject.toml"):
try:
# Update dependencies
if is_core:
# if it's the provider package no need to update the dependencies
if "provider" in str(path.parent):
continue
update_core_dependencies(path)
if is_extension:
update_extension_dependencies(path)
# Bump version