From cf4391049b2fe264e8eb96dff07b44fce3b8e8d4 Mon Sep 17 00:00:00 2001 From: Chaithya G R Date: Thu, 22 Apr 2021 18:57:50 +0200 Subject: [PATCH] Preparing for a release v0.3 (#120) * Version Bump * Make pynfft as optional install * Update the circleci testbench * Fix Readme * Update the readme * Release v0.3 change * Loosen the install for scikit-image * Update readme to conda * Slacken the test_scripts * Circleci pull latest modopt * Circleci pull latest modopt Co-authored-by: chaithyagr --- .circleci/config.yml | 3 ++- .travis.yml | 1 + README.rst | 33 +++++++++++++++++++++++++++------ mri/info.py | 4 ++-- mri/tests/test_scripts.py | 3 ++- setup.py | 7 +++---- 6 files changed, 37 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 814e1908..5e1b6b1a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,7 +31,7 @@ jobs: . venv/bin/activate pip install --upgrade pip pip install --upgrade git+https://github.com/cea-cosmic/pysap - pip install -r doc/requirements.txt + pip install --upgrade -r doc/requirements.txt pip list > doc/state.txt - save_cache: paths: @@ -44,6 +44,7 @@ jobs: pip install --upgrade pip pip install Cython pip install -e . + pip install pynfft2 TESTFILES=$(circleci tests glob examples/*.py | circleci tests split --split-by=timings) echo ${TESTFILES} python3 -m unittest ${TESTFILES} diff --git a/.travis.yml b/.travis.yml index f8dbb780..de8ee693 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,6 +41,7 @@ install: - pip install git+https://github.com/CEA-COSMIC/pysap.git - export PYTHONPATH=$TRAVIS_BUILD_DIR/install:$PYTHONPATH - pip install -b $TRAVIS_BUILD_DIR/build -t $TRAVIS_BUILD_DIR/install --no-clean --upgrade . + - pip install pynfft2 script: - python setup.py test diff --git a/README.rst b/README.rst index 2d5f0922..bf9d23ef 100644 --- a/README.rst +++ b/README.rst @@ -18,21 +18,42 @@ pySAP-mri Python Sparse data Analysis Package external MRI plugin. This work is made available by a community of people, amoung which the -CEA Neurospin UNATI and CEA CosmoStat laboratories, in particular A. Grigis, -J.-L. Starck, P. Ciuciu, and S. Farrens. +CEA Neurospin UNATI and CEA CosmoStat laboratories. This plugin was developed by +A. Grigis, J.-L. Starck, P. Ciuciu, and S. Farrens. Currently, it is being handled by +Chaithya G R, Z. Ramzi and S. Farrens. Installation instructions ========================= -Install python-pySAP using `pip install python-pySAP`. Later install pysap-mri by calling setup.py -Note: If you want to use undecimated wavelet transform, please point the `$PATH` environment variable to -pysap external binary directory: +Install python-pySAP using: -`export PATH=$PATH:/path-to-pysap/build/temp.linux-x86_64-/extern/bin/` +``pip install python-pysap`` + +This will install pysap-mri plugin too. However if you want to update to a more +later version, please use: + +``pip install --upgrade pysap-mri`` Special Installations ===================== +`pyNFFT `_ +-------------------------------------------- + +For using Non-Cartesian FFT, please install pyNFFT by: + +Linux: +`````` + +``sudo apt install libnfft3-dev`` + +``pip install pynfft2`` + +Mac: +```` + +``conda install -c conda-forge pynfft`` + `gpuNUFFT `_ --------------------------------------------------------------- diff --git a/mri/info.py b/mri/info.py index 19bd76fc..0a6b157b 100644 --- a/mri/info.py +++ b/mri/info.py @@ -9,8 +9,8 @@ # Module current version version_major = 0 -version_minor = 2 -version_micro = 2 +version_minor = 3 +version_micro = 0 # Expected by setup.py: string of form "X.Y.Z" __version__ = "{0}.{1}.{2}".format(version_major, version_minor, version_micro) diff --git a/mri/tests/test_scripts.py b/mri/tests/test_scripts.py index eae9e26b..43073a29 100644 --- a/mri/tests/test_scripts.py +++ b/mri/tests/test_scripts.py @@ -92,7 +92,8 @@ def test_gridsearch_single_channel(self): np.testing.assert_equal(best_idx, 0) np.testing.assert_allclose( raw_results[best_idx][0], - image + image, + atol=1e-7, ) diff --git a/setup.py b/setup.py index 24feea45..f9d95761 100644 --- a/setup.py +++ b/setup.py @@ -42,17 +42,16 @@ classifiers="CLASSIFIERS", author=AUTHOR, author_email="XXX", - version="0.2.2", + version="0.3.0", url="https://github.com/CEA-COSMIC/pysap-mri", packages=find_packages(), setup_requires=setup_requires, install_requires=[ "scikit-learn>=0.19.1", "progressbar2>=3.34.3", - "joblib", + "joblib>=1.0.0", "scipy>=1.3.0", - "pynfft2>=1.3.3", - "scikit-image", + "scikit-image>=0.17.0", ], tests_require=['pytest>=5.0.1', 'pytest-cov>=2.7.1', 'pytest-pep8', 'pytest-runner'], platforms="OS Independent"