diff --git a/.github/workflows/new_release.yml b/.github/workflows/new_release.yml index 390eee2..9ccbe1c 100644 --- a/.github/workflows/new_release.yml +++ b/.github/workflows/new_release.yml @@ -19,6 +19,7 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt + pip install -r requirements_gui.txt mkdir models cd models curl.exe -o renal_segmentor.model https://zenodo.org/record/4894406/files/whole_kidney_cnn.model diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 2ad3435..c29a7b1 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -34,6 +34,7 @@ jobs: python -m pip install --upgrade pip pip install flake8 pytest pytest-cov codecov wheel pip install -r requirements.txt + pip install -r requirements_gui.txt - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names diff --git a/CHANGELOG.md b/CHANGELOG.md index 19f151c..661ccba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [1.3.3] - 2021-12-21 + +### Changed +* GUI requirements (Gooey and PyInstaller) are now optional to try and save time/make install easier on linux where wxPython is a bit of a pain. #221 + + ## [1.3.2] - 2021-12-20 ### Changed diff --git a/README.md b/README.md index 84f6e6a..0d705ec 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Alternatively, the methods used by the segmentor are available as a Python packa 2. Run the `renal_segmentor.exe -h` to generate a list of available parameters. The application runs via a command line if any input arguments are specified, if not, it opens as a GUI. ### As a Python package -1. Activate the python environment you want to install the package on and run `pip install renalsegmentor`. +1. Activate the python environment you want to install the package on and run `pip install renalsegmentor`. If you want to install the additional dependencies required for the GUI, run `pip install renalsegmentor[gui]` however to use the segmentor as a python package, these are not required. 2. The example code snippet below will generate a mask of `T2w.nii.gz` as a numpy array and print the TKV to the terminal. ```python diff --git a/renal_segmentor.py b/renal_segmentor.py index a196b71..58c1736 100644 --- a/renal_segmentor.py +++ b/renal_segmentor.py @@ -114,7 +114,7 @@ def resource_path(relative_path): 'name': 'Renal Segmentor', 'description': 'Automatically segment the kidneys from MRI ' 'data.', - 'version': '1.3.2', + 'version': '1.3.3', 'copyright': '2021', 'website': 'https://github.com/alexdaniel654/Renal_Segmentor', 'developer': 'https://www.researchgate.net/profile/' diff --git a/requirements.txt b/requirements.txt index 612736d..7b51071 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,6 @@ -Gooey==1.0.8.1 nibabel==3.2.1 numpy==1.21.5 pandas==1.3.5 -pyinstaller==4.7 pytest==6.2.5 scikit-image==0.19.1 tensorflow==2.7.0 diff --git a/requirements_gui.txt b/requirements_gui.txt new file mode 100644 index 0000000..e6f0d94 --- /dev/null +++ b/requirements_gui.txt @@ -0,0 +1,2 @@ +Gooey==1.0.8.1 +pyinstaller==4.7 \ No newline at end of file diff --git a/setup.py b/setup.py index 1b42c8c..434d7cc 100644 --- a/setup.py +++ b/setup.py @@ -3,12 +3,15 @@ with open('requirements.txt') as f: requirements = f.read().splitlines() +with open('requirements_gui.txt') as f: + requirements_gui = f.read().splitlines() + with open('README.md', encoding='utf-8') as f: long_description = f.read() setup( name="renalsegmentor", - version="1.3.2", + version="1.3.3", description="Segment kidneys from MRI data", long_description=long_description, long_description_content_type="text/markdown", @@ -18,9 +21,8 @@ python_requires='>=3.7, <4', packages=find_packages(), install_requires=requirements, + extras_require={'gui': [requirements_gui]}, include_package_data=True, - - classifiers=[ 'Development Status :: 5 - Production/Stable',