baccuslab / pyret

Python tools for analysis of neurophysiology data
https://pyret.readthedocs.io/en/master/
MIT License
35 stars 8 forks source link

JOSS review: pip requirements not installing? #85

Closed kdesimone closed 7 years ago

kdesimone commented 7 years ago

Hi,

I'm trying to install pyret on a clean conda environment running Python 3.5. Trying to install via pip, as in pip install pyret, I get an import error: ImportError: No module named 'sklearn'. I see that you do include install_requires in your setup, but there must be something else off in the setup.

I know this one works.

kdesimone commented 7 years ago

Also pursuant to the installs—the pyret demo requires h5py but this isn't included in the install_requirements and there are no errors related to h5py in the piecemeal install of pyret where I python setup.py install the pyret source or pip install each of the pyret dependencies individually prior to pip install pyret

bnaecker commented 7 years ago

We're not sure why the issue with scikit-learn is happening. That package is a bit strange (for example, both it uses both scikit-learn and sklearn as package names in pip), but we'll check it out and get it fixed.

I've made the fact that the demo requires h5py explicit in the quickstart. However, it is not a true requirement for pyret itself, so we don't want to list it as such. We used it in the demo both for convenience (we use HDF5 format a lot) and because we wanted to show the fact that pyret will work with NumPy array types and HDF5 datasets equally well.

kdesimone commented 7 years ago

In that case, I'd recommend that you use the Python's standard library to load data. There are a couple options for doing this, including pickle or maybe just plain old text files. For my own purposes, I do not store any actual brain measurements for demos/testings. Rather, I synthesize the data using custom methods as needed.

This also brings up the issue where to store the data—what happens if someone installs pyret through pip? They could import the data and/or its location into the namespace? Or would they need to know where pyret is installed on their system in order navigate to/specify the pyret/doc location?

bnaecker commented 7 years ago

We've addressed your issue with the data files as follows.

The main repo contains data in both HDF5 and NumPy's standard .npz file formats. We've then included in the demo instructions for downloading these files directly from the GH repo and loading the data into Python, making clear the steps and requirements for each method.

We feel that this makes the data very easy to get and use, without resorting to including the data files themselves in the PyPI package or methods for simulating it. Users just need to download the single file they'd like to use, and follow the demo without knowing any of the internals of how or where pyret is stored on their machine.