-
Notifications
You must be signed in to change notification settings - Fork 1.3k
plots: revert templates in packages change #6912
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
plots: revert templates in packages change #6912
Conversation
90cd734 to
cd8dc45
Compare
cd8dc45 to
4b57f30
Compare
|
@pared What was the issue with adding data files in pyinstaller (it looks like you might have linked the wrong issue)? Is there a reason we can't do something like they've documented here: https://pyinstaller.readthedocs.io/en/stable/spec-files.html#adding-files-to-the-bundle |
|
The issue I attached is regarding the We could try adding the files to the bundle but that would mean that we need to use separate logic for loading templates when using a non-binary package and a different one when using binary one, which seems to me to be more error prone and would require us to test binary packages. |
|
@Mergifyio rebase |
4b57f30 to
4a8ec8d
Compare
β Branch has been successfully rebased |
|
@Mergifyio rebase |
Fixes: treeverse#6911 Reverts: a1b1466
β Branch has been successfully rebased |
4a8ec8d to
c847984
Compare
|
@pared What's the status here? |
|
Awaiting review |
Fixes: #6911
Reverts: a1b1466
β I have followed the Contributing to DVC checklist.
π If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here.
Thank you for the contribution - we'll try to review it as soon as possible. π
In #6550 we introduced templates in packages. While utilizing
importlib.resourcesand including templates with our package makes sense for other types of builds, in the case of our binary packages andpyinstallerwe cannot include package data, because of pyinstaller/pyinstaller#2697.What we could do with pyinstaller would be to create
resourcesdirectory alongsidedvcand include the templates there. That would require us to load our templates differently depending on whether we can load data from package (other builds) orpyinstallerssys._MEIPASSwhen using binary packages.This seems much more error-prone than the previous approach (keeping predefined templates as python dicts in
dvc/repo/plots/template.pyand is harder to test (it would require us to test binary packages).That is why I decided to revert the change about templates in packages.
cc @dberenbaum