[build-system]
requires = [
  "sphinx-theme-builder @ https://github.com/pradyunsg/sphinx-theme-builder/archive/87214d0671c943992c05e3db01dca997e156e8d6.zip",
]
build-backend = "sphinx_theme_builder"

[tool.sphinx-theme-builder]
node-version = "16.13.2"
theme-name = "pydata_sphinx_theme"
additional-compiled-static-assets = [
  "webpack-macros.html",
  "vendor/",
  "scripts/bootstrap.js",
  "scripts/fontawesome.js",
  "locale/",
]

[project]
name = "pydata-sphinx-theme"
description = "Bootstrap-based Sphinx theme from the PyData community"
dynamic = ["version"]
readme = "README.md"
requires-python = ">=3.9"
dependencies = [
  "sphinx>=6.1",
  "beautifulsoup4",
  "docutils!=0.17.0",
  "Babel",
  "pygments>=2.7",
  "accessible-pygments",
  "typing-extensions",
]
license = { file = "LICENSE" }
maintainers = [
  { name = "Joris Van den Bossche", email = "jorisvandenbossche@gmail.com" },
]
classifiers = [
  "Development Status :: 5 - Production/Stable",
  "Programming Language :: Python :: 3",
  "Programming Language :: Python :: 3.9",
  "Programming Language :: Python :: 3.10",
  "Programming Language :: Python :: 3.11",
  "Programming Language :: Python :: 3.12",
  "Framework :: Sphinx",
  "Framework :: Sphinx :: Theme",
  "License :: OSI Approved :: BSD License",
  "Operating System :: OS Independent",
]

[project.urls]
"Source" = "https://github.com/pydata/pydata-sphinx-theme"

[project.optional-dependencies]
doc = [
  "numpydoc",
  "linkify-it-py", # for link shortening
  "rich",
  "sphinxext-rediraffe",
  "sphinx-sitemap",
  "sphinx-autoapi>=3.0.0",
  # For examples section
  "myst-parser",
  "ablog>=0.11.8",
  "jupyter_sphinx",
  "pandas",
  "plotly",
  "matplotlib",
  "numpy",
  "xarray",
  "sphinx-copybutton",
  "sphinx-design",
  "sphinx-togglebutton",
  "jupyterlite-sphinx",
  "sphinxcontrib-youtube>=1.4.1",
  "sphinx-favicon>=1.0.1",
  "ipykernel",
  "nbsphinx",
  "ipyleaflet",
  "colorama",
  "ipywidgets",
  "graphviz",
]
test = ["pytest", "pytest-cov", "pytest-regressions", "sphinx[test]"]
dev = [
  "pyyaml",
  "pre-commit",
  "pydata-sphinx-theme[doc,test]",
  "tox",
  "pandoc",
  "sphinx-theme-builder[cli]",
]
a11y = ["pytest-playwright"]
i18n = ["Babel", "jinja2"]

[project.entry-points]
"sphinx.html_themes" = { pydata_sphinx_theme = "pydata_sphinx_theme" }

[tool.doc8]
ignore = ["D001"] # we follow a 1 line = 1 paragraph style

[tool.ruff]
fix = true

[tool.ruff.lint]
ignore = [
  "E501", # line too long | Black take care of it
  "D107", # Missing docstring in `__init__` | set the docstring in the class

]
ignore-init-module-imports = true
select = ["E", "F", "W", "I", "D", "RUF"]

[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"

[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.djlint]
profile = "jinja"
extension = "html"
indent = 2
max_line_length = 120
use_gitignore = true
format_js = true
format_css = true
ignore = "H006,J018,T003,H025"

[tool.pytest.ini_options]
markers = "a11y: mark a test as an accessibility test"

[tool.coverage.run]
source = ["pydata_sphinx_theme"]
branch = true
relative_files = true

[tool.coverage.report]
fail_under = 80
show_missing = true
skip_covered = true

[tool.coverage.paths]
source = ["src", ".tox/py*/**/site-packages"]
