BLD/MNT: Remove scipy dependency #1299
Open
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.
Context
A discussion from quite a while ago in #363 suggested removing
scipy
from PyDM's project requirements. The only place in which it is used in the main code base is inunits.py
and the associated test cases, and only to retrieve a few constants.In order to retain the unit conversion functionality in the line edit widget, this PR just moves those constants into our
units.py
file and then removes all references toscipy
.scipy
is used in the tutorial as well, for that I just added an instruction to the tutorial documentation to install it.We could also just use a different lightweight units package. But as long as the code in
units.py
has been working fine, and hasn't changed in 7 years, I figure this is the most straightforward way to remove thescipy
requirement without needing to add a different requirement for our project. And if someone wants to extend the unit-related functionality later they can revisit this with a different package.Testing
test_units.py
still passes. The unit conversion menu in line edit widgets still works.