Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
114 lines (103 loc) · 3.59 KB
/
Copy pathpyproject.toml
File metadata and controls
114 lines (103 loc) · 3.59 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
# Project configuration for tools only, not for distribution
[project]
name = "monitoring-scripts-py"
version = "0.1.0"
description = "Monitoring scripts for blockchain protocols"
readme = "README.md"
license = "AGPL-3.0-only"
requires-python = ">=3.14"
# Direct dependencies only (what the code imports); uv.lock pins and hashes the
# transitive tree.
dependencies = [
"eth-abi==6.0.0",
"eth-typing==6.0.0",
"eth-utils==6.0.0",
"hexbytes==2.0.0",
"python-dotenv==1.2.4",
"pyyaml==6.0.3",
"requests==2.34.2",
"web3==8.0.0",
"websockets==17.4",
]
[project.optional-dependencies]
ai = [
"anthropic==2.9.0",
"openai==3.52.0",
]
dev = [
"anthropic==2.9.0",
"openai==3.52.0",
"pytest==9.2.0",
"ruff==0.17.5",
"ty==0.0.104",
"types-pyyaml==6.0.12.20261113",
"types-requests==2.33.0.20261030",
"zizmor==1.32.0",
]
[tool.uv]
# Hashed `build-constraint-dependencies` below need uv >= 0.13; older uv fails to
# parse this file. Keep in sync with UV_VERSION in deploy/install.sh and CI.
required-version = ">=0.13.9"
# Supply-chain hardening: never resolve packages that were uploaded
# less than 7 days ago. Mirrors the `min-release-age=7` rule used in
# yearn/risk-score's pnpm setup. Accepts a friendly duration ("1 week")
# or ISO 8601 (e.g. "P7D"). Applies to `uv pip install`, `uv lock`,
# `uv sync`, etc. Also settable via `UV_EXCLUDE_NEWER=1 week`.
exclude-newer = "1 week"
# Never build dependencies from sdists: a build runs arbitrary backend code and
# build backends aren't covered by uv.lock hashes. Every dependency must ship a
# wheel. The project itself has no wheel, so it is the one package built locally.
no-build = true
no-binary-package = ["monitoring-scripts-py"]
# Hash-pin the build backend used for the editable install of this project.
# When bumping, update the version in [build-system] too.
build-constraint-dependencies = [
{ requirement = "setuptools==84.2.1", hashes = [
"sha256:ca140b45d5325a9478f880e351484f62fef15f336462e449ca0c03c873d589c2",
] },
]
[build-system]
requires = ["setuptools==84.2.1"]
build-backend = "setuptools.build_meta"
# Protocol monitors live under `protocols/`; shared code under `utils/` and `automation/`.
# Namespace discovery keeps the editable-install finder in sync as protocols come and go.
# Dirs whose names aren't valid Python identifiers (e.g. `3jane`, `lrt-pegs`,`common-abi`)
# are never imported — they're reached via cwd-relative script/ABI paths — so
# they don't need a finder entry.
[tool.setuptools.packages.find]
where = ["."]
include = ["protocols*", "utils*", "automation*", "api*"]
namespaces = true
[tool.ruff]
# Longer line length for better readability
line-length = 120
target-version = "py314"
# Exclude a variety of commonly ignored directories
exclude = [
".git",
".ruff_cache",
".venv",
"venv",
"__pypackages__",
]
[tool.ruff.lint]
# Enable these rules
select = ["E", "F", "I", "W"] # pycodestyle, pyflakes, isort, and warnings
# Allow unused variables when underscore-prefixed
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
ignore = ['E501']
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "auto"
skip-magic-trailing-comma = false
[tool.ty.rules]
possibly-missing-attribute = "error"
possibly-unresolved-reference = "error"
[tool.ty.analysis]
allowed-unresolved-imports = ["web3.**", "cytoolz.**"]
[tool.pytest.ini_options]
filterwarnings = [
# web3 imports this compatibility module; monitoring code does not use the deprecated API.
"ignore:websockets\\.legacy is deprecated:DeprecationWarning:websockets\\.legacy",
]