-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
215 lines (201 loc) · 5.63 KB
/
Copy pathpyproject.toml
File metadata and controls
215 lines (201 loc) · 5.63 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
# ============================================================================
# Build System
# ============================================================================
[build-system]
requires = ["setuptools>=68.0"]
build-backend = "setuptools.build_meta"
# ============================================================================
# Project Metadata (PEP 621)
# ============================================================================
[project]
name = "invisibles-py"
version = "0.1.2"
description = "Transparent remote object proxying"
readme = "README.md"
license = "Apache-2.0"
authors = [
{name = "Gor Arakelyan", email = "gorarkln@gmail.com"}
]
maintainers = [
{name = "Gor Arakelyan", email = "gorarkln@gmail.com"}
]
keywords = [
"nustack",
"python",
"rpc",
"remote-objects",
"distributed",
"proxy",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"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",
"Topic :: System :: Networking",
]
requires-python = ">=3.10"
dependencies = [
"msgpack>=1.0.0",
]
[project.urls]
Homepage = "https://github.com/nustackdev/invisibles"
Documentation = "https://github.com/nustackdev/invisibles#readme"
Repository = "https://github.com/nustackdev/invisibles"
Issues = "https://github.com/nustackdev/invisibles/issues"
Changelog = "https://github.com/nustackdev/invisibles/releases"
PyPI = "https://pypi.org/project/invisibles-py/"
[project.optional-dependencies]
# Development tools
dev = [
"ruff>=0.1.0",
"pre-commit>=3.0.0",
]
# Testing
test = [
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
"pytest-xdist>=3.0.0",
"pytest-timeout>=2.1.0",
"pytest-benchmark>=4.0.0",
"pytest-asyncio>=1.2.0",
"hypothesis>=6.0.0",
]
# All development dependencies
all = [
"invisibles-py[dev,test]",
]
# ============================================================================
# Package Discovery
# ============================================================================
[tool.setuptools.packages.find]
where = ["src"]
include = ["invisibles*"]
namespaces = false
# ============================================================================
# Testing - pytest
# ============================================================================
[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--strict-markers",
"--strict-config",
"--tb=short",
"--durations=10",
]
markers = [
"unit: Unit tests - fast, isolated",
"functional: Functional end-to-end tests",
"integration: Integration tests",
"performance: Performance benchmarks",
"slow: Slow tests (deselect with '-m \"not slow\"')",
]
filterwarnings = [
"error",
"ignore::UserWarning",
"ignore::DeprecationWarning",
]
# ============================================================================
# Coverage
# ============================================================================
[tool.coverage.run]
source = ["src/invisibles"]
omit = [
"*/tests/*",
"*/test_*",
"*/__pycache__/*",
]
branch = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"def __str__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"if typing.TYPE_CHECKING:",
"@abstractmethod",
"@abc.abstractmethod",
]
precision = 2
show_missing = true
[tool.coverage.html]
directory = "tests/reports/coverage"
# ============================================================================
# Linting & Formatting - Ruff
# ============================================================================
[tool.ruff]
line-length = 100
target-version = "py310"
src = ["src", "tests"]
extend-exclude = [
".venv",
"build",
"dist",
"*.egg-info",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"N", # pep8-naming
"YTT", # flake8-2020
"S", # flake8-bandit (security)
"T20", # flake8-print
]
ignore = [
"E501", # Line too long (handled by formatter)
"S101", # Use of assert (fine in tests)
"S301", # pickle usage (we're a codec library)
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"S101", # assert allowed in tests
"T20", # print allowed in tests
]
"examples/*.py" = [
"T20", # print allowed in examples
]
[tool.ruff.lint.isort]
known-first-party = ["invisibles"]
force-single-line = false
lines-after-imports = 2
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
# ============================================================================
# Type Checking - mypy
# ============================================================================
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false
ignore_missing_imports = true
exclude = [
"build/",
"dist/",
".venv/",
]
# ============================================================================
# Security
# ============================================================================
[tool.bandit]
exclude_dirs = ["tests/", "examples/", "docs/"]