New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Installing openbb-core also installs ruff, prevents upgrade to ">=0.2.0 #6163
Comments
Like pytest, ruff isn't required to run the code, only in development. (Similar to the main `pyproject.toml`, which has `ruff` in the same dependency group.) Closes OpenBB-finance#6163
Hi there, Ruff and Black are both used in the PackageBuilder class, which is responsible for creating the static assets required to run the Python interface. These assets are built every time an extension is installed or removed. There should be nothing preventing you from installing a newer version of Ruff independently, just ignore the |
Thanks @deeleeramone for the quick response! I closed #6164 because the fix doesn't work as is. I was unaware ruff was being used in conjunction with code generation.
If you use
Upgrading is definitely nicer than staying behind, but my concern was more that having it as a runtime dependency in the first place constrains the dev dependencies for downstream repos (e.g. if you upgrade, you also force repos to upgrade othewise they'll have a similar conflict). As for closing this issue, I think it's still relevant because I suspect other people will stumble into this issue, especially as A couple alternative solutions for this issue:
|
Describe the bug
The
openbb-core
package, required to installopenbb
, definesruff
as a dependency in the main group, and not the dev group.Compare:
https://github.com/samueldg/OpenBBTerminal/blob/47541d4c957d7ab366e3b5f07615b4a7a9916c7e/openbb_platform/core/pyproject.toml#L25
with the (correct) top-level
pyproject.toml
:https://github.com/samueldg/OpenBBTerminal/blob/47541d4c957d7ab366e3b5f07615b4a7a9916c7e/pyproject.toml#L178
Concretely, this means that you end up with the linter/formatter installed even if you don't want to use it, but more importantly it means that you can't upgrade it to the latest available version (
0.3.0
) because it clashes with the version rule in theopenbb-core
dependencies.To Reproduce
Create the following
pyproject.toml
in a new directory:Try to
poetry install
Get the following error
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: