diff options
author | Henrique Joaquim <henriquecjoaquim@gmail.com> | 2024-06-19 12:06:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-19 11:06:14 +0000 |
commit | 3e2d8b53d16cdf9c9f2552fd5e7598fb8b05c65d (patch) | |
tree | 005397503f6ac42cbfe5ff32034ae83be2b7e45b | |
parent | f4a865e2af076353b23d3a3b4dab05ebf865b9cf (diff) |
Release/4.2.3 (#6514)4.2.3
* 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
96 files changed, 635 insertions, 612 deletions
diff --git a/assets/scripts/generate_extension_data.py b/assets/scripts/generate_extension_data.py index f6ccaefcd73..2962a70ca7b 100644 --- a/assets/scripts/generate_extension_data.py +++ b/assets/scripts/generate_extension_data.py @@ -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) diff --git a/build/pypi/openbb_platform/PUBLISH.md b/build/pypi/openbb_platform/PUBLISH.md index 6a55963b245..3ff69584bed 100644 --- a/build/pypi/openbb_platform/PUBLISH.md +++ b/build/pypi/openbb_platform/PUBLISH.md @@ -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"` @@ -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] @@ -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`
\ No newline at end of file diff --git a/cli/openbb_cli/cli.py b/cli/openbb_cli/cli.py index 91c2b4825d8..f39b7fdd2aa 100644 --- a/cli/openbb_cli/cli.py +++ b/cli/openbb_cli/cli.py @@ -25,7 +25,7 @@ if __name__ == "__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) diff --git a/cli/openbb_cli/session.py b/cli/openbb_cli/session.py index 1c5dcdc3c4d..d78c83222a4 100644 --- a/cli/openbb_cli/session.py +++ b/cli/openbb_cli/session.py @@ -4,11 +4,11 @@ import sys 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 |