-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy pathpyproject.toml
More file actions
137 lines (119 loc) · 3.12 KB
/
pyproject.toml
File metadata and controls
137 lines (119 loc) · 3.12 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
# SPDX-FileCopyrightText: © 2024-2025 Phala Network <[email protected]>
#
# SPDX-License-Identifier: Apache-2.0
[project]
name = "dstack-sdk"
version = "0.5.3"
description = "dstack SDK for Python"
authors = [
]
dependencies = [
"httpx>=0.27.2",
"asyncio>=3.4.3",
"pydantic>=2.9.2",
"cryptography>=43.0.0",
]
requires-python = ">=3.10"
readme = "README.md"
license = {text = "Apache-2.0"}
[project.optional-dependencies]
solana = ["solders"]
ethereum = ["web3"]
sol = ["solders"]
eth = ["web3"]
all = ["solders", "web3"]
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[dependency-groups]
lint = [
"mypy>=1.8.0",
]
solana = [
"solders",
]
ethereum = [
"web3",
]
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_equality = true
show_error_codes = true
# Ruff configuration
[tool.ruff]
line-length = 88
target-version = "py310"
[tool.ruff.lint]
extend-select = [
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"D", # pydocstyle
]
extend-ignore = [
"E203", # whitespace before ':'
"E501", # line too long (handled by formatter)
"D203", # one-blank-line-before-class (conflicts with D211)
"D213", # multi-line-summary-second-line (conflicts with D212)
]
[tool.ruff.lint.isort]
force-single-line = true
force-sort-within-sections = true
combine-as-imports = false
known-first-party = ["dstack_sdk"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # imported but unused
"tests/*.py" = ["D100", "D101", "D102", "D103", "D104"] # relax docstring rules for tests
"src/dstack_sdk/*.py" = ["D100", "D101", "D102", "D103", "D104", "D105", "D106", "D107"] # relax all docstring rules for source code
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.pdm]
distribution = true
[tool.pdm.publish]
repository = "pypi"
[tool.pdm.scripts]
# Formatting scripts
fmt = {composite = ["ruff format src/ tests/", "ruff check --fix src/ tests/"]}
format = {composite = ["ruff format src/ tests/", "ruff check --fix src/ tests/"]}
# Linting scripts
lint = {composite = ["ruff check src/ tests/", "mypy src/"]}
check = {composite = ["ruff check src/ tests/", "ruff format --check src/ tests/", "mypy src/"]}
# Testing scripts
test = "pytest"
test-cov = "pytest --cov=src/"
# Combined scripts
check-all = {composite = ["fmt", "lint", "test"]}
verify = {composite = ["check", "test"]}
[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "function"
markers = [
"asyncio: marks tests as asyncio (deselect with '-m \"not asyncio\"')"
]
[tool.pdm.dev-dependencies]
dev = [
"ruff>=0.12.9",
"mypy>=1.8.0",
"pytest>=8.3.3",
"pytest-asyncio>=0.24.0",
"evidence-api>=0.5.0",
]
solana = [
"solders",
]
ethereum = [
"web3",
]