forked from pi-node/pi-node
-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathpyproject.toml
More file actions
218 lines (195 loc) · 5.2 KB
/
pyproject.toml
File metadata and controls
218 lines (195 loc) · 5.2 KB
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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "pidex-sdk"
dynamic = ["version"]
description = "PiDex SDK - Pi Network Supernode + Stellar DEX Client"
readme = "README.md"
license = {text = "MIT"}
authors = [
{name = "PiDex Team", email = "[email protected]"}
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Internet :: WWW/HTTP",
"Typing :: Typed"
]
requires-python = ">=3.10"
dependencies = [
"pydantic>=2.5.0",
"httpx[http2]>=0.27.0",
"stellar-sdk>=10.0.0",
"cryptography>=42.0.0",
"tenacity>=8.5.0",
"typing_extensions>=4.8.0"
]
[project.optional-dependencies]
dev = [
"pytest>=7.4.0",
"pytest-asyncio>=0.23.0",
"pytest-cov>=4.1.0",
"black>=24.0.0",
"ruff>=0.3.0",
"mypy>=1.8.0",
"httpx[http2]",
"mkdocs>=1.5.0",
"mkdocs-material>=9.0.0"
]
stellar = [
"stellar-sdk>=10.0.0",
"httpx[http2]>=0.27.0"
]
supernode = [
"grpcio>=1.60.0",
"grpcio-tools>=1.60.0"
]
full = [
"pidex-sdk[dev,stellar,supernode]"
]
docs = [
"mkdocs>=1.5.0",
"mkdocs-material>=9.0.0",
"mkdocstrings[python]>=0.24.0"
]
[project.urls]
Homepage = "https://github.com/KOSASIH/pi-supernode/tree/main/pidex_sdk"
Documentation = "https://pidex.network/docs"
Repository = "https://github.com/KOSASIH/pi-supernode.git"
"Release Notes" = "https://github.com/KOSASIH/pi-supernode/releases"
[project.scripts]
pidex = "pidex_sdk.cli:main"
[tool.hatch.version]
path = "src/pidex_sdk/__init__.py"
[tool.hatch.build.targets.sdist]
include = ["/src", "/README.md", "/LICENSE"]
[tool.hatch.build.targets.wheel]
packages = ["src/pidex_sdk"]
# ========================================
# 🧪 TESTING CONFIGURATION
# ========================================
[tool.pytest.ini_options]
minversion = "7.4"
addopts = [
"--strict-markers",
"--strict-config",
"--asyncio-mode=auto",
"-v",
"--cov=src/pidex_sdk",
"--cov-report=html",
"--cov-report=term-missing"
]
testpaths = ["tests"]
markers = [
"stellar: Stellar DEX tests (requires internet)",
"supernode: Pi supernode tests",
"slow: Slow integration tests"
]
asyncio_max_concurrency = 10
[tool.coverage.run]
source = ["src/pidex_sdk"]
omit = ["*/tests/*", "*/__init__.py"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:"
]
fail_under = 92
# ========================================
# 🎨 CODE QUALITY
# ========================================
[tool.black]
target-version = ['py310']
include = '\.pyi?$'
line-length = 100
skip-string-normalization = true
[tool.ruff]
line-length = 100
target-version = "py310"
select = [
"E", "F", "W", "I", "UP", # Pyflakes, pycodestyle, warnings, isort, pyupgrade
"B", "Q", # flake8-bugbear, flake8-quotes
"S", "T20", # bandit, flake8-print
"TID", "TCH", "TJ", # flake8-tidy-imports, flake8-comprehensions, flake8-toosimple
"ARG", "PTH", "ERA", # flake8-unused-arguments, pathlib, eradicate
"PD", "PGH", "PIE", "PL", # Pydantic, pygrep-hooks, flake8-pie, pytest
"NPY", "PDM", "C4", "NNN", # NumPy, pandas, comprehensions, naming
"SIM", "ASYNC", # Perflint, async
]
ignore = [
"E501", # line too long (black handles)
"B008", # Do not perform lambda assignment (allow for decorators)
]
[tool.ruff.mccabe]
max-complexity = 12
[tool.ruff.pydocstyle]
convention = "google"
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
[[tool.mypy.overrides]]
module = [
"stellar_sdk.*",
"httpx.*",
"grpc.*"
]
ignore_missing_imports = true
# ========================================
# 📚 DOCUMENTATION
# ========================================
[tool.mkdocs]
docs_dir = "docs"
[tool.mkdocs.plugins]
mkdocstrings = {
"handlers": {
"python": {
"options": {
"show_source": true,
"show_signature_annotations": true,
"members_order": "source"
}
}
}
}
[tool.setuptools.packages.find]
where = ["src"]
include = ["pidex_sdk*"]
# ========================================
# 🔒 SECURITY & DEPENDENCY SCANNING
# ========================================
[tool.meltano]
plugins = {
"safety": {
"pip_url": "pip://safety",
"config": {
"full-test": true,
"ignore-vuln": "no-known-vuln"
}
}
}
[tool.check-wheel-contents]
# Enforce source/package purity
dist-info-only = false
[tool.hatch.envs.default]
dependencies = [
"hatchling",
"ruff>=0.3.0"
]
[tool.hatch.envs.default.scripts]
fmt = "ruff check --fix --exit-zero"
lint = "ruff check"
lint-cov = "ruff check --output-format=github --exit-zero"
mypy = "mypy src tests"
mypy-report = "mypy src --html-report mypy_html"
check = ["fmt", "lint", "mypy"]