forked from rcarmo/webterm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
117 lines (106 loc) · 2.86 KB
/
pyproject.toml
File metadata and controls
117 lines (106 loc) · 2.86 KB
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
[tool.poetry]
name = "webterm"
version = "1.2.13"
description = "Serve terminal sessions over the web"
authors = ["Will McGugan <will@textualize.io>"]
license = "MIT"
readme = "README.md"
packages = [{include = "webterm", from = "src"}]
include = [
{ path = "src/webterm/static/monospace.css" },
{ path = "src/webterm/static/js/terminal.js" },
{ path = "src/webterm/static/js/ghostty-vt.wasm" },
]
[tool.poetry.dependencies]
python = "^3.9"
aiohttp = "^3.13.0"
uvloop = { version = "^0.22.0", markers = "sys_platform != 'win32'" }
click = "^8.1.7"
pydantic = "^2.7.0"
importlib-metadata = ">=6.0.0"
tomli = { version = "^2.0.1", python = "<3.11" }
pyyaml = "^6.0.0"
pyte = "^0.8.0"
[tool.poetry.group.dev.dependencies]
pytest = "^8.0.0"
pytest-asyncio = "^0.24.0"
pytest-cov = "^6.0.0"
pytest-timeout = "^2.3.0"
ruff = "^0.9.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.scripts]
webterm = "webterm.cli:app"
[tool.ruff]
line-length = 100
target-version = "py39"
src = ["src"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
"TC", # flake8-type-checking
"PTH", # flake8-use-pathlib
"ERA", # eradicate (commented out code)
"PL", # Pylint
"RUF", # Ruff-specific rules
]
ignore = [
"E501", # line too long (handled by formatter)
"PLR0912", # too many branches
"PLR0913", # too many arguments
"PLR0915", # too many statements
"PLR2004", # magic value comparison
"ARG001", # unused function argument
"ARG002", # unused method argument
"PLC0415", # import not at top level (needed for optional deps)
]
[tool.ruff.lint.isort]
known-first-party = ["webterm"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
timeout = 30
addopts = [
"-v",
"--tb=short",
"--strict-markers",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
]
[tool.coverage.run]
source = ["src/webterm"]
branch = true
omit = [
"*/tests/*",
"*/__pycache__/*",
# Thread/FD polling integration is harder to deterministically unit test
"*/poller.py",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
"assert ",
]
# Unit test coverage target (75% due to Docker-dependent code that requires integration tests)
fail_under = 75