diff --git a/pyproject.toml b/pyproject.toml index 3d3b4f4..2945632 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,12 +5,76 @@ requires = [ ] build-backend = "setuptools.build_meta" +[project] +name = "tiffslide" +description = "tifffile-based drop-in replacement for openslide-python" +license.file = "LICENSE" +authors = [ + {name = "Andreas Poehlmann", email = "andreas.poehlmann@bayer.com"}, +] +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: BSD License", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Scientific/Engineering", + "Topic :: Scientific/Engineering :: Information Analysis", + "Topic :: Scientific/Engineering :: Bio-Informatics", + "Topic :: Utilities", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX", + "Operating System :: Unix", + "Operating System :: MacOS", +] +requires-python = ">=3.8" +dependencies = [ + "imagecodecs", + "fsspec!=2022.11.0,!=2023.1.0", + "pillow", + "tifffile>=2021.6.14", + "zarr>=2.11.0", + "typing_extensions>=4.0", +] +dynamic = ["version"] + +[project.readme] +file = "README.md" +content-type = "text/markdown" + +[project.urls] +Homepage = "https://github.com/bayer-science-for-a-better-life/tiffslide" +Download = "https://github.com/bayer-science-for-a-better-life/tiffslide" + +[project.optional-dependencies] +dev = [ + "pre-commit", + "black", + "pytest>=6", + "pytest-benchmark", + "pytest-cov", + "mypy", +] + +[tool.setuptools] +include-package-data = false + +[tool.setuptools.packages.find] +exclude = ["tests/*"] +namespaces = false + +[tool.setuptools.package-data] +tiffslide = ["py.typed"] [tool.setuptools_scm] write_to = "tiffslide/_version.py" version_scheme = "post-release" - [tool.pytest.ini_options] addopts = [ "-v", @@ -39,3 +103,46 @@ exclude_lines = [ "if MYPY:", "^\\s+[.][.][.]$", ] + +[tool.mypy] +python_version = "3.8" +check_untyped_defs = true +disallow_any_generics = true +disallow_incomplete_defs = true +disallow_untyped_defs = true +namespace_packages = true +no_implicit_optional = true +warn_redundant_casts = true +warn_return_any = true +warn_unused_configs = true +warn_unused_ignores = false +plugins = ["numpy.typing.mypy_plugin"] + +[[tool.mypy.overrides]] +module = ["tiffslide.tests.*"] +disallow_untyped_defs = false +disallow_incomplete_defs = false + +[[tool.mypy.overrides]] +module = ["PIL.*"] +ignore_missing_imports = true + +[[tool.mypy.overrides]] +module = ["fsspec.*"] +ignore_missing_imports = true + +[[tool.mypy.overrides]] +module = ["tifffile.*"] +ignore_missing_imports = true + +[[tool.mypy.overrides]] +module = ["openslide.*"] +ignore_missing_imports = true + +[[tool.mypy.overrides]] +module = ["zarr.*"] +ignore_missing_imports = true + +[[tool.mypy.overrides]] +module = ["imagecodecs.*"] +ignore_missing_imports = true diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 3d2fded..0000000 --- a/setup.cfg +++ /dev/null @@ -1,98 +0,0 @@ -[metadata] -name = tiffslide -url = https://github.com/bayer-science-for-a-better-life/tiffslide -download_url = https://github.com/bayer-science-for-a-better-life/tiffslide -license = BSD -license_file = LICENSE -description = tifffile-based drop-in replacement for openslide-python -long_description = file: README.md -long_description_content_type = text/markdown -author = Andreas Poehlmann -author_email = andreas.poehlmann@bayer.com -classifiers = - Development Status :: 3 - Alpha - Intended Audience :: Science/Research - License :: OSI Approved :: BSD License - Programming Language :: Python - Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - Programming Language :: Python :: 3.12 - Topic :: Scientific/Engineering - Topic :: Scientific/Engineering :: Information Analysis - Topic :: Scientific/Engineering :: Bio-Informatics - Topic :: Utilities - Operating System :: Microsoft :: Windows - Operating System :: POSIX - Operating System :: Unix - Operating System :: MacOS - - -[options] -packages = find: -python_requires = >=3.8 -install_requires = - imagecodecs - fsspec!=2022.11.0,!=2023.1.0 - pillow - tifffile>=2021.6.14 - zarr>=2.11.0 - typing_extensions>=4.0 - - -[options.packages.find] -exclude = - tests/* - -[options.package_data] -tiffslide = - py.typed - -[options.extras_require] -dev = - pre-commit - black - pytest>=6 - pytest-benchmark - pytest-cov - mypy - - -[mypy] -python_version = 3.8 -check_untyped_defs = true -disallow_any_generics = true -disallow_incomplete_defs = true -disallow_untyped_defs = true -namespace_packages = true -no_implicit_optional = true -warn_redundant_casts = true -warn_return_any = true -warn_unused_configs = true -warn_unused_ignores = false -plugins = - numpy.typing.mypy_plugin - -[mypy-tiffslide.tests.*] -disallow_untyped_defs = false -disallow_incomplete_defs = false - -[mypy-PIL.*] -ignore_missing_imports = true - -[mypy-fsspec.*] -ignore_missing_imports = true - -[mypy-tifffile.*] -ignore_missing_imports = true - -[mypy-openslide.*] -ignore_missing_imports = true - -[mypy-zarr.*] -ignore_missing_imports = true - -[mypy-imagecodecs.*] -ignore_missing_imports = true