diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 3ffcb6f4..2279abef 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -16,21 +16,12 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest] - python-version: [3.8] + python-version: ["3.10"] steps: - name: Checkout uses: actions/checkout@v2 - - name: Report WPS Errors - uses: wemake-services/wemake-python-styleguide@0.14.1 - continue-on-error: true - with: - reporter: 'github-pr-review' - path: './modopt' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Set up Conda with Python ${{ matrix.python-version }} uses: conda-incubator/setup-miniconda@v2 with: @@ -98,7 +89,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest] - python-version: [3.6, 3.7, 3.9] + python-version: ["3.7", "3.8", "3.9"] steps: - name: Checkout diff --git a/README.md b/README.md index 91bebfc2..223d0b73 100644 --- a/README.md +++ b/README.md @@ -37,11 +37,11 @@ All packages required by ModOpt should be installed automatically. Optional pack In order to run the code in this repository the following packages must be installed: -* [Python](https://www.python.org/) [> 3.6] +* [Python](https://www.python.org/) [> 3.7] * [importlib_metadata](https://importlib-metadata.readthedocs.io/en/latest/) [==3.7.0] * [Numpy](http://www.numpy.org/) [==1.19.5] * [Scipy](http://www.scipy.org/) [==1.5.4] -* [tqdm]([https://progressbar-2.readthedocs.io/](https://tqdm.github.io/) [>=4.64.0] +* [tqdm](https://tqdm.github.io/) [>=4.64.0] ### Optional Packages diff --git a/develop.txt b/develop.txt index 7397e15c..25857153 100644 --- a/develop.txt +++ b/develop.txt @@ -1,10 +1,8 @@ coverage>=5.5 -flake8>=4 -nose>=1.3.7 pytest>=6.2.2 pytest-cov>=2.11.1 -pytest-pep8>=1.0.6 pytest-emoji>=0.2.0 -pytest-flake8>=1.0.7 -wemake-python-styleguide>=0.15.2 pytest-pydocstyle>=2.2.0 +black +isort +pytest-black diff --git a/modopt/signal/filter.py b/modopt/signal/filter.py index 8e24768c..84dd8160 100644 --- a/modopt/signal/filter.py +++ b/modopt/signal/filter.py @@ -73,8 +73,8 @@ def mex_hat(data_point, sigma): Examples -------- >>> from modopt.signal.filter import mex_hat - >>> mex_hat(2, 1) - -0.3521390522571337 + >>> round(mex_hat(2, 1), 15) + -0.352139052257134 """ data_point = check_float(data_point) @@ -108,8 +108,8 @@ def mex_hat_dir(data_gauss, data_mex, sigma): Examples -------- >>> from modopt.signal.filter import mex_hat_dir - >>> mex_hat_dir(1, 2, 1) - 0.17606952612856686 + >>> round(mex_hat_dir(1, 2, 1), 16) + 0.1760695261285668 """ data_gauss = check_float(data_gauss) diff --git a/modopt/signal/positivity.py b/modopt/signal/positivity.py index e4ec098d..c19ba62c 100644 --- a/modopt/signal/positivity.py +++ b/modopt/signal/positivity.py @@ -48,7 +48,7 @@ def pos_recursive(input_data): """ if input_data.dtype == 'O': - res = np.array([pos_recursive(elem) for elem in input_data]) + res = np.array([pos_recursive(elem) for elem in input_data], dtype="object") else: res = pos_thresh(input_data) diff --git a/modopt/signal/svd.py b/modopt/signal/svd.py index 6dcb9eda..f3d40a51 100644 --- a/modopt/signal/svd.py +++ b/modopt/signal/svd.py @@ -57,7 +57,7 @@ def find_n_pc(u_vec, factor=0.5): ) # Get the shape of the array - array_shape = np.repeat(np.int(np.sqrt(u_vec.shape[0])), 2) + array_shape = np.repeat(int(np.sqrt(u_vec.shape[0])), 2) # Find the auto correlation of the left singular vector. u_auto = [ @@ -299,7 +299,7 @@ def svd_thresh_coef(input_data, operator, threshold, thresh_type='hard'): a_matrix = np.dot(s_values, v_vec) # Get the shape of the array - array_shape = np.repeat(np.int(np.sqrt(u_vec.shape[0])), 2) + array_shape = np.repeat(int(np.sqrt(u_vec.shape[0])), 2) # Compute threshold matrix. ti = np.array([ diff --git a/setup.cfg b/setup.cfg index 87496ced..afe46bbc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -84,7 +84,6 @@ testpaths = addopts = --verbose --emoji - --flake8 --cov=modopt --cov-report=term --cov-report=xml diff --git a/setup.py b/setup.py index c93dd020..c95e5984 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ license = 'MIT' # Set the package classifiers -python_versions_supported = ['3.6', '3.7', '3.8', '3.9'] +python_versions_supported = ['3.7', '3.8', '3.9', '3.10', '3.11'] os_platforms_supported = ['Unix', 'MacOS'] lc_str = 'License :: OSI Approved :: {0} License'