Skip to content
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

Changes to pyproject for test-pypi #2593

Closed
wants to merge 12 commits into from
12 changes: 11 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
[tool.poetry]
name = "OpenBBTerminal"
version = "1.8.0"
description = ""
description = "Work In Progress. Investment Research for Everyone, Anywhere."
authors = ["Didier Rodrigues Lopes"]
readme = "openbb_terminal/API_README.md"
license = "MIT"
homepage = "https://openbb.co/"
repository = "https://github.com/OpenBB-finance/OpenBBTerminal"
documentation = "https://openbb-finance.github.io/OpenBBTerminal/"
packages = [
{ include = "openbb_terminal" },
{ include = "terminal.py"}
]
include = ["styles/default/*.mpfstyle.json", "styles/default/*.mplrc.json",
"styles/default/*.richstyle.json", "styles/default/*.mplstyle",
"portfolio/*/*.xlsx", "portfolio/*/*.csv", "routines/*.openbb",
"data_sources_default.json","i18n/en.yml"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we bundle it like this the files that we include end up in envs/obb/lib/python3.9/site-packages/. That's the same place where all other python packages are. What are the odds that we'll have a conflict there, like an existing i18n or portfolio folder?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@piiq I would say low if we try to manage our dependencies closely. So hopefully there should be no conflict. Sadly there is no workaround to putting these folders and files into a different location. Additionally, we could potentially change the name of the folders and files that are placed in site-packages, but that would require a major major refactor. Folders like portfolio and il8n are necessary to run the terminal via pip install with the command openbb.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you think there's no workaround?
When i was experimenting with instalability i have moved the files into the openbb_terminal folder. We have core,config folders in there, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I should have phrased better. There doesn't seem to be a workaround if we use our current folder structure. Poetry pollutes the top level site-packages with the contents of "include" and per this poetry support thread it seems to be the default and only supported behavior. Changing the folder structure as you mentioned and move folders like il8n into openbb_terminal would allow for a more neat and clean pip install since they will be packaged in the module.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with both solutions

Packing everything inside openbb_terminal seems just a tiny bit tidier

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for now we'll keep it this way (placing materials into site-packages), but refactoring the folder structure will be a good idea for a future enhancement. We can track this enhancement with this #2623!


[tool.poetry.scripts]
openbb = 'terminal:terminal'
Expand Down