ContextLab/hypertools

dependency install bug for non-UTF-8 locales

paxtonfitzpatrick opened this issue · 1 comments

In the rare case that someone tries to pip install hypertools in an environment that doesn't have UTF-8 set as the default encoding (usually minibase Linux distros or Docker images where the language wasn't set when building), installing the dependency umap-learn will fail silently. This is due to an issue with the version of UMAP being installed -- described and fixed lmcinnes/umap#330 and Hypertools's workaround for installing a dependency from a GitHub repository.

As this won't often be an issue, we should fix it in the next release by (in order of preferability):

  • if a new umap-learn release (>0.3.10) is pushed to PyPI by then, remove the workaround in setup.py and include most recent umap-learn version in requirements.txt
  • update the workaround to install UMAP at commit hash of fix (lmcinnes/umap@224a012)
  • if new (stable) bug fixes or improvements are released by then, update workaround to install from more recent hash

.
.
.
Note: intentionally circumventing PyPI's requirement that packages only depend on other PyPI-hosted packages is probably not great practice. IMO it was justifiable for v0.6.0/v0.6.2 due to a substantial unreleased bug fix, and made sufficiently transparent in requirements.txt and setup.py, but in the future I think we should try to come up with a different solution. For example, we could restructure reduce.py to:

  • try to import UMAP only if it's passed as the reducer
  • if it fails, ask users whether they want to install, note the line number of the code that installs it so users can verify nothing shady is being downloaded, and prompt for input
  • only then install it if they say yes.

This is now fixed in v0.6.3