From 01fe6d7288bb2791ea1ed9fbc4afa3c85f01bb01 Mon Sep 17 00:00:00 2001 From: palec87 Date: Mon, 17 Jun 2024 11:20:17 +0100 Subject: [PATCH] switching to .toml configuration --- requirements.txt | 7 ------ setup.cfg | 50 ++++++++++++++++++++++++++++++++++++++++++ src_all/backtrack.py | 6 ++--- src_all/pyproject.toml | 6 +++++ 4 files changed, 59 insertions(+), 10 deletions(-) delete mode 100644 requirements.txt create mode 100644 setup.cfg create mode 100644 src_all/pyproject.toml diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 8740ef0..0000000 --- a/requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -napari-plugin-engine>=0.1.4 -numpy>=1.21,<=1.23.5 -matplotlib -qtpy -dask -napari -magicgui \ No newline at end of file diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..fc603aa --- /dev/null +++ b/setup.cfg @@ -0,0 +1,50 @@ +[metadata] +name = napari-opt-preprocessor +version = 0.0.1 +author = David Palecek, Giorgia Tortora +author_email = david@stanka.de + + +url = https://github.com/palec87/opt-napari +project_urls = + Bug Tracker = https://github.com/palec87/opt-napari/issues + +license = BSD-3-Clause +description = Plugin to preprocess OPT/tomography data before reconstruction. +long_description = file: README.md +long_description_content_type = text/markdown +classifiers = + Development Status :: 2 - Pre-Alpha + Intended Audience :: Developers + Framework :: napari + Topic :: Software Development :: Testing + Programming Language :: Python + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Operating System :: OS Independent + License :: OSI Approved :: BSD License + +[options] +packages = find: +python_requires = >=3.8 + + +[flake8] +max-line-length = 100 +ignore = E203,W503,C901,F823 +max-complexity = 18 +builtins = pytest +exclude = src_all/__init__.py, src_all/sample_data, src_all/sandbox +banned-modules = PyQt5 = use qtpy + PySide2 = use qtpy + +install_requires = + napari-plugin-engine>=0.1.4 + numpy>=1.21,<=1.23.5 + matplotlib + qtpy + dask + napari + magicgui \ No newline at end of file diff --git a/src_all/backtrack.py b/src_all/backtrack.py index f9ed1c8..ed1f973 100644 --- a/src_all/backtrack.py +++ b/src_all/backtrack.py @@ -42,10 +42,10 @@ def set_settings(self, inplace_value: bool, track_value: bool): self.track = track_value def update_history(self, image: Image, data_dict: dict) -> np.ndarray: - """Updates history if trackiing and inplace operations are selected. + """Updates history if tracking and inplace operations are selected. Args: - image (Image): napari image .data atribute is the np.ndarray image + image (Image): napari image .data attribute is the np.ndarray image data_dict (dict): metadata and data for the operation to register Raises: @@ -130,7 +130,7 @@ def undo(self) -> np.ndarray: if self.history_item == dict(): raise ValueError('No State to revert to.') - # this is completely useles I think + # this is completely useless I think if self.history_item['operation'] == 'roi': notifications.show_info('Reverting ROI selection') self.roi_def = self.history_item['roi_def'] diff --git a/src_all/pyproject.toml b/src_all/pyproject.toml new file mode 100644 index 0000000..b5a3c46 --- /dev/null +++ b/src_all/pyproject.toml @@ -0,0 +1,6 @@ +[build-system] +requires = [ + "setuptools>=42", + "wheel" +] +build-backend = "setuptools.build_meta" \ No newline at end of file