-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathpyproject.toml
More file actions
150 lines (129 loc) · 5.05 KB
/
Copy pathpyproject.toml
File metadata and controls
150 lines (129 loc) · 5.05 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
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
[build-system]
requires = ["setuptools>=65.0.0", "wheel", "setuptools-git-versioning"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
[tool.setuptools.packages.find]
where = ["src"]
namespaces = false
[tool.setuptools-git-versioning]
enabled = true
[tool.setuptools.package-data]
choreographer = ['resources/last_known_good_chrome.json']
[project]
name = "choreographer"
description = "Devtools Protocol implementation for chrome."
readme = "README.md"
requires-python = ">=3.9"
license = "MIT"
license-files = [ "LICENSE.md" ]
dynamic = ["version"]
authors = [
{name = "Andrew Pikul", email="ajpikul@gmail.com"},
{name = "Neyberson Atencio", email="neyberatencio@gmail.com"}
]
maintainers = [
{name = "Andrew Pikul", email = "ajpikul@gmail.com"},
]
dependencies = [
"logistro>=2.0.1",
"platformdirs>=4.3.6",
"simplejson>=3.19.3",
]
[project.urls]
Homepage = "https://github.com/plotly/choreographer"
Repository = "https://github.com/plotly/choreographer"
[project.scripts]
choreo_diagnose = "choreographer.cli._cli_utils_no_qa:diagnose"
choreo_get_chrome = "choreographer.cli._cli_utils:get_chrome_cli"
[dependency-groups]
dev = [
"async-timeout",
"numpy; python_version < '3.11'",
"numpy>=2.3.3; python_version >= '3.11'",
"mypy>=1.14.1",
"types-simplejson>=3.19.0.20241221",
"poethepoet>=0.30.0",
"pyright>=1.1.406",
"pytest",
"pytest-asyncio; python_version < '3.14'",
"pytest-asyncio>=1.2.0; python_version >= '3.14'",
"pytest-xdist",
"typing-extensions>=4.13.2",
]
# uv doens't allow dependency groups to have separate python requirements
# it resolves everything all at once
# this group we need to require higher python
# and only resolve if explicitly asked for
#docs = [
# "mkquixote @ git+ssh://git@github.com/geopozo/mkquixote; python_version >= '3.11'",
# "mkdocs>=1.6.1",
# "mkdocs-material>=9.5.49",
#]
[tool.uv.sources]
#mkquixote = { path = "../mkquixote", editable = true }
#logistro = { path = "../logistro", editable = true }
[tool.ruff]
src = ["src"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"ANN", # no types
"COM812", # manual says linter rule conflicts with formatter
"CPY001", # Don't require a copyright notice at the top of a file
"D203", # No blank before class docstring (D211 = require blank line)
"D212", # Commit message style docstring is D213, ignore D212
"EM", # allow strings in raise(), despite python being ugly about it
"G004", # fstrings in my logs
"ISC001", # manual says litner rule conflicts with formatter
"PT003", # scope="function" implied but I like readability
"RET504", # Allow else if unnecessary because more readable
"RET505", # Allow else if unnecessary because more readable
"RET506", # Allow else if unnecessary because more readable
"RET507", # Allow else if unnecessary because more readable
"RET508", # Allow else if unnecessary because more readable
"RUF012", # We don't do typing, so no typing
"SIM105", # Too opionated (try-except-pass)
"TRY003", # allow long error messages inside raise()
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"D", # ignore docstring errors
"S101", # allow assert
"INP001", # no need for __init__ in test directories
"T201", # if we're printing in tests, there is a reason
"ERA001"
]
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
log_cli = false
addopts = "--import-mode=append"
markers = [
"slow: moves enough data to be worth skipping by default (`-m 'not slow'`)",
]
# tell poe to use the env we give it, otherwise it detects uv and overrides flags
[tool.poe]
executor.type = "simple"
[tool.poe.tasks]
test_proc = "pytest --log-level=1 -W error -n auto -v -rfE --capture=fd tests/test_process.py"
test_fn = "pytest --log-level=1 -W error -n auto -v -rfE --capture=fd -m 'not slow' --ignore=tests/test_process.py"
# Skip `--log-level=1` and `-n auto` to allow slow tests to complete without
# formatting wall of text and to avoid tests using up all memory (~1GB per thread)
test_slow = "pytest -W error -v -rfE --capture=fd -m slow --ignore=tests/test_process.py"
debug-test_proc = "pytest --log-level=1 -W error -vvvx -rA --show-capture=no --capture=no tests/test_process.py"
debug-test_fn = "pytest --log-level=1 -W error -vvvx -rA --show-capture=no --capture=no -m 'not slow' --ignore=tests/test_process.py"
[tool.poe.tasks.test]
sequence = ["test_proc", "test_fn"]
help = "Run all tests quickly"
[tool.poe.tasks.debug-test]
env = { CHOREO_ENABLE_DEBUG="1" }
sequence = ["debug-test_proc", "debug-test_fn"]
help = "Run test by test, slowly, quitting after first error"
[tool.poe.tasks.filter-test]
env = { CHOREO_ENABLE_DEBUG="1" }
cmd = "pytest --log-level=1 -W error -vvvx -rA --capture=no --show-capture=no"
help = "Run any/all tests one by one with basic settings: can include filename and -k filters"
[tool.pyright]
venvPath = "."
venv = ".venv"
include = ["src", "tests"]