content: [project]
  name = "zakuchess"
  version = "0.1.0"
  description = "A daily chess challenge, where pieces are heroic-fantasy characters."
  license = { text = "GPL-3.0-or-later" }
  authors = [
      {name = "Olivier Philippon", email = "olivier@dunsap.com"},
  ]
  readme = "README.md"
  
  requires-python = ">=3.11"
  
  dependencies= [
      "Django==5.1.*",
      # Django doesn't follow SemVer, so we need to specify the minor version
      "gunicorn==22.*",
      "django-alive==1.*",
      "chess==1.*",
      "django-htmx==1.*",
      "dominate==2.*",
      "dj-database-url==2.*",
      "requests==2.*",
      "django-axes[ipware]==6.*",
      "whitenoise==6.*",
      "django-import-export==3.*",
      "msgspec==0.18.*",
      "zakuchess",
  ]
  
  
  [project.optional-dependencies]
  dev = [
      "python-dotenv==1.*",
      "ruff==0.6.*",
      "mypy==1.*",
      "pre-commit==3.*",
      "ipython==8.*",
      "types-requests==2.*",
      "django-extensions==3.*",
      # (httpx is only used in "scripts/download_assets.py" for parallel downloads)
      "httpx==0.26.*",
      "sqlite-utils==3.*",
  ]
  test = [
      "pytest==7.*",
      "pytest-django==4.*",
      "pytest-cov==4.*",
      "time-machine==2.*",
  ]
  load-testing = [
      "locust==2.*",
  ]
  
  
  [project.urls]
  Website = "https://zakuchess.com"
  Repository = "https://github.com/olivierphi/zakuchess"
  
  
  [tool.uv]
  package = true # symlinks the project's "src/" root folder to the venv
  
  
  [tool.ruff]
  # @link https://docs.astral.sh/ruff/configuration/
  target-version = "py311"
  exclude = [
      "src/project/settings",
  ]
  
  [tool.ruff.lint]
  ignore = ["E501"]
  select = [
      "F", # flake8
      "I", # isort
      # https://docs.astral.sh/ruff/rules/#flake8-type-checking-tch
      "TCH001", 
      "TCH002", 
      "TCH003", 
  ]
  [tool.ruff.lint.per-file-ignores]
  "src/project/settings/*" = ["F405"]
  "src/lib/chess_engines/sunfish/sunfish.py" = ["F841", "F821"]
  
  [tool.ruff.lint.isort]
  # https://docs.astral.sh/ruff/settings/#lintisort
  combine-as-imports = true
  known-first-party = ["apps", "lib", "project"]
  
  [tool.ruff.lint.flake8-type-checking]
  # https://docs.astral.sh/ruff/settings/#lintflake8-type-checking
  quote-annotations = true
  strict = true
  runtime-evaluated-base-classes = ["msgspec.Struct"]
  
  
  [tool.mypy]
  # @link https://mypy.readthedocs.io/en/stable/config_file.html#using-a-pyproject-toml
  python_version = "3.11"
  mypy_path = "src/"
  exclude = [
      '^src/project/settings/.*\.py$',
      '^src/apps/[^/]+/migrations/.*\.py$',
      '^src/lib/chess_engines/[^/]+/.*\.py$',
      '^locustfile\.py$',
      '^scripts/load_testing/*\.py$',
  ]
  [[tool.mypy.overrides]]
  module = [
      "django.*",
      "dominate.*",
      "import_export.*",
      "time_machine.*",
  ]
  ignore_missing_imports = true
  
  [tool.pytest.ini_options]
  pythonpath = "src"
  testpaths = [
      "src/apps/*/tests/",
      "src/project/tests/",
  ]
  python_files = ["test_*.py"]
  addopts = "--reuse-db"
  DJANGO_SETTINGS_MODULE = "project.settings.test"
  
  [tool.coverage.run]
  # @link https://coverage.readthedocs.io/en/latest/excluding.html
  # @link https://coverage.readthedocs.io/en/latest/source.html
  omit = [
      # omit tests themselves from the coverage measure:
      "src/apps/*/tests/**/*.py",
      "src/project/tests/**/*.py",
      # also exclude Django settings:
      "src/project/settings/*.py",
  ]
  