1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
|
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools",
"setuptools-scm",
]
[project]
name = "sphinx-gallery"
description = "A Sphinx extension that builds an HTML gallery of examples from any set of Python scripts."
readme = "README.rst"
license = { "text" = '3-clause BSD' }
authors = [
{ name = "Óscar Nájera", email = 'najera.oscar@gmail.com' },
]
requires-python = ">=3.8"
classifiers = [
"Development Status :: 4 - Beta",
"Framework :: Sphinx :: Extension",
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dynamic = [
"version",
]
dependencies = [
"pillow",
"sphinx>=5",
]
optional-dependencies.animations = [
"sphinxcontrib-video",
]
optional-dependencies.dev = [
"absl-py",
"graphviz",
"intersphinx-registry",
"ipython",
"joblib",
"jupyterlite-sphinx>=0.17.1",
"lxml",
"matplotlib",
"numpy",
"packaging",
"plotly",
"pydata-sphinx-theme",
"pytest",
"pytest-coverage",
"seaborn",
"sphinxcontrib-video",
"statsmodels",
]
optional-dependencies.jupyterlite = [
"jupyterlite-sphinx",
]
optional-dependencies.parallel = [
"joblib",
]
optional-dependencies.recommender = [
"numpy",
]
optional-dependencies.show_api_usage = [
"graphviz",
]
optional-dependencies.show_memory = [
"memory-profiler",
]
urls.Documentation = "https://sphinx-gallery.github.io"
urls.Source = "https://github.com/sphinx-gallery/sphinx-gallery"
scripts.sphinx_gallery_py2jupyter = "sphinx_gallery.notebook:python_to_jupyter_cli"
[tool.setuptools]
include-package-data = true
[tool.setuptools.dynamic]
version = { attr = "sphinx_gallery.__version__" }
[tool.setuptools.packages.find]
where = [
".",
] # list of folders that contain the packages (["."] by default)
include = [
"sphinx_gallery*",
] # package names should match these glob patterns (["*"] by default)
namespaces = true # allow scanning PEP 420 namespaces (true by default)
[tool.ruff]
exclude = [
"__init__.py",
"plot_syntaxerror.py",
]
lint.select = [
"D",
"E",
"F",
"W",
]
lint.ignore = [
# TODO: A lot of these we should actually fix eventually
"D105", # Missing docstring in magic method
"D401", # First line of docstring should be in imperative mood
]
lint.per-file-ignores."*examples*/*.py" = [
"D205", # 1 blank line required between summary line and description
"D400", # First line should end with a period
"E402", # Module level import not at top of file
]
lint.per-file-ignores."bin/*.py" = [
"D205", # 1 blank line required between summary line and description
"D400", # First line should end with a period
]
lint.per-file-ignores."examples/no_output/plot_syntaxerror.py" = [
"E999", # SyntaxError
]
lint.per-file-ignores."sphinx_gallery/tests/*.py" = [
"D103", # Missing docstring in public function
"E501", # line too long
]
lint.per-file-ignores."sphinx_gallery/tests/testconfs/src/*.py" = [
"D205", # 1 blank line required between summary line and description
"D400", # First line should end with a period
]
lint.per-file-ignores."tutorials/*.py" = [
"D205", # 1 blank line required between summary line and description
"D400", # First line should end with a period
"E402", # Module level import not at top of file
]
lint.per-file-ignores."tutorials/plot_parse.py" = [
"D202", # [*] No blank lines allowed after function docstring (found 1)
"D209", # Multi-line docstring closing quotes should be on a separate line
]
# Example files cannot satisfy below rules due to header and imports in code blocks
lint.pydocstyle.convention = "numpy"
[tool.codespell]
builtin = "clear,rare,informal,names,usage"
# comma separated list of words to be ignored by codespell.
# Words are case sensitive based on how they are written in the dictionary file
ignore-words-list = "master"
[tool.pytest.ini_options]
addopts = [
"--color=yes",
"--cov-report=",
"--cov=sphinx_gallery",
"--durations=5",
"-r a",
"--tb=short",
"--junit-xml=junit-results.xml",
]
python_files = "tests/*.py"
norecursedirs = "build _build auto_examples gen_modules sphinx_gallery/tests/tinybuild"
filterwarnings = [
"ignore:.*HasTraits.trait_.*:DeprecationWarning",
"ignore:.*importing the ABCs.*:DeprecationWarning",
"ignore:np.loads is deprecated, use pickle.loads instead:DeprecationWarning",
"ignore:'U' mode is deprecated:DeprecationWarning",
"ignore:node class .* is already registered.*:",
"ignore:node.Node.* is obsoleted by Node.*:",
]
junit_family = "xunit2"
markers = [
"add_conf: Configuration file.",
"add_rst: Add rst file to src.",
]
|