diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f94d1fff62fd3ac81cc77b5fe7d2e2c58595e63a..52e024a4478c103b413275d5487ff16e48892fcc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,15 +1,7 @@ # run the test suite -tests_old_ubuntu: - image: registry.gitlab.lis-lab.fr:5005/skmad-suite/madarrays/ubuntu:16.04 - tags: - - docker - script: - - pip3 install . --no-deps - - pytest - -tests_new_ubuntu: - image: registry.gitlab.lis-lab.fr:5005/skmad-suite/madarrays/ubuntu:rolling +tests: + image: registry.gitlab.lis-lab.fr:5005/skmad-suite/madarrays/ubuntu:18.04 tags: - docker script: @@ -20,7 +12,7 @@ tests_new_ubuntu: # generate the documentation pages: - image: registry.gitlab.lis-lab.fr:5005/skmad-suite/madarrays/ubuntu:rolling + image: registry.gitlab.lis-lab.fr:5005/skmad-suite/madarrays/ubuntu:18.04 tags: - docker only: diff --git a/doc/index.rst b/doc/index.rst index 274c4cd801be0c415873cfd3555d02a5e4156f26..70dc082975d583dc18abbac2aa5056ea057b8df1 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -26,7 +26,7 @@ Documentation .. toctree:: :maxdepth: 1 - install + installation references tutorials credits diff --git a/doc/install.rst b/doc/installation.rst similarity index 83% rename from doc/install.rst rename to doc/installation.rst index 3a4659ee5124458ebfa4c481a4b1e95ca2435ea0..40c797c99f2666e4316d432b683c05e8c765dff3 100644 --- a/doc/install.rst +++ b/doc/installation.rst @@ -1,24 +1,24 @@ -Install -####### +Installation +############ ``madarrays`` requires the following packages: * `python >= 3.5 <https://wiki.python.org/moin/BeginnersGuide/Download>`_ -* `numpy >= 1.11 <http://www.numpy.org>`_ -* `scipy >= 0.17 <https://www.scipy.org/scipylib/index.html>`_ -* `matplotlib >= 1.5 <http://matplotlib.org/>`_ +* `numpy >= 1.13 <http://www.numpy.org>`_ +* `scipy >= 0.19 <https://www.scipy.org/scipylib/index.html>`_ +* `matplotlib >= 2.1 <http://matplotlib.org/>`_ * `simpleaudio >= 1.0 <https://github.com/hamiltron/py-simple-audio>`_ * `resampy >= 0.2 <https://github.com/bmcfee/resampy>`_ -Make sure you Python environment is properly configured. It is recommended to -install `madarrays` in a virtual environment. +Make sure your Python environment is properly configured. It is recommended to +install ``madarrays`` in a virtual environment. Release version --------------- First, make sure you have the latest version of pip (the Python package manager) installed. If you do not, refer to the `Pip documentation -<https://pip.pypa.io/en/stable/installing/>`_ and install `pip` first. +<https://pip.pypa.io/en/stable/installing/>`_ and install ``pip`` first. Install the current release with ``pip``:: diff --git a/docker/Dockerfile_ubuntu_16.04 b/docker/Dockerfile_ubuntu_16.04 deleted file mode 100644 index d350c3a6e0d367c582ce878dc9f5174a69322b8e..0000000000000000000000000000000000000000 --- a/docker/Dockerfile_ubuntu_16.04 +++ /dev/null @@ -1,23 +0,0 @@ -FROM ubuntu:16.04 -MAINTAINER Florent Jaillet -WORKDIR / -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ - python3 \ - python3-pip \ - python3-wheel \ - python3-setuptools \ - python3-numpy\ - python3-scipy \ - python3-matplotlib \ - ipython3 \ - python3-six \ - python3-dev \ - gcc \ - libasound2-dev \ - && \ - apt-get clean -RUN mkdir -p /root/.config/matplotlib && \ - echo "backend: pdf" > /root/.config/matplotlib/matplotlibrc -RUN pip3 install llvmlite numba resampy simpleaudio --no-deps -RUN pip3 install pytest pytest-cov pytest-randomly diff --git a/docker/Dockerfile_ubuntu_rolling b/docker/Dockerfile_ubuntu_18.04 similarity index 89% rename from docker/Dockerfile_ubuntu_rolling rename to docker/Dockerfile_ubuntu_18.04 index eb239840acb6791fac7a09d05d84c5809b3af147..2f0ea8822b774581cec490597c535b616372c12a 100644 --- a/docker/Dockerfile_ubuntu_rolling +++ b/docker/Dockerfile_ubuntu_18.04 @@ -1,7 +1,9 @@ -FROM ubuntu:rolling +FROM ubuntu:18.04 MAINTAINER Florent Jaillet WORKDIR / +ENV DEBIAN_FRONTEND noninteractive RUN apt-get update && \ + apt-get upgrade -y && \ apt-get install -y --no-install-recommends \ python3 \ python3-pip \ @@ -10,6 +12,7 @@ RUN apt-get update && \ python3-numpy\ python3-scipy \ python3-matplotlib \ + python3-ltfatpy \ ipython3 \ python3-six \ python3-numba \ diff --git a/madarrays/waveform.py b/madarrays/waveform.py index 08ad2ef04d308d9433c0584339917f515d71902f..15be221dc3da6812cf34b0c384a2fd7a52dcdd72 100644 --- a/madarrays/waveform.py +++ b/madarrays/waveform.py @@ -169,7 +169,8 @@ class Waveform(MadArray): raise ValueError(errmsg.format(inputs[0].fs, inputs[1].fs)) output = output.view(Waveform) - output.fs = inputs[0].fs if isinstance(inputs[0], Waveform) else inputs[1].fs + output.fs = inputs[0].fs if isinstance(inputs[0], Waveform) \ + else inputs[1].fs return output @@ -771,7 +772,7 @@ class Waveform(MadArray): def copy(self): return Waveform(self) - # def __add__(self, other): + def __add__(self, other): if isinstance(other, Waveform) and self.fs != other.fs: errmsg = 'Waveforms do not have the same fs: {} and {}' raise ValueError(errmsg.format(self.fs, other.fs)) diff --git a/requirements/defaults.txt b/requirements/defaults.txt index bdfa9d2ce5c4895654a0b39c8b96fb7f8163173a..3e5a679d8d92405bc7b898da39f6b4bd0573cd0d 100644 --- a/requirements/defaults.txt +++ b/requirements/defaults.txt @@ -1,7 +1,7 @@ --index-url https://pypi.python.org/simple/ numpy>=1.13 -scipy>=0.17 -matplotlib>=1.5 +scipy>=0.19 +matplotlib>=2.1 simpleaudio>=1.0 resampy>=0.2 diff --git a/setup.py b/setup.py index 99b2b63ed391e698f3270bb85918b841c281e40f..dd1f49578f0eccf6f1f0d80d1278c13dc7f4c607 100644 --- a/setup.py +++ b/setup.py @@ -49,7 +49,7 @@ DESCRIPTION = 'Python package for audio data structures with missing entries' LICENSE = 'GNU General Public License v3 (GPLv3)' URL = 'https://gitlab.lis-lab.fr/skmad-suite/{}'.format(NAME) AUTHOR = 'Ronan Hamon, Valentin Emiya, and Florent Jaillet' -AUTHOR_EMAIL = ('ronan.hamon@lis-lab.fr', 'valentin.emiya@lis-lab.fr', +AUTHOR_EMAIL = ('ronan.hamon@lis-lab.fr, valentin.emiya@lis-lab.fr, ' 'florent.jaillet@lis-lab.fr') INSTALL_REQUIRES = ['matplotlib', 'numpy', @@ -71,7 +71,7 @@ CLASSIFIERS = [ 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6'] PYTHON_REQUIRES = '>=3.5' -EXTRA_REQUIRE = { +EXTRAS_REQUIRE = { 'dev': ['coverage', 'pytest', 'pytest-cov', 'pytest-randomly', 'ipython'], 'doc': ['sphinx', 'nbsphinx', 'numpydoc', 'sphinx-paramlinks']} PROJECT_URLS = {'Bug Reports': URL + '/issues', @@ -131,7 +131,7 @@ def setup_package(): packages=find_packages(exclude=['doc', 'dev']), install_requires=INSTALL_REQUIRES, python_requires=PYTHON_REQUIRES, - extras_require=EXTRA_REQUIRE, + extras_require=EXTRAS_REQUIRE, project_urls=PROJECT_URLS)