diff --git a/MANIFEST.in b/MANIFEST.in index 0439384..c1a7121 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,2 @@ include LICENSE include README.md -include requirements.txt - -recursive-exclude * __pycache__ -recursive-exclude * *.py[co] diff --git a/pyproject.toml b/pyproject.toml index 4e758eb..644333c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,76 @@ +[project] +name = "brainglobe-napari-io" +description = "Read and write files from the BrainGlobe neuroanatomy suite" +readme = "README.md" +authors = [ + {name = "Adam Tyson", email = "code@adamltyson.com"}, +] +classifiers = [ + "Development Status :: 4 - Beta", + "Framework :: napari", + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Topic :: Scientific/Engineering :: Image Recognition", +] +requires-python = ">=3.8" +dependencies = [ + "bg-atlasapi", + "bg_space", + "imlib", + "napari", + "napari-ndtiffs", + "napari-plugin-engine >= 0.1.4", + "tifffile>=2020.8.13", +] +license = {text = "BSD-3-Clause"} +dynamic = ['version'] + +[project.urls] +Homepage = "https://brainglobe.info" +"Source Code" = "https://github.com/brainglobe/brainglobe-napari-io" +"Bug Tracker" = "https://github.com/brainglobe/brainglobe-napari-io/issues" +Documentation = "https://docs.brainglobe.info" +"User Support" = "https://forum.image.sc/tag/brainglobe" +Twitter = "https://twitter.com/brain_globe" + +[project.optional-dependencies] +dev = [ + "black", + "gitpython", + "pre-commit", + "pytest", + "pytest-cov", +] + +[project.entry-points."napari.manifest"] +brainglobe-napari-io = "brainglobe_napari_io:napari.yaml" + + +[build-system] +requires = [ + "setuptools>=45", + "wheel", + "setuptools_scm[toml]>=6.2", +] +build-backend = "setuptools.build_meta" + +[tool.setuptools] +include-package-data = true + +[tool.setuptools.packages.find] +include = ["brainglobe_napari_io*"] + +[tool.setuptools_scm] + [tool.black] -target-version = ['py38', 'py39', 'py310'] +target-version = ['py38', 'py39', 'py310', 'py311'] skip-string-normalization = false line-length = 79 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 631e18d..0000000 --- a/setup.cfg +++ /dev/null @@ -1,31 +0,0 @@ -[bumpversion] -current_version = 0.1.5 -commit = True -tag = True -tag_name = {new_version} -parse = (?P\d+)\.(?P\d+)\.(?P\d+)(\-(?P[a-z]+)(?P\d+))? -serialize = - {major}.{minor}.{patch}-{release}{rc} - {major}.{minor}.{patch} - -[bumpversion:part:release] -optional_value = prod -first_value = rc -values = - rc - prod - -[bumpversion:part:rc] - -[bumpversion:file:setup.py] -search = version="{current_version}" -replace = version="{new_version}" - -[bumpversion:file:brainglobe_napari_io/__init__.py] -search = __version__ = "{current_version}" -replace = __version__ = "{new_version}" - -[flake8] -ignore = E203, E231, W503, E722, E501, F401 -max-line-length = 79 -exclude = __init__.py,build,.eggs diff --git a/setup.py b/setup.py deleted file mode 100644 index 4d433d3..0000000 --- a/setup.py +++ /dev/null @@ -1,72 +0,0 @@ -from os import path - -from setuptools import find_packages, setup - -this_directory = path.abspath(path.dirname(__file__)) -with open(path.join(this_directory, "README.md"), encoding="utf-8") as f: - long_description = f.read() - -requirements = [ - "napari", - "napari-plugin-engine >= 0.1.4", - "napari-ndtiffs", - "tifffile>=2020.8.13", - "imlib", - "bg_space", - "bg-atlasapi", -] - -setup( - name="brainglobe-napari-io", - version="0.1.5", - author="Adam Tyson", - author_email="code@adamltyson.com", - license="BSD-3-Clause", - description="Read and write files from the BrainGlobe neuroanatomy suite", - long_description=long_description, - long_description_content_type="text/markdown", - packages=find_packages(), - python_requires=">=3.6", - install_requires=requirements, - extras_require={ - "dev": [ - "black", - "pytest-cov", - "pytest", - "gitpython", - "coverage>=5.0.3", - "bump2version", - "pre-commit", - "flake8", - ] - }, - url="https://brainglobe.info", - project_urls={ - "Source Code": "https://github.com/brainglobe/brainglobe-napari-io", - "Bug Tracker": ( - "https://github.com/brainglobe/brainglobe-napari-io/issues" - ), - "Documentation": "https://docs.brainglobe.info", - "User Support": "https://forum.image.sc/tag/brainglobe", - "Twitter": "https://twitter.com/brain_globe", - }, - classifiers=[ - "Development Status :: 4 - Beta", - "Framework :: napari", - "Topic :: Scientific/Engineering :: Image Recognition", - "Intended Audience :: Developers", - "Intended Audience :: Science/Research", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Operating System :: OS Independent", - ], - entry_points={ - "napari.manifest": [ - "brainglobe-napari-io = brainglobe_napari_io:napari.yaml", - ], - }, - package_data={"brainglobe_napari_io": ["napari.yaml"]}, -)