From 35eaef7564b19f1ce917420e0acfa840d6fc8d68 Mon Sep 17 00:00:00 2001 From: Caroline Malin-Mayor Date: Mon, 16 Sep 2024 14:33:13 -0400 Subject: [PATCH 1/5] Remove empty napari hub markdown file --- .napari-hub/DESCRIPTION.md | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 .napari-hub/DESCRIPTION.md 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. From 112a7acfdec1ed5643e6f6e471120d9edf6e4472 Mon Sep 17 00:00:00 2001 From: Caroline Malin-Mayor Date: Mon, 16 Sep 2024 16:24:35 -0400 Subject: [PATCH 2/5] Update pre-commit based on Talley's suggestions --- .pre-commit-config.yaml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) 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 From 626fc97b8e06e9ee1bc22b52d862f6285c5c3d3d Mon Sep 17 00:00:00 2001 From: Caroline Malin-Mayor Date: Mon, 16 Sep 2024 16:25:11 -0400 Subject: [PATCH 3/5] Remove manifest file --- MANIFEST.in | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 MANIFEST.in 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] From 8d6188451e8d80960ab8b25c8bac64137ff16ae2 Mon Sep 17 00:00:00 2001 From: Caroline Malin-Mayor Date: Mon, 16 Sep 2024 16:39:29 -0400 Subject: [PATCH 4/5] Update pyproject to Talley's suggestions --- pyproject.toml | 92 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 60 insertions(+), 32 deletions(-) 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 From 51066baff4c60bb0993651de8fab3cd9fbefc341 Mon Sep 17 00:00:00 2001 From: Caroline Malin-Mayor Date: Mon, 16 Sep 2024 16:39:58 -0400 Subject: [PATCH 5/5] Remove setup.cfg --- setup.cfg | 76 ------------------------------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 61d2752..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.2.5 - 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