Skip to content
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

[JOSS review] Get example datasets in README error #10

Closed
zen-juen opened this issue Sep 13, 2021 · 5 comments
Closed

[JOSS review] Get example datasets in README error #10

zen-juen opened this issue Sep 13, 2021 · 5 comments

Comments

@zen-juen
Copy link

Hi there, after installing biopsykit with ease, I've encountered some errors when running the examples listed on the readme, particularly those that are related to retrieving example datasets:

import biopsykit as bp
from biopsykit.example_data import get_saliva_example

saliva_data = get_saliva_example(sample_times=[-20, 0, 10, 20, 30, 40, 50])

I get an error like so:


  File "c:\users\zen juen\downloads\wpy64-3850\python-3.8.5.amd64\lib\site-packages\pandas\io\parsers.py", line 1862, in __init__
    self._open_handles(src, kwds)

  File "c:\users\zen juen\downloads\wpy64-3850\python-3.8.5.amd64\lib\site-packages\pandas\io\parsers.py", line 1357, in _open_handles
    self.handles = get_handle(

  File "c:\users\zen juen\downloads\wpy64-3850\python-3.8.5.amd64\lib\site-packages\pandas\io\common.py", line 642, in get_handle
    handle = open(

FileNotFoundError: [Errno 2] No such file or directory: 'c:\\users\\zen juen\\downloads\\wpy64-3850\\python-3.8.5.amd64\\lib\\example_data\\cortisol_sample.csv'

This also happens for get_sleep_imu_example(), get_questionnaire_example() and get_mist_hr_example(). Might this be to do with the way functions are setting the data path?

(Note: as part of openjournals/joss-reviews#3702)

@espenhgn
Copy link

Interestingly, the get_saliva_example code works on my end, but not the TSST and get_questionnaire_example examples of the README.

@richrobe
Copy link
Member

Thank you for pointing that out! We assume this is due to the fact that the example data is not included in the package when installing it from PyPi.

We will update our code so that it will first check whether the package was installed manually, by cloning the git repository, then all example data should be downloaded and the examples should work correctly, or via PyPi. In the latter case the example data is not contained and we will download the example data similar to how scikit-learn is handling this (see https://github.com/scikit-learn/scikit-learn/blob/844b4be24/sklearn/datasets/_base.py).

We also updated the minimal working examples in the README, which still contained some bugs, in 6935600.

@richrobe
Copy link
Member

We added the feature of automatically downloading example data if not available yet in 252f33c.

@zen-juen
Copy link
Author

zen-juen commented Oct 4, 2021

Hi @richrobe that's great! I think this new version is not yet updated on PyPI though, so I can't review the changes as of now

@richrobe
Copy link
Member

Hi @zen-juen, now that this is resolved, I'm closing this issue if that's okay?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants