-
-
Notifications
You must be signed in to change notification settings - Fork 415
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
Resolve symlinks from path to environment for setting path #5704
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5704 +/- ##
=======================================
Coverage 89.84% 89.84%
=======================================
Files 608 608
Lines 51693 51694 +1
=======================================
+ Hits 46441 46446 +5
+ Misses 5252 5248 -4
... and 3 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch and thanks for the quick fix!
<!-- What does this pull request (PR) do? Why is it necessary? --> <!-- Tell us about your new feature, improvement, or fix! --> <!-- If your change includes user interface changes, please add an image, or an animation "An image is worth a thousand words!" --> <!-- You can use https://www.cockos.com/licecap/ or similar to create animations --> I have observed that when using `pyenv` to manage python environments, depending on way to run napari I got different settings path. ``` $ python -m napari /home/czaki/.pyenv/versions/napari ... $ napari /home/czaki/.pyenv/versions/3.8.3/envs/napari ... ``` but it is the fact this was the path to the same env, but one of them uses symlinks. ``` lrwxrwxrwx 1 czaki grzegorz 45 lip 9 2020 napari -> /home/czaki/.pyenv/versions/3.8.3/envs/napari ``` So I add the step of resolving the path to get the full path without symlinks. <!-- What resources, documentation, and guides were used in the creation of this PR? --> <!-- Please delete options that are not relevant. --> - [x] Bug-fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update <!-- Please describe the tests that you ran to verify your changes. --> - [ ] example: the test suite for my feature covers cases x, y, and z - [ ] example: all tests pass with my change - [ ] example: I check if my changes works with both PySide and PyQt backends as there are small differences between the two Qt bindings. - [ ] My PR is the minimum possible work for the desired functionality - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] If I included new strings, I have used `trans.` to make them localizable. For more information see our [translations guide](https://napari.org/developers/translations.html).
<!-- What does this pull request (PR) do? Why is it necessary? --> <!-- Tell us about your new feature, improvement, or fix! --> <!-- If your change includes user interface changes, please add an image, or an animation "An image is worth a thousand words!" --> <!-- You can use https://www.cockos.com/licecap/ or similar to create animations --> I have observed that when using `pyenv` to manage python environments, depending on way to run napari I got different settings path. ``` $ python -m napari /home/czaki/.pyenv/versions/napari ... $ napari /home/czaki/.pyenv/versions/3.8.3/envs/napari ... ``` but it is the fact this was the path to the same env, but one of them uses symlinks. ``` lrwxrwxrwx 1 czaki grzegorz 45 lip 9 2020 napari -> /home/czaki/.pyenv/versions/3.8.3/envs/napari ``` So I add the step of resolving the path to get the full path without symlinks. <!-- What resources, documentation, and guides were used in the creation of this PR? --> <!-- Please delete options that are not relevant. --> - [x] Bug-fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update <!-- Please describe the tests that you ran to verify your changes. --> - [ ] example: the test suite for my feature covers cases x, y, and z - [ ] example: all tests pass with my change - [ ] example: I check if my changes works with both PySide and PyQt backends as there are small differences between the two Qt bindings. - [ ] My PR is the minimum possible work for the desired functionality - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] If I included new strings, I have used `trans.` to make them localizable. For more information see our [translations guide](https://napari.org/developers/translations.html).
<!-- What does this pull request (PR) do? Why is it necessary? --> <!-- Tell us about your new feature, improvement, or fix! --> <!-- If your change includes user interface changes, please add an image, or an animation "An image is worth a thousand words!" --> <!-- You can use https://www.cockos.com/licecap/ or similar to create animations --> I have observed that when using `pyenv` to manage python environments, depending on way to run napari I got different settings path. ``` $ python -m napari /home/czaki/.pyenv/versions/napari ... $ napari /home/czaki/.pyenv/versions/3.8.3/envs/napari ... ``` but it is the fact this was the path to the same env, but one of them uses symlinks. ``` lrwxrwxrwx 1 czaki grzegorz 45 lip 9 2020 napari -> /home/czaki/.pyenv/versions/3.8.3/envs/napari ``` So I add the step of resolving the path to get the full path without symlinks. <!-- What resources, documentation, and guides were used in the creation of this PR? --> <!-- Please delete options that are not relevant. --> - [x] Bug-fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update <!-- Please describe the tests that you ran to verify your changes. --> - [ ] example: the test suite for my feature covers cases x, y, and z - [ ] example: all tests pass with my change - [ ] example: I check if my changes works with both PySide and PyQt backends as there are small differences between the two Qt bindings. - [ ] My PR is the minimum possible work for the desired functionality - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] If I included new strings, I have used `trans.` to make them localizable. For more information see our [translations guide](https://napari.org/developers/translations.html).
# Description <!-- What does this pull request (PR) do? Why is it necessary? --> <!-- Tell us about your new feature, improvement, or fix! --> <!-- If your change includes user interface changes, please add an image, or an animation "An image is worth a thousand words!" --> <!-- You can use https://www.cockos.com/licecap/ or similar to create animations --> I have observed that when using `pyenv` to manage python environments, depending on way to run napari I got different settings path. ``` $ python -m napari /home/czaki/.pyenv/versions/napari ... $ napari /home/czaki/.pyenv/versions/3.8.3/envs/napari ... ``` but it is the fact this was the path to the same env, but one of them uses symlinks. ``` lrwxrwxrwx 1 czaki grzegorz 45 lip 9 2020 napari -> /home/czaki/.pyenv/versions/3.8.3/envs/napari ``` So I add the step of resolving the path to get the full path without symlinks. # References <!-- What resources, documentation, and guides were used in the creation of this PR? --> ## Type of change <!-- Please delete options that are not relevant. --> - [x] Bug-fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update # How has this been tested? <!-- Please describe the tests that you ran to verify your changes. --> - [ ] example: the test suite for my feature covers cases x, y, and z - [ ] example: all tests pass with my change - [ ] example: I check if my changes works with both PySide and PyQt backends as there are small differences between the two Qt bindings. ## Final checklist: - [ ] My PR is the minimum possible work for the desired functionality - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] If I included new strings, I have used `trans.` to make them localizable. For more information see our [translations guide](https://napari.org/developers/translations.html).
Description
I have observed that when using
pyenv
to manage python environments, depending on way to run napari I got different settings path.but it is the fact this was the path to the same env, but one of them uses symlinks.
So I add the step of resolving the path to get the full path without symlinks.
References
Type of change
How has this been tested?
as there are small differences between the two Qt bindings.
Final checklist:
trans.
to make them localizable.For more information see our translations guide.