-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
166 lines (153 loc) · 4.58 KB
/
pyproject.toml
File metadata and controls
166 lines (153 loc) · 4.58 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
[build-system]
requires = ["uv_build>=0.8.22,<0.9.0"]
build-backend = "uv_build"
[project]
name = "client-for-vantage"
version = "1.2.0"
description = "An SDK for interacting with the Vantage API, attempts to maintain parity with the API, provides type safety via codegen Pydantic classes and manages pagination"
readme = "README.md"
requires-python = ">=3.10,<3.13"
license = { text = "Apache-2.0" }
authors = [{ name = "Orest Tokovenko", email = "oresttokovenko@block.xyz" }]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
]
keywords = ["vantage", "api", "sdk"]
dependencies = [
"pydantic>=2.10.6",
"pydantic-settings>=2.7.1",
"pydantic-extra-types>=2.10.2",
"httpx>=0.28.1",
]
[dependency-groups]
dev = [
"pytest>=8.3.4",
"pytest-recording>=0.13.4",
"ruff>=0.12.0",
"nox>=2025.05.01",
"pytest-mock>=3.14.0",
"datamodel-code-generator[http,ruff]>=0.55.0",
"pytest-timeout>=2.4.0",
"basedpyright>=1.29.0",
]
[project.urls]
Homepage = "https://github.com/block/client-for-vantage"
Repository = "https://github.com/block/client-for-vantage"
Issues = "https://github.com/block/client-for-vantage/issues"
# Explicitly use public PyPI to prevent corporate proxy indexes (e.g. Artifactory)
# from being injected via environment variables, since this is an open source project
[[tool.uv.index]]
url = "https://pypi.org/simple"
[tool.uv.build-backend]
module-name = "vantage_sdk"
module-root = ""
[tool.basedpyright]
pythonVersion = "3.10"
include = ["vantage_sdk"]
exclude = ["**/gen_models/**"]
typeCheckingMode = "strict"
failOnWarnings = false
[[tool.basedpyright.executionEnvironments]]
root = "tests"
reportUnknownMemberType = "none"
reportUnknownParameterType = "none"
reportMissingParameterType = "none"
reportUnknownVariableType = "none"
reportUnknownArgumentType = "none"
reportCallIssue = "none"
reportMissingTypeStubs = "none"
reportUnusedImport = "none"
reportOptionalMemberAccess = "none"
reportAttributeAccessIssue = "none"
reportArgumentType = "none"
reportUnusedVariable = "none"
[tool.ruff]
target-version = "py310"
line-length = 120
exclude = [
"**/gen_models/**",
"noxfile.py",
"tests/**"
]
[tool.pytest.ini_options]
log_level = "WARNING"
log_cli = false
[tool.datamodel-codegen]
input = "openapi_spec.json"
output = "vantage_sdk/models/gen_models"
input-file-type = "openapi"
output-model-type = "pydantic_v2.BaseModel"
target-python-version = "3.10"
module-split-mode = "single"
use-generic-container-types = true
use-subclass-enum = true
use-union-operator = true
reuse-model = true
use-schema-description = true
collapse-root-models = true
field-constraints = true
use-annotated = true
strict-nullable = true
use-default-kwarg = true
set-default-enum-member = true
allow-population-by-field-name = true
naming-strategy = "primary-first"
parent-scoped-naming = true
all-exports-scope = "recursive"
all-exports-collision-strategy = "minimal-prefix"
openapi-scopes = ["schemas", "paths", "parameters"]
disable-timestamp = true
formatters = ["ruff-format", "ruff-check"]
[tool.ruff.lint]
select = [
# finds syntax errors and undefined names
"F",
# finds likely bugs and design problems
# that are well known and easy to fix
"B",
# checks for PEP8 compliance
# Python's official style guide
"E",
# sorts imports
"I",
# helps to write cleaner, simpler code
"SIM",
# automatically upgrades code to newer versions of Python
# ex. foo: Union[int, str] -> foo: int | str
"UP",
# collection of best practices
"RUF",
# doc string checks
"D",
]
fixable = ["ALL"]
ignore = [
# ignoring D107 because we don't need docstrings for __init__ methods
"D107",
# ignoring punctuation checks
"D415",
# ignoring summary line requirement
"D212",
# ignoring D100 because we don't need module-level docstrings
"D100",
# ignoring D104 because we don't need to document the module
"D104",
# Ignoring D401 because we can write in any mood we like
"D401",
# ignoring D205 because we don't need a summary line in a file docstring
"D205"
]
[tool.ruff.lint.pydocstyle]
# using Google's docstring convention for classes, functions and methods
# https://google.github.io/styleguide/pyguide.html#383-functions-and-methods
convention = "google"
[tool.ruff.format]
quote-style = "double"
[tool.pyproject-fmt]
column_width = 120
indent = 4