forked from software-mansion/starknet.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
102 lines (88 loc) · 3.21 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
[tool.poetry]
name = "starknet.py"
version = "0.4.3-alpha"
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", "starknet_py/utils/compiler/mock-contracts/**"]
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.7.2,<3.10"
asgiref = "^3.4.1"
sphinx = {version = "^4.3.1", optional = true}
enum-tools = {extras = ["sphinx"], version = "0.9.0", optional = true}
crypto-cpp-py = "^1.0.4"
marshmallow = "^3.15.0"
marshmallow-oneofschema = "^3.0.1"
cairo-lang = "0.9.1"
[tool.poetry.extras]
docs = ["sphinx", "enum-tools"]
eth-tester = ["tester"]
[tool.poetry.dev-dependencies]
pytest = "^6.2.5"
black = "^22.3.0"
poethepoet = "^0.11.0"
coverage = "^6.1.2"
pytest-asyncio = "^0.16.0"
sphinx-rtd-theme = "^1.0.0"
pylint = "2.13.5"
setuptools = "^60.0.3"
pytest-mock = "^3.6.1"
pytest-xdist = "^2.5.0"
web3 = {extras=["tester"], version="6.0.0b4"}
starknet-devnet = {git = "https://github.com/Shard-Labs/starknet-devnet.git", rev = "d5350504cfa88c2b4ccfb288680e4bf435998404"}
[tool.poe.tasks]
test = ["test_unit", "test_e2e", "test_docs"]
test_unit.shell = "coverage run -m pytest starknet_py --ignore=starknet_py/tests/e2e"
test_unit.env = { COVERAGE_FILE="unit.coverage" }
test_e2e.shell = """
coverage run -m pytest starknet_py/tests/e2e --ignore=starknet_py/tests/e2e/docs
"""
test_e2e.env = { COVERAGE_FILE="e2e.coverage", DEVNET_PORT="5001" }
test_e2e_parallel.shell = """
pytest -n auto --dist loadscope starknet_py/tests/e2e -v --ignore=starknet_py/tests/e2e/docs
"""
test_docs.shell = "coverage run -m pytest starknet_py/tests/e2e/docs"
test_docs.env = { COVERAGE_FILE="docs.coverage", DEVNET_PORT="5003" }
coverage_combine.shell = "coverage combine unit.coverage e2e.coverage docs.coverage"
test_report = [{ shell = "poe coverage_combine" }, { shell = "coverage report" }]
test_html = [
{ shell = "poe coverage_combine" },
{ shell = "coverage html && open ./htmlcov/index.html" }
]
docs_create = { shell = "make -C docs html" }
docs_open = { shell = "open docs/_build/html/index.html" }
lint = "pylint starknet_py"
format = "black starknet_py"
format_check = "black --check starknet_py"
requirements_check.shell = "poetry export -f requirements.txt --without-hashes --extras docs | cmp - requirements.txt"
ci = ["lint", "format_check", "requirements_check", "test"]
[tool.coverage.run]
source = ["starknet_py"]
[tool.coverage.report]
omit = ["*_test.py", "starknet_py/tests/e2e/*", "starknet_py/utils/docs.py"]
skip_empty = true
[build-system]
requires = [
"setuptools",
"wheel",
"build",
"Cython",
]
build-backend = "setuptools.build_meta"
[tool.black]
target-version = ["py37"]
extend-exclude = """
crypto-cpp
"""
[tool.pytest.ini_options]
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)"
]