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

fixed python3 import pathes #48

Merged
merged 22 commits into from
Oct 19, 2016
Merged

fixed python3 import pathes #48

merged 22 commits into from
Oct 19, 2016

Conversation

janscience
Copy link
Collaborator

@janscience janscience commented Sep 29, 2016

I fixed the import pathes to make thunderfish running with python3 and python 2.7.

Important:
Install the likewise updated audioio package.

Run the modules for testing, as well as thunderfish and fishfinder as a package from the root directory of this package:

python -m thunderfish.thunderfish data.wav
python -m thunderfish.peakdetection

Calling them the usual way with "python thunderfish.py data.wav" will NOT work anymore. Ask google for "relative imports" to get an idea why...

In addition I added entrypoints to the setup.py. After you install thunderfish with
sudo python setup.py install
you can use thunderfish and fishfinder from any directory by simply calling
thunderfish somedata.wav
fishfinder cooldata.mp3
from your console.

@coveralls
Copy link

Coverage Status

Coverage decreased (-2.4%) to 17.081% when pulling 2097b7e on janscience:master into de730ae on bendalab:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-2.3%) to 17.236% when pulling 05073f7 on janscience:master into de730ae on bendalab:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-2.3%) to 17.193% when pulling 82d69fa on janscience:master into de730ae on bendalab:master.

import dataloader as dl
import config_tools as ct
from dataloader import load_data
from config_tools import get_config_dict

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not "from .config_tools import get_config_dict" in this case ?
is the dot not required here ? and if so, why ?

@coveralls
Copy link

Coverage Status

Coverage decreased (-2.3%) to 17.193% when pulling b72ce19 on janscience:master into de730ae on bendalab:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-3.6%) to 15.711% when pulling be2f58a on janscience:master into b9ba3af on bendalab:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+4.5%) to 23.81% when pulling 78f31b9 on janscience:master into b9ba3af on bendalab:master.

upper = bins[inx][-1] # needs to return the next bin
hist, bins = np.histogram(data, nbins, density=True)
inx = hist > np.max(hist) * hist_height
lower = bins[0:-1][inx][0]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. this finally gets rid of the stupid warning message!

import thunderfish.powerspectrum as ps
import thunderfish.harmonicgroups as hg
import thunderfish.config_tools as ct
from IPython import embed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hehe! I also always forget to remove it before pushing XD

@jfsehuanes jfsehuanes merged commit f93a658 into bendalab:master Oct 19, 2016
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

Successfully merging this pull request may close these issues.

None yet

4 participants