Skip to content

Commit

Permalink
Release/4.2.3 (#6514)
Browse files Browse the repository at this point in the history
* ref to docs.openbb.co

* lint

* better exception handling

* fix examples

* revert changes in package dir

* revert changes in reference.json

* minor adjustment to the publish.md

* changelog

* core

* extensions

* better spacing

* static assets

* latest versions

* publish

* skip deprecated dirs

* bump cli
  • Loading branch information
hjoaquim authored Jun 19, 2024
1 parent f4a865e commit 3e2d8b5
Show file tree
Hide file tree
Showing 96 changed files with 635 additions and 612 deletions.
4 changes: 4 additions & 0 deletions assets/scripts/generate_extension_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ def get_packages(path: Path, plugin_key: str) -> Dict[str, Any]:
packages: Dict[str, Any] = {}
for f in folders:
pyproject = PyProjectTOML(Path(f, "pyproject.toml"))

if not pyproject.data:
continue

poetry = pyproject.data["tool"]["poetry"]
name = poetry["name"]
plugin = poetry.get("plugins", {}).get(plugin_key)
Expand Down
34 changes: 32 additions & 2 deletions build/pypi/openbb_platform/PUBLISH.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
> A `release` branch for a particular package should only cater to the changes for that package directory. For e.g. the `release/openbb-core-2.0.0` branch should only contain changes for the `openbb-core` package i.e. in the `openbb_platform/core` directory.
### Flow to display only files changes during release cycle in the `release/...` -> `main` PR

1. Merge main into develop before release branch exists, solve any conflict
2. In the branch `release/…` (before or after publishing)
3. `git merge main -X ours` (ignore the changes, we brought them in 1.)
4. `git commit -m "Merge branch 'main' into release/4.2.2"` (empty commit)

### Pre-release checklist

1. Open a PR with the changes to be published in the format `release/<version>` (for e.g. `release/4.0.0` ). For a particular package use the format `release/<package>-<version>` (for e.g. `release/openbb-core-1.0.1`).
2. Ensure all the CI workflows pass.
3. Ensure all unit tests pass: `pytest openbb_platform -m "not integration"`
Expand All @@ -26,18 +35,28 @@
1. For the core package run: `python build/pypi/openbb_platform/publish.py --core`
2. For the extension packages run: `python build/pypi/openbb_platform/publish.py --extensions`
3. For the `openbb` package - **which requires manual publishing** - do the following
3.1. Bump the dependency package versions

3.1. Bump the `openbb` package version and the extension versions on `openbb_platform/pyproject.toml` to the latest version.

> [!TIP]
> Consider using the poetry plugin `up` for updating the extensions to the latest version:
> 1. `poetry self add poetry-plugin-up`
> 2. `poetry up --latest`
> [!WARNING]
> Create a new environment before proceeding.
> Make sure that only required extensions are installed
3.2. Run `pip install -e .` from `openbb_platform`

3.3. Re-build the static assets that are bundled with the package: `python -c "import openbb; openbb.build()"`
- Run `python -c "import openbb"` after building the static to check that no additional static is being built.
- Run any command to smoke test if the static assets are being built correctly.
3.4. Run unit tests to validate the existence of deprecated endpoints

3.4. Run unit tests to validate the existence of deprecated endpoints (or watch this through GitHub Actions)

3.5. Run `poetry publish --build` from `openbb_platform`

3.6. Run `poetry lock` from `openbb_platform`

> [!TIP]
Expand All @@ -58,3 +77,14 @@
4. Open a new PR with the `release/<package>-<version>` branch pointing to the `develop` branch.
5. Merge the `release/<package>-<version>` branch to the `develop` branch.
6. If any bugs are encountered, create a new branch - `hotfix` for `main` and `bugfix` for `develop` and merge them accordingly.

### Generate the changelog

1. Run the changelog automation by using the "release_drafter" GA and passing the number of the previous Release.
2. Edit and make the changelog live on the repository.
3. Paste it in the platform-release-changelog Slack channel.

### Publish the CLI

1. Bump `openbb` dependency on `cli/pyproject.toml` to the latest version.
2. Run `poetry publish --build` from `cli`
2 changes: 1 addition & 1 deletion cli/openbb_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def main():
initial_logging_sub_app = change_logging_sub_app()
try:
main()
except Exception as e:
except Exception:
pass
finally:
reset_logging_sub_app(initial_logging_sub_app)
2 changes: 1 addition & 1 deletion cli/openbb_cli/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
from pathlib import Path
from typing import Optional

from openbb import obb
from openbb_core.app.model.abstract.singleton import SingletonMeta
from openbb_core.app.model.user_settings import UserSettings as User
from prompt_toolkit import PromptSession

from openbb import obb
from openbb_cli.argparse_translator.obbject_registry import Registry
from openbb_cli.config.completer import CustomFileHistory
from openbb_cli.config.console import Console
Expand Down
4 changes: 2 additions & 2 deletions cli/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "openbb-cli"
version = "1.0.2"
version = "1.0.3"
description = "Investment Research for Everyone, Anywhere."
authors = ["OpenBB <hello@openbb.co>"]
packages = [{ include = "openbb_cli" }]
Expand All @@ -17,7 +17,7 @@ openbb = 'openbb_cli.cli:main'
python = "^3.8.1,<3.12"

# OpenBB dependencies
openbb = { version = "^4.2.2", extras = ["all"] }
openbb = { version = "^4.2.3", extras = ["all"] }

# CLI dependencies
prompt-toolkit = "^3.0.16"
Expand Down
2 changes: 2 additions & 0 deletions openbb_platform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

The OpenBB Platform provides a convenient way to access raw financial data from multiple data providers. The package comes with a ready to use REST API - this allows developers from any language to easily create applications on top of OpenBB Platform.

Please find the complete documentation at [docs.openbb.co](https://docs.openbb.co/platform).

## Installation

The command below provides access to the core functionalities behind the OpenBB Platform.
Expand Down
2 changes: 1 addition & 1 deletion openbb_platform/core/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "openbb-core"
version = "1.2.4"
version = "1.2.5"
description = "OpenBB package with core functionality."
authors = ["OpenBB Team <hello@openbb.co>"]
license = "AGPL-3.0-only"
Expand Down
8 changes: 4 additions & 4 deletions openbb_platform/extensions/commodity/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions openbb_platform/extensions/commodity/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "openbb-commodity"
version = "1.1.2"
version = "1.1.3"
description = "Commodity extension for OpenBB"
authors = ["OpenBB Team <hello@openbb.co>"]
license = "AGPL-3.0-only"
Expand All @@ -9,7 +9,7 @@ packages = [{ include = "openbb_commodity" }]

[tool.poetry.dependencies]
python = "^3.8"
openbb-core = "^1.2.4"
openbb-core = "^1.2.5"

[build-system]
requires = ["poetry-core"]
Expand Down
8 changes: 4 additions & 4 deletions openbb_platform/extensions/crypto/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions openbb_platform/extensions/crypto/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "openbb-crypto"
version = "1.2.2"
version = "1.2.3"
description = "Crypto extension for OpenBB"
authors = ["OpenBB Team <hello@openbb.co>"]
license = "AGPL-3.0-only"
Expand All @@ -9,7 +9,7 @@ packages = [{ include = "openbb_crypto" }]

[tool.poetry.dependencies]
python = "^3.8"
openbb-core = "^1.2.4"
openbb-core = "^1.2.5"

[build-system]
requires = ["poetry-core"]
Expand Down
8 changes: 4 additions & 4 deletions openbb_platform/extensions/currency/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions openbb_platform/extensions/currency/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "openbb-currency"
version = "1.2.2"
version = "1.2.3"
description = "Currency extension for OpenBB"
authors = ["OpenBB Team <hello@openbb.co>"]
license = "AGPL-3.0-only"
Expand All @@ -9,7 +9,7 @@ packages = [{ include = "openbb_currency" }]

[tool.poetry.dependencies]
python = "^3.8"
openbb-core = "^1.2.4"
openbb-core = "^1.2.5"

[build-system]
requires = ["poetry-core"]
Expand Down
8 changes: 4 additions & 4 deletions openbb_platform/extensions/derivatives/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions openbb_platform/extensions/derivatives/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "openbb-derivatives"
version = "1.2.2"
version = "1.2.3"
description = "Derivatives extension for OpenBB"
authors = ["OpenBB Team <hello@openbb.co>"]
license = "AGPL-3.0-only"
Expand All @@ -9,7 +9,7 @@ packages = [{ include = "openbb_derivatives" }]

[tool.poetry.dependencies]
python = "^3.8"
openbb-core = "^1.2.4"
openbb-core = "^1.2.5"

[build-system]
requires = ["poetry-core"]
Expand Down
2 changes: 1 addition & 1 deletion openbb_platform/extensions/devtools/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "openbb-devtools"
version = "1.2.2"
version = "1.2.3"
description = "Tools for OpenBB Platform Developers"
authors = ["OpenBB Team <hello@openbb.co>"]
license = "AGPL-3.0-only"
Expand Down
8 changes: 4 additions & 4 deletions openbb_platform/extensions/econometrics/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions openbb_platform/extensions/econometrics/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "openbb-econometrics"
version = "1.2.2"
version = "1.2.3"
description = "Econometrics Toolkit for OpenBB"
authors = ["OpenBB Team <hello@openbb.co>"]
license = "AGPL-3.0-only"
Expand All @@ -13,7 +13,7 @@ scipy = "^1.10.1"
statsmodels = "^0.14.0"
arch = "^5.5.0"
linearmodels = "<=4.25" # ^4.26 has setuptools-scm in setup_requires
openbb-core = "^1.2.4"
openbb-core = "^1.2.5"

[build-system]
requires = ["poetry-core"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ async def money_measures(
parameters={
"country": "all",
"frequency": "quarter",
"age": "25-54",
"age": "total",
"provider": "oecd",
},
),
Expand Down
8 changes: 4 additions & 4 deletions openbb_platform/extensions/economy/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions openbb_platform/extensions/economy/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "openbb-economy"
version = "1.2.2"
version = "1.2.3"
description = "Economy extension for OpenBB"
authors = ["OpenBB Team <hello@openbb.co>"]
license = "AGPL-3.0-only"
Expand All @@ -9,7 +9,7 @@ packages = [{ include = "openbb_economy" }]

[tool.poetry.dependencies]
python = "^3.8"
openbb-core = "^1.2.4"
openbb-core = "^1.2.5"

[build-system]
requires = ["poetry-core"]
Expand Down
Loading

0 comments on commit 3e2d8b5

Please sign in to comment.