diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1d4e97f..3534904 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,8 @@ jobs: strategy: max-parallel: 5 matrix: - python: [3.6, 3.7, 3.8] + python: [3.7, 3.8,3.9] + fail-fast: false steps: - uses: actions/checkout@v2 @@ -23,17 +24,12 @@ jobs: python-version: ${{ matrix.python }} - name: Install the package itself run: | - pip install . - + pip install .[testing] - name: Test with pytest run: | - pip install easydev - pip install pytest - pip install pytest-cov - pip install coverage pytest --cov-report term --cov=spectrum - - name: coveralls + - name: coveralls run: | pip install coveralls coveralls --service=github diff --git a/README.rst b/README.rst index 770c4bc..2f89c6d 100644 --- a/README.rst +++ b/README.rst @@ -70,6 +70,20 @@ Contributions Please see `github `_ for any issues/bugs/comments/contributions. +Changelog (summary) +=================== + +========== ========================================================== +release description +========== ========================================================== +0.8.1 * move CI to github actions + * include python 3.9 support + * include PR from tikuma-lshhsc contributor to speedup + eigenfre module + * fix deprecated warnings +========== ========================================================== + + Some notebooks (external contributions) ------------------------------------------- diff --git a/doc/ChangeLog.rst b/doc/ChangeLog.rst index b970d53..0027dfd 100644 --- a/doc/ChangeLog.rst +++ b/doc/ChangeLog.rst @@ -4,6 +4,12 @@ ChangeLog Summary Version 0.8 (2020) ------------------ +* 0.8.1: Jul 2021 + + * move CI to github actions + * include PR from tikuma-lshhsc contributor to speedup eigenfre module + * fix deprecated warnings + * 0.8.0: Nov 2020 * Fixed documentation related to https://github.com/cokelaer/spectrum/issues/57 diff --git a/requirements-dev.txt b/requirements-dev.txt deleted file mode 100644 index 9b60fd1..0000000 --- a/requirements-dev.txt +++ /dev/null @@ -1,11 +0,0 @@ -easydev -numpydoc -pytest -pytest-cov -pytest-xdist -pytest-mock -pytest-timeout -pytest-runner -sphinx -sphinx_rtd_theme -coveralls diff --git a/requirements.txt b/requirements.txt index f23634b..23d87e8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ +easydev numpy scipy matplotlib diff --git a/setup.cfg b/setup.cfg index 4cf0fc9..b0df0a7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,10 +6,10 @@ upload_dir=doc/build/html/ [upload_sphinx] upload-dir = doc/build/html -[aliases] -test=pytest -[tool:pytest] + + +#[tool:pytest] # do not use --cov because it interfers with travis command -addopts= --durations=10 --verbose --cov spectrum --cov-report term-missing +#addopts= --durations=10 --verbose --cov spectrum --cov-report term-missing diff --git a/setup.py b/setup.py index 0e6f686..8ed0fdf 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ _MAJOR = 0 _MINOR = 8 -_MICRO = 0 +_MICRO = 1 version = '%d.%d.%d' % (_MAJOR, _MINOR, _MICRO) release = '%d.%d' % (_MAJOR, _MINOR) @@ -35,10 +35,23 @@ # Dependencies install_requires=open("requirements.txt").read(), extras_require={ - 'plot': ['matplotlib'] + 'plot': ['matplotlib'], + "testing": [ + "pytest", + "pytest-cov", + "pytest-xdist", + "pytest-mock", + "pytest-timeout", + "pytest-runner", + "coveralls", + ], + "doc": [ + 'sphinx', + 'sphinx_rtd_theme' + ] + }, - # specific packages for testing - tests_require = open('requirements-dev.txt').read().split(), + package_data = { 'spectrum.data' : ['*'], diff --git a/src/spectrum/mtm.py b/src/spectrum/mtm.py index 64db184..988ec50 100644 --- a/src/spectrum/mtm.py +++ b/src/spectrum/mtm.py @@ -324,12 +324,11 @@ def dpss(N, NW=None, k=None): if k is None: k = min(round(2*NW),N) k = int(max(k,1)) - from numpy import dot, zeros, arange, sqrt mtspeclib.multitap.restype = None - lam = zeros(k, dtype=float) - tapers = zeros(k*N, dtype=float) - tapsum = zeros(k, dtype=float) + lam = np.zeros(k, dtype=float) + tapers = np.zeros(k*N, dtype=float) + tapsum = np.zeros(k, dtype=float) res = mtspeclib.multitap( c_int(N), @@ -341,7 +340,7 @@ def dpss(N, NW=None, k=None): ) # normalisation by sqtr(N). It is required to have normalised windows - tapers = tapers.reshape(k,N).transpose() / sqrt(N) + tapers = tapers.reshape(k,N).transpose() / np.sqrt(N) for i in range(k): # By convention (Percival and Walden, 1993 pg 379) @@ -362,11 +361,11 @@ def dpss(N, NW=None, k=None): # The values returned in lam are not exacly the same as in the following methods. acvs = _autocov(tapers.transpose(), debias=False) * N - nidx = arange(N) + nidx = np.arange(N) W = float(NW)/N r = 4*W*np.sinc(2*W*nidx) r[0] = 2*W - eigvals = dot(acvs, r) + eigvals = np.dot(acvs, r) #return (tapers, lam) return [tapers, eigvals] @@ -540,8 +539,13 @@ def _fftconvolve(in1, in2, mode="full", axis=None): """ #Locally import stuff only required for this: from scipy.fftpack import fftn, fft, ifftn, ifft - from scipy.signal.signaltools import _centered from numpy import array, product + try: + from scipy.signal._signaltools import _centered + except ModuleNotFoundError: + from scipy.signal.signaltools import _centered + + s1 = array(in1.shape) diff --git a/test/pytest.ini b/test/pytest.ini deleted file mode 100644 index cfc6949..0000000 --- a/test/pytest.ini +++ /dev/null @@ -1,2 +0,0 @@ -[pytest] -addopts = "--cov-report=term-missing"