forked from vechain/thor-devkit.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
201 lines (180 loc) · 4.79 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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
[build-system]
requires = [
'setuptools;python_version>="3.7"',
# python3.6 is legacy and doesn't support pyproject.toml properly.
# Use a backport.
'ppsetuptools;python_version<"3.7"',
# 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 = "thor-devkit"
authors = [{name = "laalaguer", email = "[email protected]"}]
readme = "README.md"
description = "SDK to interact with VeChain Thor public blockchain."
license = { file = "LICENSE" }
classifiers = [
"Programming Language :: Python :: 3",
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
]
keywords = ["vechain", "thor", "blockchain", "sdk"]
dependencies = [
'bip-utils>=1.0.5,<3.0.0',
"ecdsa>=0.16.1,<0.18.0",
'eth-abi>=2.1.1,<3.1.0',
'eth-keyfile>=0.5.0,<0.7.0',
'eth-keys>=0.3.3,<0.5.0',
'eth-utils>=1.2.0,<2.1.0',
"mnemonic>=0.19,<=0.21",
"pysha3>=1.0.2,<1.1.0",
"py-solc-x>=1.0,<1.2",
'rlp>=1.2.0,<3.1.0',
"typing_extensions>=4.1.0,<5.0.0",
"twine",
"voluptuous>=0.12.0,<0.14.0",
]
requires-python = ">=3.6.2"
[tool.setuptools.dynamic]
version = {attr = "thor_devkit.VERSION"}
[project.optional-dependencies]
test = [
'mypy>=0.942',
'pytest>=6.4.0',
"pytest-cov",
"pytest-mock",
"tox",
]
docs = [
'docutils>=0.14,<0.18', # Sphinx haven't upgraded yet
"sphinx>=4.5.0,<5.0.0",
"sphinx-rtd-theme",
"autodocsumm>=0.2.8,<0.3.0",
]
[project.urls]
Home = "https://github.com/laalaguer/thor-devkit.py"
Documentation = "https://github.com/laalaguer/thor-devkit.py" # FIXME: rtd
Source = "https://github.com/laalaguer/thor-devkit.py"
Issues = "https://github.com/laalaguer/thor-devkit.py/issues"
[tool.pytest.ini_options]
addopts = """
--cov=thor_devkit
--no-cov-on-fail
--cov-report=term-missing
--cov-branch
--doctest-modules
--doctest-continue-on-failure
--ignore=docs
"""
[tool.coverage.run]
omit = [
"tests/*",
"thor_devkit/deprecation.py",
]
[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',
# Deprecated stuff
"@deprecated_to_property",
"@renamed_function",
"@renamed_method",
"@renamed_class",
"@deprecated",
# Typing artifact, that has no implementation
"@overload",
# Typing artifact, False at runtime
'if (typing\.)?TYPE_CHECKING:'
]
[tool.mypy]
allow_redefinition = true
check_untyped_defs = true
ignore_missing_imports = true
incremental = true
strict_optional = true
no_implicit_optional = true
show_traceback = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true
warn_unreachable = true
exclude = [
"docs/*", # No plans to typecheck sphinx plugins
]
# Enforce stricter validation for library code
[[tool.mypy.overrides]]
module = "thor_devkit.*"
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_any_generics = true
warn_no_return = 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.
"E203", # Invalid. Expressions like `[len(x) :]` conform with PEP8, but raise this.
]
# Ignore
per-file-ignores = [
"tests/*:D,RST", # We don't care about docstrings in tests.
]
max-complexity = 12
# Docstring validation
rst-directives = [
"versionadded",
"versionchanged",
"deprecated",
"code-block",
# autodocsumm plugin
"autoclasssumm",
# From custom plugin
"customtox-exclude",
"customtox-exclude-children",
"customtox-include",
"customtox-include-children",
]
docstring-convention = "numpy"
[tool.isort]
profile = "black"
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = clean,py36,py37,py38,py39,py310
[testenv]
deps = .[test]
commands = pytest --cov-append
[testenv:clean]
deps = coverage[toml]
skip_install = true
commands = coverage erase
"""