-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
185 lines (166 loc) · 4.66 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
[build-system]
requires = [
'setuptools',
# toml is in standard library in 3.11+
'toml>=0.10.1;python_version<"3.11"',
]
build-backend = "setuptools.build_meta"
[project]
dynamic = ["version"]
name = "evmos"
authors = [{name = "sterliakov", email = "[email protected]"}]
readme = "README.md"
description = "Python port of evmos.js - library to interact with Evmos blockchain"
license = { file = "LICENSE.md" }
classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
"Development Status :: 4 - Beta",
"Typing :: Typed",
]
keywords = ["blockchain", "sdk", "ethereum"]
dependencies = [
"eth-abi ~= 3.0",
"eth-account ~= 0.7.0",
"eth-hash ~= 0.3",
"eth-typing >= 3.1",
"eth-utils ~= 2.0",
"hexbytes ~= 0.3.0",
"bech32 ~= 1.2",
"typing_extensions ~= 4.3",
"requests ~= 2.28",
"alt-betterproto ~= 2.0.1",
]
requires-python = ">=3.8"
[tool.setuptools.dynamic]
version = {attr = "evmos.__version__"}
[project.optional-dependencies]
dev = [
"alt-betterproto[compiler] ~= 2.0.1",
"pre-commit",
]
test = [
'pytest>=6.4.0',
"pytest-cov",
"python-dotenv",
]
docs = [
'docutils >=0.16, <0.18', # Sphinx haven't upgraded yet
"sphinx >=5.1.1, <6.0",
"sphinx-rtd-theme",
]
[project.urls]
Home = "https://github.com/sterliakov/pyevmos"
Source = "https://github.com/sterliakov/pyevmos"
Issues = "https://github.com/sterliakov/pyevmos/issues"
Documentation = "https://readthedocs.org/projects/pyevmos/badge/?version=latest"
[tool.pytest.ini_options]
log_cli = true
log_cli_level = "INFO"
markers = [
'can_timeout', # takes forever to finish
'online', # write + return_transaction
'offline', # write (interacts with the chain)
'read', # read only (query)
]
addopts = """
--tb=short
--cov=evmos
--no-cov-on-fail
--cov-report=term-missing
--cov-branch
--doctest-modules
--doctest-continue-on-failure
--ignore=docs
--color=yes
"""
[tool.coverage.run]
omit = [
"tests/*",
"evmos/proto/autogen/*",
]
[tool.coverage.report]
exclude_lines = [
# Explicitly ignored
"pragma: no cover",
# Often used in abstract classes
"raise NotImplementedError",
# Debug code
'if self\.debug:',
"def __repr__",
# Scripts entrypoints
"if __name__ == .__main__.:",
# Should never run
'@(abc\.)?abstractmethod',
# Typing artifact, that has no implementation
"@overload",
# Typing artifact, False at runtime
'if (typing\.)?TYPE_CHECKING:'
]
[tool.mypy]
# This applies to all files (not very strict, used for scripts, etc.)
allow_redefinition = true
check_untyped_defs = true
ignore_missing_imports = true
incremental = true
strict_optional = true
no_implicit_optional = true
show_traceback = true
show_error_codes = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true
warn_unreachable = true
# Enforce stricter validation for library code
[[tool.mypy.overrides]]
module = "evmos.*"
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_any_generics = true
warn_no_return = true
# Do not check autogenerated stuff
[[tool.mypy.overrides]]
module = "evmos.proto.autogen.py.*"
ignore_errors = true
[tool.flake8]
exclude = """
.git,
.github,
__pycache__,
.pytest_cache,
.env,
env,
.pyenv,
pyenv,
*.egg_info,
"""
max_line_length = 88
extend_ignore = [
"SIM905", # Allow statement "hello world".split() instead of list literal
# "N806", # Allow non-"lower_underscore" variables (it's too stupid rule)
"PIE798", # Allow class with only static methods for namespacing
"D105", # Magic methods may remain unannotated
"D401", # Imperative mood of first docstring line is not always encouraged
"RST306", # Plugin can't resolve links defined in other docstrings.
"RST304", # No builtin roles, so too much to do manually.
"RST301", "RST201", # Incompatible with google doc style
"E203", # Invalid. Expressions like `[len(x) :]` conform with PEP8, but raise this.
"D100", # Modules may remain unannotated
"D104", # Packages may remain unannotated
"D107", # __init__ may remain unannotated
]
# Ignore
per-file-ignores = [
"tests/*:D,RST", # We don't care about docstrings in tests.
]
max-complexity = 10
# Docstring validation
docstring-convention = "google"
[tool.isort]
profile = "black"
add_imports = "from __future__ import annotations"