From 8ae129a7d0ead158ef5441f684d620f59858c1dc Mon Sep 17 00:00:00 2001 From: Bryn Lloyd <12702862+dyollb@users.noreply.github.com> Date: Wed, 27 Nov 2024 12:23:06 +0100 Subject: [PATCH 1/2] remove dependencies unittest2 and future (compatibility layer between Python 2 and Python 3) --- .gitignore | 1 + pyproject.toml | 33 +++++++++++++++++++++++++++++++++ requirements.txt | 9 ++++----- setup.py | 26 ++------------------------ tests/test_axis_mirroring.py | 4 ++-- 5 files changed, 42 insertions(+), 31 deletions(-) create mode 100644 pyproject.toml diff --git a/.gitignore b/.gitignore index a9e36b7..3f09526 100755 --- a/.gitignore +++ b/.gitignore @@ -81,6 +81,7 @@ celerybeat-schedule # virtualenv venv/ ENV/ +.venv/ # Spyder project settings .spyderproject diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..141f560 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,33 @@ +[build-system] +requires = ["setuptools>=61.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "batchgenerators" +version = "0.25.2" +description = "Data augmentation toolkit" +readme = "README.md" +authors = [ + {name = "Division of Medical Image Computing, German Cancer Research Center AND Applied Computer Vision Lab, Helmholtz Imaging Platform", email = "f.isensee@dkfz-heidelberg.de"} +] +license = {text = "Apache License Version 2.0, January 2004"} +keywords = [ + "data augmentation", "deep learning", "image segmentation", + "image classification", "medical image analysis", + "medical image segmentation" +] +dependencies = [ + "numpy>=1.10.2", + "pandas", + "pillow>=7.1.2", + "scikit-image", + "scikit-learn", + "scipy", + "threadpoolctl" +] + +[project.urls] +homepage = "https://github.com/MIC-DKFZ/batchgenerators" + +[tool.setuptools.packages.find] +exclude = ["tests"] diff --git a/requirements.txt b/requirements.txt index f4e40a2..08f40b1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,7 @@ -pillow>=7.1.2 -threadpoolctl -scikit-learn numpy>=1.10.2 -scipy +pillow>=7.1.2 scikit-image scikit-learn -unittest2 \ No newline at end of file +scikit-learn +scipy +threadpoolctl diff --git a/setup.py b/setup.py index 6c0a50e..6068493 100755 --- a/setup.py +++ b/setup.py @@ -1,25 +1,3 @@ -from setuptools import setup, find_packages +from setuptools import setup -setup(name='batchgenerators', - version='0.25.1', - description='Data augmentation toolkit', - url='https://github.com/MIC-DKFZ/batchgenerators', - author='Division of Medical Image Computing, German Cancer Research Center AND Applied Computer Vision Lab, ' - 'Helmholtz Imaging Platform', - author_email='f.isensee@dkfz-heidelberg.de', - license='Apache License Version 2.0, January 2004', - packages=find_packages(exclude=["tests"]), - install_requires=[ - "pillow>=7.1.2", - "numpy>=1.10.2", - "scipy", - "scikit-image", - "scikit-learn", - "future", - "pandas", - "unittest2", - "threadpoolctl" - ], - keywords=['data augmentation', 'deep learning', 'image segmentation', 'image classification', - 'medical image analysis', 'medical image segmentation'], - ) +setup() diff --git a/tests/test_axis_mirroring.py b/tests/test_axis_mirroring.py index 78839e4..e9f98ce 100644 --- a/tests/test_axis_mirroring.py +++ b/tests/test_axis_mirroring.py @@ -14,7 +14,7 @@ # limitations under the License. import unittest -import unittest2 +import unittest import numpy as np from batchgenerators.dataloading.single_threaded_augmenter import SingleThreadedAugmenter from skimage import data @@ -23,7 +23,7 @@ from batchgenerators.transforms.spatial_transforms import MirrorTransform -class TestMirrorAxis(unittest2.TestCase): +class TestMirrorAxis(unittest.TestCase): def setUp(self): self.seed = 1234 From f37397e0489841651fd57ec26fc3262b4916793a Mon Sep 17 00:00:00 2001 From: Bryn Lloyd <12702862+dyollb@users.noreply.github.com> Date: Wed, 27 Nov 2024 13:09:45 +0100 Subject: [PATCH 2/2] remove redundant setup.cfg --- setup.cfg | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 224a779..0000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[metadata] -description-file = README.md \ No newline at end of file