-
Notifications
You must be signed in to change notification settings - Fork 40
/
pyproject.toml
305 lines (258 loc) · 7.73 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
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "euporie"
description = 'Euporie is a suite of terminal applications for interacting with Jupyter kernels'
readme = "README.rst"
requires-python = ">=3.8"
# license = "MIT"
keywords = ["euporie", "jupyter", "ipython", "markdown", "terminal", "notebook"]
authors = [
{ name = "Josiah Outram Halstead", email = "josiah@halstead.email" },
]
dynamic = ["version"]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"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",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Environment :: Console",
"Framework :: Jupyter",
"Topic :: Scientific/Engineering",
]
dependencies = [
"prompt-toolkit~=3.0.36",
"Pygments~=2.11",
"nbformat~=5.0",
"jupyter_client>=7.1",
"typing-extensions~=4.5",
"fastjsonschema~=2.15",
"platformdirs~=3.5",
"pyperclip~=1.8",
"imagesize~=1.3",
"markdown-it-py~=3.0",
"linkify-it-py~=2.0",
"mdit-py-plugins~=0.4.2",
"flatlatex~=0.15",
# "chafa.py~=1.1.2",
"timg~=1.1.6",
"Pillow>=9.0",
"sixelcrop~=0.1.9",
"universal-pathlib~=0.2.1",
"fsspec[http]>=2022.12.0",
"jupytext>=1.14.0",
]
[project.optional-dependencies]
hub = ["asyncssh~=2.10.1"]
[project.urls]
Documentation = "https://euporie.readthedocs.io/en/latest"
Issues = "https://github.com/joouha/euporie/issues"
Source = "https://github.com/joouha/euporie"
Changelog = "https://euporie.readthedocs.io/en/latest/pages/changelog.html"
[project.scripts]
euporie = "euporie.core.__main__:main"
euporie-console = "euporie.console.__main__:main"
euporie-notebook = "euporie.notebook.__main__:main"
euporie-preview = "euporie.preview.__main__:main"
euporie-hub = "euporie.hub.__main__:main"
[project.entry-points."euporie.apps"]
launch = "euporie.core.app.launch:LaunchApp"
console = "euporie.console.app:ConsoleApp"
notebook = "euporie.notebook.app:NotebookApp"
preview = "euporie.preview.app:PreviewApp"
hub = "euporie.hub.app:HubApp"
[project.entry-points."pygments.lexers"]
argparse = 'euporie.core.pygments:ArgparseLexer'
[project.entry-points."pygments.styles"]
euporie = 'euporie.core.pygments:EuporiePygmentsStyle'
[project.entry-points."jupyter_client.kernel_provisioners"]
logging-local-provisioner = "euporie.core.kernel.manager:LoggingLocalProvisioner"
[project.entry-points."universal_pathlib.implementations"]
untitled = "euporie.core.path:UntitledPath"
[tool.hatch.build.targets.wheel.shared-data]
"euporie/data/desktop" = "share/applications/"
[tool.hatch.version]
path = "euporie/core/__init__.py"
[tool.hatch.build]
packages = ["euporie"]
## Environment configuration ##################################################
# Default development environment
[tool.hatch.envs.default]
installer = "uv"
dev-mode = true
features = ["hub"]
# Environment for testing on various python versions
[tool.hatch.envs.multi]
installer = "uv"
[[tool.hatch.envs.multi.matrix]]
python = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.13t", "pypy3"]
# Environment used to run `hatch fmt`
[tool.hatch.envs.hatch-static-analysis]
installer = "uv"
config-path = "none" # Ignore hatch default format config
detached = true
dependencies = [
# Formatting & linting
"ruff~=0.6.8",
# Spell checking
"codespell~=2.3", "tomli~=2.0.2",
# Pre-commit hooks run in static analysis environment
"pre-commit~=3.8.0",
"pre-commit-hooks~=4.6.0",
]
[tool.hatch.envs.hatch-static-analysis.scripts]
"format-fix" = [
"ruff format{env:HATCH_FMT_ARGS} {args:.}",
]
"lint-fix" = [
"ruff check{env:HATCH_FMT_ARGS} --fix {args:.}",
"codespell -i 3 -w {args:.}",
]
"format-check" = [
"ruff format{env:HATCH_FMT_ARGS} --check --diff {args:.}",
]
"lint-check" = [
"ruff check{env:HATCH_FMT_ARGS} {args:.}",
"codespell {args:.}",
]
# Environment for running static type checking (with mypy)
[tool.hatch.envs.type]
description = "Type check the codebase."
dependencies = [
"mypy",
# Dependencies
"types-appdirs", "importlib_metadata", "types-Pillow", "sixelcrop",
# Optional dependencies
"rich", "black", "isort", "ssort",
# Non-dependencies
"html2text", "sympy"
]
[tool.hatch.envs.type.scripts]
run = "mypy {args:--namespace-packages -p euporie -p tests -p scripts}"
# Environment for running tests
[tool.hatch.envs.test]
installer = "uv"
description = "Run tests."
detached = false
dependencies = [
"pytest", "pytest-asyncio", "pytest-cov", "coverage",
# Optional non-dependencies
"python-magic", "html2text",
]
[[tool.hatch.envs.test.matrix]]
python = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy3"]
[tool.hatch.envs.test.scripts]
run = "pytest {args}"
cov = "coverage run --parallel -m pytest {args}"
# Environment for building documentation
[tool.hatch.envs.docs]
installer = "uv"
description = "Build documentation."
dependencies = [
"importlib_metadata",
"Sphinx~=5.3",
"sphinx-autobuild~=2024.4",
"sphinx-rtd-theme~=2.0.0",
"sphinx-argparse-cli~=1.8.3",
"sphinxext-opengraph~=0.6.2",
"sphinx-copybutton~=0.5.0",
"sphinx-design~=0.2.0",
]
[tool.hatch.envs.docs.scripts]
build = "sphinx-build docs docs/_build/html"
serve = "python -m http.server --directory docs/_build/html/"
autobuild = "sphinx-autobuild docs docs/_build/html"
# Environment for prototyping using Jupyter
[tool.hatch.envs.kernel]
installer = "uv"
description = "Euporie Jupyter kernel development environment."
dependencies = [ "ipykernel~=6.29" ]
## Tool configuration #########################################################
[tool.ruff]
line-length = 88
[tool.ruff.lint]
select = [ # "ANN", "B", "C", "D", "E", "F", "I", "Q", "S", "T", "UP"]
"ANN", #
"ASYNC", #
# "ARG", # Unused arguments
"B",
"C",
"C4",
"D",
"E",
"F",
"FA",
"G",
"I",
"PIE", # miscellaneous lints
"PT", # common style issues or inconsistencies with pytest-based tests
"PTH", # use pathlib
"Q", # quotes
"S", # bandit security testingi
"RUF", # ruff-specific
"SIM", # simplify
# "RET", # return values
"T",
"TCH", # type checking import blocks
"UP",
"W",
]
ignore = [
# Annotations on `self` and `cls`
"ANN101", "ANN102",
# Use of typing.Any
"ANN401",
# Function too complex
"C901",
# Use of assert
"S101",
# Line to long
"E501",
# Google style docstrings
"D203", "D204", "D213", "D215", "D400", "D404", "D406", "D407", "D408", "D409", "D413",
# Allow empty functions in ABCs
"B027",
# zip() without an explicit strict= parameter
"B905",
# Ignore subprocess warnings
"S603", "S607",
# Ignore ambiguous-unicode-character-string warning
"RUF001",
# Do not use `contextlib.suppress` instead of `try...except...pass`
"SIM105",
# Do not enforce ternary operators
"SIM108",
]
[tool.ruff.lint.per-file-ignores]
"scripts/*.py" = ["T201"]
[tool.ruff.format]
docstring-code-format = true
[tool.codespell]
ignore-words-list = "iterm,edn,controll,controle,als"
skip = "euporie/core/reference.py,.*"
[tool.typos.default.extend-words]
"als" = "als"
"iterm" = "iterm"
[tool.mypy]
# pretty = true
show_error_codes = true
[[tool.mypy.overrides]]
module = [
"_frozen_importlib", "ipykernel", "fastjsonschema",
"pyperclip", "upath.*", "chafa.*", "timg", "pylatexenc.*", "pygments.*",
"jupytext.*",
"ruff.*", "ssort",
"flatlatex.*", "timg", "img2unicode", "cairosvg", "teimpy", "numpy", "mtable", "imagesize", "matplotlib.*", "ziamath", "sympy.*",
"magic", "fsspec.*",
"pytest.*",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
asyncio_mode = "auto"