-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
pyproject.toml
194 lines (178 loc) · 4.95 KB
/
pyproject.toml
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
[build-system]
build-backend = "hatchling.build"
requires = [
"hatchling>=1.17",
]
[project]
name = "hatch-jupyter-builder"
description = "A hatch plugin to help build Jupyter packages"
readme = "README.md"
keywords = [
"hatch",
"jupyter",
"jupyterlab",
]
license = { file = "LICENSE.txt" }
authors = [
{ name = "Jupyter Development Team", email = "jupyter@googlegroups.com" },
]
requires-python = ">=3.8"
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dynamic = [
"version",
]
dependencies = [
"hatchling>=1.17",
]
[project.optional-dependencies]
docs = [
"hatch_jupyter_builder",
"myst-parser",
"pydata-sphinx-theme",
"sphinx-autodoc-typehints",
"sphinxcontrib-spelling",
]
test = [
"hatch",
"pytest",
"pytest-cov",
"pytest-mock",
"tomli;python_version<'3.11'",
"twine",
]
[project.urls]
Documentation = "https://github.com/jupyterlab/hatch-jupyter-builder#readme"
Issues = "https://github.com/jupyterlab/hatch-jupyter-builder/issues"
Source = "https://github.com/jupyterlab/hatch-jupyter-builder"
[project.scripts]
hatch-jupyter-builder = 'hatch_jupyter_builder.cli:run'
[project.entry-points.hatch]
jupyter = "hatch_jupyter_builder.hooks"
[tool.hatch.version]
path = "hatch_jupyter_builder/__init__.py"
[tool.hatch.envs.docs]
features = ["docs"]
[tool.hatch.envs.docs.env-vars]
SPHINXOPTS = "-W"
[tool.hatch.envs.docs.scripts]
build = "make -C docs html"
api = "sphinx-apidoc -o docs/source/reference/api -f -E hatch_jupyter_builder hatch_jupyter_builder/migrate/jupyter_packaging.py"
[tool.hatch.envs.test]
features = ["test"]
[tool.hatch.envs.test.scripts]
test = "python -m pytest -vv {args}"
nowarn = "python -m pytest -vv -W default {args}"
[tool.hatch.envs.cov]
features = ["test"]
dependencies = ["coverage", "pytest-cov"]
[tool.hatch.envs.cov.scripts]
test = "python -m pytest -vv --cov hatch_jupyter_builder --cov-branch --cov-report term-missing:skip-covered {args}"
[tool.hatch.envs.migration]
features = ["test"]
dependencies = ["pytest-xdist[psutil]"]
[tool.hatch.envs.migration.scripts]
test = "python -m pytest -n auto -vv --migration-tests True"
[tool.hatch.envs.typing]
dependencies = ["pre-commit"]
detached = true
[tool.hatch.envs.typing.scripts]
test = "pre-commit run --all-files --hook-stage manual mypy"
[tool.hatch.envs.lint]
dependencies = ["pre-commit"]
detached = true
[tool.hatch.envs.lint.scripts]
build = [
"pre-commit run --all-files ruff",
"pre-commit run --all-files ruff-format",
]
[tool.ruff]
line-length = 100
[tool.ruff.lint]
select = [
"B", # flake8-bugbear
"I", # isort
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"T20", # flake8-print
"UP", # pyupgrade
"YTT", # flake8-2020
"EXE", # flake8-executable
"NPY", # NumPy specific rules
"PD", # pandas-vet
"PYI", # flake8-pyi
]
ignore = [
"PLR", # Design related pylint codes
"B027", # Allow non-abstract empty methods in abstract base classes
"SIM105", # SIM105 Use `contextlib.suppress(...)`
]
unfixable = [
# Don't touch print statements
"T201",
# Don't touch noqa lines
"RUF100",
]
[tool.ruff.lint.per-file-ignores]
# B011 Do not call assert False since python -O removes these calls
# T201 `print` found
# B018 Found useless expression
# PT011 `pytest.raises(ValueError)` is too broad
"tests/*" = ["B011", "B018", "C4", "T201", "PTH", "EM", "PT011", "ARG"]
[tool.pytest.ini_options]
minversion = "6.0"
xfail_strict = true
log_cli_level = "info"
addopts = [
"-raXs", "--durations=10", "--color=yes", "--doctest-modules",
"--showlocals", "--strict-markers", "--strict-config"
]
testpaths = [
"tests/"
]
norecursedirs = "tests/data/*"
filterwarnings = [
"error"
]
[tool.coverage.run]
omit = [
"hatch_jupyter_builder/cli.py",
"hatch_jupyter_builder/migrate/*",
"hatch_jupyter_builder/compare_migrated/*"
]
relative_files = true
source = ["hatch_jupyter_builder"]
[tool.mypy]
python_version = "3.8"
strict = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
warn_unreachable = true
files = ["hatch_jupyter_builder"]
[tool.interrogate]
ignore-init-module=true
ignore-private=true
ignore-semiprivate=true
ignore-property-decorators=true
ignore-nested-functions=true
ignore-nested-classes=true
fail-under=100
exclude = ["docs", "tests"]
[tool.repo-review]
ignore = ["GH102"]