content: [project]
  name = "{{cookiecutter.plugin_name}}"
  dynamic = ["version"]
  description = "{{cookiecutter.short_description}}"
  readme = "README.md"
  license = {file = "LICENSE"}
  authors = [
    {name = "{{cookiecutter.full_name}}"},
    {email = "{{cookiecutter.email}}"},
  ]
  classifiers = [
      "Development Status :: 2 - Pre-Alpha",
      "Framework :: napari",
      "Intended Audience :: Developers",
      {% if cookiecutter.license == "MIT" -%}
      "License :: OSI Approved :: MIT License",
      {%- elif cookiecutter.license == "BSD-3" -%}
      "License :: OSI Approved :: BSD License",
      {%- elif cookiecutter.license == "GNU GPL v3.0" -%}
      "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
      {%- elif cookiecutter.license == "GNU LGPL v3.0" -%}
      "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
      {%- elif cookiecutter.license == "Apache Software License 2.0" -%}
      "License :: OSI Approved :: Apache Software License",
      {%- elif cookiecutter.license == "Mozilla Public License 2.0" -%}
      "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
      {%- endif %}
      "Operating System :: OS Independent",
      "Programming Language :: Python",
      "Programming Language :: Python :: 3",
      "Programming Language :: Python :: 3 :: Only",
      "Programming Language :: Python :: 3.9",
      "Programming Language :: Python :: 3.10",
      "Programming Language :: Python :: 3.11",
      "Programming Language :: Python :: 3.12",
      "Topic :: Scientific/Engineering :: Image Processing",
  ]
  requires-python = ">=3.9"
  dependencies = [
      "numpy",
  {% if cookiecutter.include_widget_plugin == 'y' %}    "magicgui",
      "qtpy",
      "scikit-image",
  {% endif %}]
  
  [project.optional-dependencies]
  testing = [
      "tox",
      "pytest",  # https://docs.pytest.org/en/latest/contents.html
      "pytest-cov",  # https://pytest-cov.readthedocs.io/en/latest/
  {% if cookiecutter.include_widget_plugin == 'y' %}    "pytest-qt",  # https://pytest-qt.readthedocs.io/en/latest/
      "napari",
      "pyqt5",
  {% endif %}]
  
  [project.entry-points."napari.manifest"]
  {{cookiecutter.plugin_name}} = "{{cookiecutter.module_name}}:napari.yaml"
  
  {% if cookiecutter.github_repository_url != 'provide later' -%}
  [project.urls]
  "Bug Tracker" = "https://github.com/{{cookiecutter.github_username_or_organization}}/{{cookiecutter.plugin_name}}/issues"
  "Documentation" = "https://github.com/{{cookiecutter.github_username_or_organization}}/{{cookiecutter.plugin_name}}#README.md"
  "Source Code" = "https://github.com/{{cookiecutter.github_username_or_organization}}/{{cookiecutter.plugin_name}}"
  "User Support" = "https://github.com/{{cookiecutter.github_username_or_organization}}/{{cookiecutter.plugin_name}}/issues"
  {%- endif %}
  
  [build-system]
  {% if cookiecutter.use_git_tags_for_versioning == 'y' -%}
  requires = ["setuptools>=42.0.0", "wheel", "setuptools_scm"]
  {%- else -%}
  requires = ["setuptools>=42.0.0", "wheel"]
  {%- endif %}
  build-backend = "setuptools.build_meta"
  
  [tool.setuptools]
  include-package-data = true
  
  [tool.setuptools.packages.find]
  where = ["src"]
  
  [tool.setuptools.package-data]
  "*" = ["*.yaml"]
  
  {% if cookiecutter.use_git_tags_for_versioning == 'y' %}
  [tool.setuptools_scm]
  write_to = "src/{{cookiecutter.module_name}}/_version.py"
  {% else %}
  [tool.setuptools.dynamic]
  version = {attr = "{{cookiecutter.module_name}}.__init__.__version__"}
  {%- endif %}
  
  [tool.black]
  line-length = 79
  target-version = ['py38', 'py39', 'py310']
  
  [tool.ruff]
  line-length = 79
  lint.select = [
      "E", "F", "W", #flake8
      "UP", # pyupgrade
      "I", # isort
      "BLE", # flake8-blind-exception
      "B", # flake8-bugbear
      "A", # flake8-builtins
      "C4", # flake8-comprehensions
      "ISC", # flake8-implicit-str-concat
      "G", # flake8-logging-format
      "PIE", # flake8-pie
      "SIM", # flake8-simplify
  ]
  lint.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
  ]
  
  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*",
  ]
  
  target-version = "py38"
  fix = true
  