diff --git a/.napari-hub/DESCRIPTION.md b/.napari-hub/DESCRIPTION.md deleted file mode 100644 index 7ecdd97..0000000 --- a/.napari-hub/DESCRIPTION.md +++ /dev/null @@ -1,9 +0,0 @@ - - -The developer has not yet provided a napari-hub specific description. diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ce6cc96..26d04f2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,18 +7,12 @@ repos: - id: trailing-whitespace exclude: ^\.napari-hub/.* - id: check-yaml # checks for correct yaml syntax for github actions ex. - - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.256 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.4.7 hooks: - id: ruff - - repo: https://github.com/psf/black - rev: 22.3.0 - hooks: - - id: black - - repo: https://github.com/tlambert03/napari-plugin-checks - rev: v0.3.0 - hooks: - - id: napari-plugin-checks + args: [--fix] + - id: ruff-format # https://mypy.readthedocs.io/en/stable/introduction.html # you may wish to add this as well! # - repo: https://github.com/pre-commit/mirrors-mypy diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index f3155af..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,5 +0,0 @@ -include LICENSE -include README.md - -recursive-exclude * __pycache__ -recursive-exclude * *.py[co] diff --git a/pyproject.toml b/pyproject.toml index 505b352..433e404 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,41 +1,64 @@ [build-system] -requires = ["setuptools>=64", "wheel", "setuptools_scm>=8"] +requires = ["setuptools>=70", "setuptools-scm>=8"] build-backend = "setuptools.build_meta" -[tool.setuptools_scm] - -[tool.black] -line-length = 79 -target-version = ['py38', 'py39', 'py310'] +[project] +name = "motile-plugin" +dynamic = ["version"] +description = "Tracking with motile" +readme = "README.md" +license = { text = "BSD 3-Clause License" } +requires-python = ">=3.10" +authors = [ + { name = "Caroline Malin-Mayor", email = "malinmayorc@janelia.hhmi.org" }, +] +classifiers = [ + "Development Status :: 2 - Pre-Alpha", + "Framework :: napari", + "Intended Audience :: Developers", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Topic :: Scientific/Engineering :: Image Processing", +] -[tool.ruff] -line-length = 79 - -exclude = [ - ".bzr", - ".direnv", - ".eggs", - ".git", - ".mypy_cache", - ".pants.d", - ".ruff_cache", - ".svn", - ".tox", - ".venv", - "__pypackages__", - "_build", - "buck-out", - "build", - "dist", - "node_modules", - "venv", - "*vendored*", - "*_vendor*", +dependencies =[ + "napari[all]", + "numpy", + "magicgui", + "qtpy", + "scikit-image", + "motile >= 0.3", + "motile_toolbox >=0.3.3", + "pydantic", + "tifffile[all]", + "fonticon-fontawesome6", + "pyqtgraph", + "lxml_html_clean", # only to deal with napari dependencies being broken ] +[project.optional-dependencies] +testing =["napari", "pyqt5", "pytest", "pytest-cov", "pytest-qt"] +docs = ["myst-parser", "sphinx", "sphinx-autoapi", "sphinx_rtd_theme", "sphinxcontrib-video"] + +[project.entry-points."napari.manifest"] +motile-plugin = "motile_plugin:napari.yaml" -target-version = "py38" +[project.urls] +"Bug Tracker" = "https://github.com/funkelab/motile-napari-plugin/issues" +"Documentation" ="https://funkelab.github.io/motile_napari_plugin/" + +[tool.setuptools_scm] + +[tool.ruff] +line-length = 88 +target-version = "py310" fix = true +[tool.ruff.lint] select = [ "E", "F", "W", #flake8 "UP", # pyupgrade @@ -51,10 +74,15 @@ select = [ ] ignore = [ - "E501", # line too long. let black handle this "UP006", "UP007", # type annotation. As using magicgui require runtime type annotation then we disable this. - "SIM117", # flake8-simplify - some of merged with statements are not looking great with black, reanble after drop python 3.9 + "ISC001", # implicit string concatenation ] +[tool.ruff.lint.per-file-ignores] +"scripts/*.py" = ["F"] + +# https://docs.astral.sh/ruff/formatter/ +[tool.ruff.format] + [tool.mypy] ignore_missing_imports = true diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 1bb8e56..0000000 --- a/setup.cfg +++ /dev/null @@ -1,76 +0,0 @@ -[metadata] -name = motile-plugin -version = attr: motile_plugin.__version__ -description = Tracking with motile -long_description = file: README.md -long_description_content_type = text/markdown -url = https://github.com/funkelab/motile-napari-plugin -author = Caroline Malin-Mayor -author_email = malinmayorc@janelia.hhmi.org -license = BSD-3-Clause -license_files = LICENSE -classifiers = - Development Status :: 2 - Pre-Alpha - Framework :: napari - Intended Audience :: Developers - License :: OSI Approved :: BSD License - Operating System :: OS Independent - Programming Language :: Python - Programming Language :: Python :: 3 - Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - Topic :: Scientific/Engineering :: Image Processing -project_urls = - Bug Tracker = https://github.com/funkelab/motile-napari-plugin/issues - Documentation = https://github.com/funkelab/motile-napari-plugin#README.md - Source Code = https://github.com/funkelab/motile-napari-plugin - User Support = https://github.com/funkelab/motile-napari-plugin/issues - -[options] -packages = find: -install_requires = - napari[all] - numpy - magicgui - qtpy - scikit-image - motile >= 0.3 - motile_toolbox >= 0.3.3 - pydantic - tifffile[all] - fonticon-fontawesome6 - pyqtgraph - lxml_html_clean # only to deal with napari dependencies being broken - -python_requires = >=3.10 -include_package_data = True -package_dir = - =src - -# add your package requirements here - -[options.packages.find] -where = src - -[options.entry_points] -napari.manifest = - motile-plugin = motile_plugin:napari.yaml - -[options.extras_require] -testing = - pytest # https://docs.pytest.org/en/latest/contents.html - pytest-cov # https://pytest-cov.readthedocs.io/en/latest/ - pytest-qt # https://pytest-qt.readthedocs.io/en/latest/ - napari - pyqt5 - -docs = - sphinx - sphinx-autoapi - sphinx_rtd_theme - myst-parser - sphinxcontrib-video - -[options.package_data] -* = *.yaml