Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
127 lines (112 loc) · 3.31 KB
/
Copy pathpyproject.toml
File metadata and controls
127 lines (112 loc) · 3.31 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
[project]
name = "sui-scallop-sdk"
version = "0.3.0a2"
description = "Python SDK for Scallop Lending Protocol on Sui"
readme = "README.md"
requires-python = ">=3.10"
license = { text = "Apache-2.0" }
authors = [{ name = "Scallop Team", email = "team@scallop.io" }]
keywords = ["sui", "scallop", "defi", "lending", "blockchain"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"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",
"Typing :: Typed",
]
dependencies = [
"pydantic>=2.0.0",
"httpx>=0.25.0",
"python-dotenv>=1.0.0",
"pynacl>=1.5.0",
"base58>=2.1.0",
# gRPC transport (sui.rpc.v2). Stubs are vendored under src/.../_grpc; the
# protobuf floor must match the gencode they were generated with (see
# proto/VENDOR.md). Regenerate with `make grpc` after bumping.
"grpcio>=1.83",
"protobuf>=7.35,<8",
"googleapis-common-protos>=1.65",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0.0",
"pytest-asyncio>=0.21.0",
"pytest-cov>=4.0.0",
"mypy>=1.0.0",
"ruff>=0.8.0",
"pre-commit>=3.0.0",
"grpcio-tools>=1.83", # regenerate _grpc stubs via `make grpc`
"mypy-protobuf>=3.6", # generate typed .pyi for the _grpc stubs
]
[project.urls]
Homepage = "https://github.com/scallop-io/sui-scallop-sdk-python"
Documentation = "https://github.com/scallop-io/sui-scallop-sdk-python#readme"
Repository = "https://github.com/scallop-io/sui-scallop-sdk-python"
"Bug Tracker" = "https://github.com/scallop-io/sui-scallop-sdk-python/issues"
Changelog = "https://github.com/scallop-io/sui-scallop-sdk-python/blob/master/CHANGELOG.md"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/sui_scallop_sdk"]
[tool.hatch.build.targets.sdist]
include = [
"src/sui_scallop_sdk/",
"proto/",
"scripts/gen_grpc.sh",
"LICENSE",
"README.md",
"CHANGELOG.md",
"pyproject.toml",
]
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
[tool.coverage.run]
source = ["sui_scallop_sdk"]
branch = true
[tool.coverage.report]
show_missing = true
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
]
[tool.mypy]
python_version = "3.10"
strict = true
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = [
"sui_scallop_sdk.bcs",
"sui_scallop_sdk.builder",
"sui_scallop_sdk.crypto",
"sui_scallop_sdk._grpc.*", # generated gRPC stubs (typed via .pyi from mypy-protobuf)
]
ignore_errors = true
[tool.ruff]
line-length = 100
target-version = "py310"
extend-exclude = ["src/sui_scallop_sdk/_grpc"] # generated gRPC stubs
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
]
ignore = [
"E501", # line too long (handled by formatter)
]
[tool.ruff.lint.isort]
known-first-party = ["sui_scallop_sdk"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"