-
Notifications
You must be signed in to change notification settings - Fork 81
/
pyproject.toml
142 lines (121 loc) Β· 4.1 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
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
[tool.poetry]
name = "starknet-py"
version = "0.24.2"
description = "A python SDK for Starknet"
authors = ["Tomasz Rejowski <[email protected]>", "Jakub Ptak <[email protected]>"]
include = ["starknet_py", "starknet_py/utils/crypto/libcrypto_c_exports.*"]
exclude = ["starknet_py/tests/*", "starknet_py/**/*_test.py"]
packages = [
{ include = "starknet_py" }
]
license = "MIT"
readme = "README.md"
repository = "https://github.com/software-mansion/starknet.py"
documentation = "https://starknetpy.rtfd.io/"
[tool.poetry.dependencies]
python = ">=3.8, <3.13"
asgiref = "^3.4.1"
marshmallow = "^3.15.0"
marshmallow-oneofschema = "3.1.1"
typing-extensions = "^4.3.0"
marshmallow-dataclass = "<8.8.0"
poseidon-py = "0.1.5"
lark = "^1.1.5"
aiohttp = "^3.8.4"
sphinx = { version = ">=4.3.1,<8.0.0", optional = true }
enum-tools = { extras = ["sphinx"], version = "0.12.0", optional = true }
furo = { version = "^2024.5.6", optional = true }
pycryptodome = "^3.17"
crypto-cpp-py = "1.4.4"
eth-keyfile = "^0.8.1"
ledgerwallet = { version = "^0.5.0", optional = true }
bip-utils = { version = "^2.9.3", optional = true }
[tool.poetry.extras]
docs = ["sphinx", "enum-tools", "furo"]
ledger = ["ledgerwallet", "bip-utils"]
[tool.poetry.group.dev.dependencies]
pytest = "^8.2.2"
black = "^24.4.2"
poethepoet = "^0.27.0"
coverage = "^7.2.1"
pytest-asyncio = "^0.21.1"
pylint = "3.2.5"
pytest-mock = "^3.6.1"
pytest-xdist = "^3.2.1"
pyright = "1.1.371"
pytest-cov = "^5.0.0"
isort = "^5.11.4"
pytest-rerunfailures = "^14.0"
python-dotenv = "^1.0.0"
setuptools = "^70.3.0"
[tool.poe.tasks]
test = [
"clean_coverage",
"test_ci_v1 --disable-warnings -qq",
"test_ci_v2 --disable-warnings -qq",
"test_ci_on_networks --disable-warnings -qq",
"test_ci_docs_v1 --disable-warnings -qq",
"test_ci_docs_v2 --disable-warnings -qq",
"test_report --skip-covered"
]
test_ci = ["test_ci_v1", "test_ci_v2"]
test_ci_v1 = "coverage run -a -m pytest --contract_dir=v1 starknet_py --ignore=starknet_py/tests/e2e/docs --ignore=starknet_py/tests/e2e/tests_on_networks"
test_ci_v2 = "coverage run -a -m pytest --contract_dir=v2 starknet_py --ignore=starknet_py/tests/e2e/docs --ignore=starknet_py/tests/e2e/tests_on_networks"
test_ci_on_networks = "coverage run -a -m pytest --contract_dir=v2 starknet_py/tests/e2e/tests_on_networks"
test_ci_docs = ["test_ci_docs_v1", "test_ci_docs_v2"]
test_ci_docs_v1 = "coverage run -a -m pytest --contract_dir=v1 starknet_py/tests/e2e/docs"
test_ci_docs_v2 = "coverage run -a -m pytest --contract_dir=v2 starknet_py/tests/e2e/docs"
test_report = "coverage report -m"
test_html.shell = "coverage html && open ./htmlcov/index.html"
clean_coverage = "coverage erase"
docs_create = { shell = "make -C docs html" }
docs_open = { shell = "open docs/_build/html/index.html" }
lint = "pylint starknet_py"
format.shell = "isort . && black ."
format_check.shell = "isort --check . && black --check ."
format_diff.shell = "isort --diff . && black --diff ."
typecheck = "pyright starknet_py"
compile_contracts = "bash starknet_py/tests/e2e/mock/compile_contracts.sh"
circular_imports_check.shell = "poetry run pytest circular.py"
ci = ["lint", "format_check", "typecheck", "test_ci"]
precommit.sequence = ["format", "lint", "typecheck"]
precommit.ignore_fail = true
[tool.poetry.build]
generate-setup-file = true
[tool.coverage.run]
source = ["starknet_py"]
[tool.coverage.report]
omit = ["*_test.py", "test_*.py", "starknet_py/tests/*"]
skip_empty = true
[build-system]
requires = [
"setuptools",
"wheel",
"build",
"Cython",
]
build-backend = "setuptools.build_meta"
[tool.black]
target-version = ["py38"]
extend-exclude = """
crypto-cpp
"""
[tool.isort]
profile = "black"
skip_gitignore = true
[tool.pytest.ini_options]
addopts = [
"-v",
"--reruns=5",
"--only-rerun=aiohttp.client_exceptions.ClientConnectorError"
]
markers = [
"run_on_testnet: marks test that will only run on testnet (when --net=testnet)",
"run_on_devnet: marks test that will only run on devnet (when --net=devnet)"
]
[tool.pyright]
include = ["starknet_py/"]
exclude = [
"**/__pycache__",
"starknet_py/tests/e2e/docs",
]