Fix detection of dashboard build files in installed packages. #1084
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Hi @bouthilx ! This PR tries to fix #1083 . However, I don't know how to test it in CI. CI currently tests normal installation, but this issue seems related to a corner case, and I don't know how to reproduce it in CI.
Changes
t seems that, depending on installation, additional files may be installed in
<sys.prefix>/local
instead of just<sys.prefix>
. More info: https://stackoverflow.com/questions/14211575/any-python-function-to-get-data-files-root-directory#comment99087548_14211600So, this PR just checks both
<sys.prefix>
then<sys.prefix>/local
to find dashboard build parent folder (namedorion-dashboard
).On regular installations (e.g. in CI tests), checking
<sys.prefix>
is enough. But it seems data are installed in<sys.prefix>/local
on Jupyter installations. I don't know why there's this difference.Checklist
Tests
$ tox -e py38
; replace38
by your Python version if necessary)Documentation
Quality
$ tox -e lint
)