-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
242 lines (210 loc) · 5.79 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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
[build-system]
requires = ["hatchling>=1.4.0", "jupyterlab>=3.4.7,<4.0.0", "hatch-nodejs-version"]
build-backend = "hatchling.build"
[project]
name = "jupyterlab_material_night_eighties"
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.7"
classifiers = [
"Framework :: Jupyter",
"Framework :: Jupyter :: JupyterLab",
"Framework :: Jupyter :: JupyterLab :: 3",
"Framework :: Jupyter :: JupyterLab :: Extensions",
"Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dependencies = [
]
dynamic = ["version", "description", "authors", "urls", "keywords"]
[project.optional-dependencies]
test = [
"coverage",
"pytest",
"pytest-asyncio",
"pytest-cov",
"pytest-tornasync"
]
[tool.hatch.version]
source = "nodejs"
[tool.hatch.metadata.hooks.nodejs]
fields = ["description", "authors", "urls"]
[tool.hatch.build.targets.sdist]
artifacts = ["jupyterlab_material_night_eighties/labextension"]
exclude = [".github", "binder"]
[tool.hatch.build.targets.wheel.shared-data]
"jupyterlab_material_night_eighties/labextension" = "share/jupyter/labextensions/@ninerealmlabs/jupyterlab_material_night_eighties"
"install.json" = "share/jupyter/labextensions/@ninerealmlabs/jupyterlab_material_night_eighties/install.json"
[tool.hatch.build.hooks.version]
path = "jupyterlab_material_night_eighties/_version.py"
[tool.hatch.build.hooks.jupyter-builder]
dependencies = ["hatch-jupyter-builder>=0.5"]
build-function = "hatch_jupyter_builder.npm_builder"
ensured-targets = [
"jupyterlab_material_night_eighties/labextension/package.json",
]
skip-if-exists = ["jupyterlab_material_night_eighties/labextension/static/style.js"]
[tool.hatch.build.hooks.jupyter-builder.build-kwargs]
build_cmd = "build:prod"
npm = ["jlpm"]
[tool.hatch.build.hooks.jupyter-builder.editable-build-kwargs]
build_cmd = "install:extension"
npm = ["jlpm"]
source_dir = "src"
build_dir = "jupyterlab_material_night_eighties/labextension"
[tool.jupyter-releaser.options]
version_cmd = "hatch version"
[tool.jupyter-releaser.hooks]
before-build-npm = ["python -m pip install jupyterlab~=3.1", "jlpm", "jlpm build:prod"]
before-build-python = ["jlpm clean:all"]
# --- black ------------------------------------------------------------------
# ref: https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-via-a-file
[tool.black]
line-length = 100
# target-version = ['py39']
include = '\.pyi?$|\.ipynb$'
extend-exclude = '''
# # A regex preceded with ^/ will apply only to files and directories
# # in the root of the project.
# ^/foo.py # exclude a file named foo.py in the root of the project (in addition to the defaults)
\.ipynb_checkpoints$|^/\.env|^/\.git|^/\.nox|^/\.pytest_cache|^/\.tox
'''
# --- ruff -------------------------------------------------------------------
[tool.ruff]
select = [
'A', # flake8 builtins
'B', # flake8 bugbear
'C4', # flake8 comprehensions
'C90', # mccabe
'E', # pycodestyle
'F', # pyflakes
'I', # isort
'N', # pep8-naming
'W', # pycodestyle
# 'T20', # flake8 print
]
# Avoid trying to fix extension types:
unfixable = ["B"]
ignore = [
# "E203", # not in ruff
# "E265", # not in ruff
# "E266", # not in ruff
"E501", # line too long
"F401", # unused import
"F403", # import *
"F405", # defined from import *
"F541", # f-string missing placeholders
# "W503", # not in ruff
]
# [per-file-ignores]
# # Ignore `E402` (import violations) in all `__init__.py` files,
# # and in `path/to/file.py`.
# "__init__.py" = ["E402"]
# "path/to/file.py" = ["E402"]
exclude = [
"*.egg-info",
".direnv",
".eggs",
".env",
".envrc",
".git",
".ipynb_checkpoints",
".nox",
".pytest_cache",
".ruff_cache",
".tox",
".venv",
"__pypackages__",
"_build",
"ci/templates",
"build",
"dist",
"docs/conf.py",
"venv",
]
# Default autofix behavior
fix = true
# Max line length
line-length = 119
# Directories with source code
src = ["src", "tests"]
# Assumed Python version
target-version = "py39"
# --- ruff plugins --------------------
[tool.ruff.isort]
combine-as-imports = true
force-sort-within-sections = true
force-wrap-aliases = true
# extra-standard-library = ["path"]
known-first-party = ["src",]
[tool.ruff.mccabe]
max-complexity = 18
[tool.ruff.pep8-naming]
ignore-names = []
# --- pytest -----------------------------------------------------------------
# ref: https://docs.pytest.org/en/6.2.x/customize.html
[tool.pytest.ini_options]
addopts = '''
-ra
--strict-markers
--ignore=docs/conf.py
--ignore=setup.py
--ignore=ci
--ignore=.eggs
--tb=short
'''
# --doctest-modules
# --doctest-glob=\*.rst
norecursedirs = [
".env",
".git",
".nox",
".pytest_cache",
".tox",
"__pycache__",
"dist",
"docs",
"build",
"migrations",
"notebooks",
"writeup",
]
python_files = [
"test_*.py",
"*_test.py",
"tests.py",
]
testpaths = [
"tests",
]
# log_cli = true
# --- coverage ---------------------------------------------------------------
[tool.coverage.paths]
source = ["src", "*/site-packages"]
[tool.coverage.run]
branch = true
source = ["src"]
[tool.coverage.report]
show_missing = true
# --- check-manifest ---------------------------------------------------------
# ref: https://github.com/mgedmin/check-manifest
[tool.check-manifest]
ignore = [
".ci/",
"data/",
"docker/",
"functions/",
"notebooks/",
"queries/",
"writeup/",
"noxfile.py",
"*.md",
".*",
]