-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathpyproject.toml
86 lines (72 loc) · 2.65 KB
/
pyproject.toml
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
[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.9"
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:==5.1.0.post0}", "click==8.1.3"]
[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"
[tool.hatch.envs.default.scripts]
test = ["unit-tests", "script-tests"]
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",
]
[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", "pyright"]
[tool.hatch.envs.lint.scripts]
all = ["check-code", "check-wheel", "check-type"]
check-code = ["ruff check {args:.}", "black --check {args:.}"]
check-wheel = [
"hatch build",
"check-wheel-contents dist/autonity_cli-$(hatch version)-py3-none-any.whl",
]
check-type = "pyright {args:autonity_cli tests}"
format = ["black {args:.}", "ruff check --fix --select I {args:.}"]