NeuralAnalysis / PyalData

Repository for the Python implementation of the TrialData analysis library.
GNU General Public License v3.0
7 stars 9 forks source link

Environment install lacks dependencies #87

Closed cversteeg closed 5 months ago

cversteeg commented 3 years ago

Import statements used in the demo are not in the general environment installation. (xarray, at least). I might also suggest that a docker container be made, if it's not a huge hassle.

cversteeg commented 3 years ago

mat73 also on the list.

raeedcho commented 3 years ago

Docker seems like overkill for what's basically a pandas wrapper. Perhaps some indication of which Python version to use would be good though...I didn't have any issues with using the code when I used Python 3.7.

Also mat73 is an optional dependency (i.e. to be installed by the user), which is only imported in cases where the mat file was saved with the 'v7.3' flag. See discussion here for more info.

raeedcho commented 3 years ago

Oh also, I highly recommend using pipenv instead of Docker for managing simple python environments (though I suppose conda works too, if you're using Anaconda).

bagibence commented 3 years ago

Thanks for raising this! Yes, we'll definitely need to document the dependencies. I didn't include xarray because it's only used in the demo, the internals of pyaldata don't rely on it, and -- even though it's one of my favorite packages -- I didn't want to force it on the user.

I agree with @raeedcho in that I don't see why Docker would be needed.

I'm not sure about the Python version. My guess now would be anything >=3.6 because we use f-strings quite a lot. I'm on 3.8 and it works fine, so we'll just have to test 3.6 and 3.9.

That said, @catiafortunato discovered that the trial_average function doesn't work with the newest version of pandas, so that will have to be fixed and indicated somewhere.

bagibence commented 5 months ago

Fixed by #141 and #143