-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
117 lines (104 loc) · 2.96 KB
/
pyproject.toml
File metadata and controls
117 lines (104 loc) · 2.96 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
[project]
name = "fastly-compute"
version = "0.1.0"
description = "Python SDK for Fastly Compute"
readme = "README.md"
requires-python = ">=3.12"
dependencies = []
[project.optional-dependencies]
test = [
"bottle (>=0.12.25)",
"pytest (>=8.4.0,<9.0.0)",
"requests (>=2.32.5,<3.0.0)",
"tomli-w (>=1.0.0,<2.0.0)",
"syrupy (==5.0.0)",
]
dev = [
"componentize-py (>=0.19.3,<0.20)",
"ruff (>=0.12.11,<0.13.0)",
"pyrefly (>=0.49.0,<0.50)",
]
# Example dependencies - needed for type-checking examples in CI
examples = [
"flask (>=3.1.2,<4.0)",
"bottle (>=0.12.25)",
]
[tool.pytest.ini_options]
testpaths = ["fastly_compute/tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-v",
"--tb=short",
"--strict-markers",
]
[tool.ruff]
target-version = "py314"
line-length = 88
exclude = ["fastly_compute/testing/stubs"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"D", # docstrings
]
ignore = [
"E501", # line too long, handled by formatter
"UP031", # % string formatting, minimally disruptive for stdlib-based HTML templating
"D415", # Don't require punctuation at the end of a docstring summary: sometimes they are noun phrases, not sentences.
"D205", # This spuriously complains about line-wrapped single-sentence docstring summaries. Sometimes 80 chars isn't enough.
"D107", # Sometimes there's nothing non-obvious to say about a constructor.
"D105", # Usually there's nothing to say about __str__, etc.
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
exclude = ["fastly_compute/runtime_patching/patches.py"]
[tool.ruff.lint.pydocstyle]
convention = "google"
# Ignore doc lints for tests/examples
[tool.ruff.lint.per-file-ignores]
"fastly_compute/tests/*" = ["D"]
"examples/*" = ["D"]
# What can one say about __main__?
"__main__.py" = ["D100"]
[build-system]
requires = ["maturin>=1.0,<2.0"]
build-backend = "maturin"
[dependency-groups]
dev = [
"jinja2>=3.1.6",
"maturin>=1.11.5",
]
[tool.maturin]
module-name = "fastly_compute._fastly_compute_py"
manifest-path = "crates/fastly-compute-py/Cargo.toml"
exclude = ["fastly_compute/tests/**/*"]
[project.scripts]
fastly-compute-py = "fastly_compute.fastly_compute_py:main"
[tool.setuptools]
py-modules = ["app"]
[tool.pyrefly]
python-version = "3.14"
search-path = ["fastly_compute/testing/stubs"]
use-ignore-files = true
# Type-check source code, tests, and examples
project-includes = [
"fastly_compute/**/*.py",
"fastly_compute/tests/**/*.py",
"examples/**/*.py",
"scripts",
]
project-excludes = [
# CLI wrapper imports from native extension that doesn't exist until built
"fastly_compute/fastly_compute_py.py",
"fastly_compute/testing/stubs",
]