* Bump openbb minor version: 4.3.0 * Remove deprecations: /equity/fundamental/overview, /index/market * Rebuild after deprecations * Bug fixes * Fix futures curve example * Fix equity historical test * Fix oecd + skip tests * Fix publishing script * Update OpenBBTerminal refs to OpenBB, repo renamed * Released code
3.9 KiB
Vendored
Publishing to PyPI
Pre-release
Warning
The
releasebranch is solely for the purpose of publishing the package(s)! Any last minute changes should be made in appropriate PRs and merged to thedevelopbranch. Once thereleasebranch is created, thedevelopbranch should be frozen for further commits until this process finishes.
A
releasebranch for a particular package should only cater to the changes for that package directory. For e.g. therelease/openbb-core-2.0.0branch should only contain changes for theopenbb-corepackage i.e. in theopenbb_platform/coredirectory.
- Merge
mainintodevelopand solve any conflict. You can do this by checking outdevelop, creating a branchfeature/merge-main-into-developand runninggit merge main. Merge this intodevelopif there are changes to commit. - 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 formatrelease/<package>-<version>(for e.g.release/openbb-core-1.0.1). - Bump
openbbpackage version inopenbb_platform/pyproject.toml.
Warning
The version must be incremented before running the tests in 4. and 5., since there are tests that rely of this to check for deprecated endpoints. Pay attention to commands that should be deprecated in the version you will publish.
- Ensure all the CI workflows pass.
- Ensure all unit tests pass:
pytest openbb_platform -m "not integration" - Ensure all integration tests pass:
pytest openbb_platform -m integration
Release
Ensure you have the appropriate credentials and permissions to publish to PyPI.
-
Run the following commands for publishing the packages to PyPI:
Tip
Consider using the
--dry-runflag to check if everything is correct before publishing.For a single package release (e.g. patching
openbb-core), the following steps are not required since the package can be published manually.- To publish
openbb-corerun:python build/pypi/openbb_platform/publish.py --core - To publish ALL extensions run:
python build/pypi/openbb_platform/publish.py --extensions - To publish
openbb(the main package) run:python build/pypi/openbb_platform/publish.py --openbb
Tip
Note that, in order for packages to pick up the latest versions of dependencies, it is advised to clear the local cache of the dependencies: we can do that with
pip cache purgeandpoetry cache clear pypi --all. Sometimes there might be some delay in the PyPI API, so it might be necessary to wait a few minutes for pip to pick the latest versions. - To publish
-
Publish the CLI
2.1. Bump
openbbdependency oncli/pyproject.tomlto the latest version2.2. Run
poetry publish --buildfromcli -
Regenerate assets for external use by running
python assets/scripts/generate_extension_data.py. -
Merge
release/<package>-<version>to themainbranch. -
Run
Deploy to GitHub Pagesaction in openbb-docs to update the documentation website. Go to docs.openbb.co to see the changes.
Post-release
- Install the packages on Google Colaboratory via PyPi and test to check if everything is working as expected.
- Install the packages in a new environment locally via PyPi and test to check if everything is working as expected.
- Open a new PR with the
release/<package>-<version>branch pointing to thedevelopbranch. - Merge the
release/<package>-<version>branch to thedevelopbranch. - If any bugs are encountered, create a new branch -
hotfixformainandbugfixfordevelopand merge them accordingly.
Generate the changelog
- Run the changelog automation by using the "release_drafter" GitHub action and input the number of the last release PR (not this one!).
- Edit and make the changelog live on the repository.
- Paste it in the platform-release-changelog Slack channel.