-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathpyproject.toml
More file actions
102 lines (87 loc) · 2.92 KB
/
pyproject.toml
File metadata and controls
102 lines (87 loc) · 2.92 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "autonity-cli"
description = "Command line interface to interact with Autonity"
readme = "README.md"
license = "MIT"
keywords = ["autonity", "web3", "rpc", "cli"]
dynamic = ["version"]
requires-python = ">=3.10"
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"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",
]
dependencies = [
"autonity{env:AUTPY_VERSION:==6.0.0}",
"click~=8.1.8",
"click-option-group",
"trezor[ethereum]~=0.13.10",
]
[project.urls]
Homepage = "https://github.com/autonity/autonity-cli"
Source = "https://github.com/autonity/autonity-cli"
Issues = "https://github.com/autonity/autonity-cli/issues"
Changes = "https://github.com/autonity/autonity-cli/blob/master/CHANGELOG.md"
[project.scripts]
aut = "autonity_cli.__main__:aut"
[tool.hatch.version]
path = "autonity_cli/__version__.py"
[tool.hatch.build]
packages = ["autonity_cli"]
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.envs.default]
description = "The standard dev, build, and test environment"
dependencies = ["pyright"]
[tool.hatch.envs.default.scripts]
test = ["unit-tests", "script-tests", "check-types"]
unit-tests = "python -m unittest discover {args:tests}"
script-tests = [
"rm -rf test_*",
"hatch run ./scripts/test_contract",
"hatch run ./scripts/test_protocol",
"hatch run ./scripts/test_governance",
"hatch run ./scripts/test_validator",
"hatch run ./scripts/test_account",
"hatch run ./scripts/test_token",
]
# Keep in default env so it can be used from `github` and `local` envs.
check-types = "pyright {args}"
[tool.hatch.envs.github]
description = "Develop and build against autonity.py from Github"
[tool.hatch.envs.github.scripts]
build = "hatch build -t wheel"
[tool.hatch.envs.github.env-vars]
AUTPY_VERSION = " @ git+https://github.com/autonity/autonity.py@{env:AUTPY_GIT_COMMIT:develop}"
[tool.hatch.envs.local]
description = "Develop against a local checkout of autonity.py"
post-install-commands = [
"python -m pip install -q -e {env:AUTPY_LOCAL_PATH:{root:uri}/autonity.py}",
]
[tool.hatch.envs.lint]
description = "Run code linters"
dependencies = ["black", "check-wheel-contents", "ruff", "wheel-inspect"]
[tool.hatch.envs.lint.scripts]
all = ["check-code", "check-wheel"]
check-code = ["ruff check {args:.}", "black --check {args:.}"]
check-wheel = [
"hatch build",
"check-wheel-contents dist/autonity_cli-$(hatch version)-py3-none-any.whl",
]
fix-code = "ruff check --fix {args:.}"
format = [
"black {args:.}",
"ruff check --fix --select I {args:.}",
"RUST_LOG=warn taplo fmt pyproject.toml",
]
[tool.pyright]
include = ["autonity_cli", "tests"]
typeCheckingMode = "strict"