-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
216 lines (197 loc) · 6.05 KB
/
pyproject.toml
File metadata and controls
216 lines (197 loc) · 6.05 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
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[project]
name = "rayforce_py"
version = "0.6.2"
description = "Python bindings for RayforceDB"
readme = "README.md"
authors = [{name = "Karim"}]
license = {text = "MIT"}
requires-python = ">=3.11"
dependencies = ["numpy>=2.0.0"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Financial and Insurance Industry",
"Intended Audience :: Information Technology",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: C"
]
[project.scripts]
rayforce = "rayforce.cli:main"
[project.optional-dependencies]
pandas = ["pandas>=2.0.0"]
polars = ["polars>=0.19.0"]
parquet = ["pyarrow>=10.0.0"]
all = ["pandas>=2.0.0", "polars>=0.19.0", "pyarrow>=10.0.0"]
dev = [
"pytest>=8.0.0",
"pytest-cov>=4.0.0",
"pytest-asyncio>=0.23.0",
"pytest-timeout>=2.2.0",
"coverage>=7.0.0",
"ruff>=0.1.0",
"mypy>=1.0.0",
]
test-plugins = [
"pandas>=2.0.0",
"polars>=0.19.0",
"pyarrow>=10.0.0",
"websockets>=12.0",
"sqlglot>=20.0.0",
]
[tool.cibuildwheel]
build = "cp311-* cp312-* cp313-* cp314-*"
skip = "*-win32 *-manylinux_i686 *-musllinux_*"
archs = ["auto64"]
before-build = "bash {project}/scripts/prepare_build.sh"
test-skip = "*" # Skip tests for now
[tool.cibuildwheel.environment]
RAYFORCE_GITHUB = "https://github.com/RayforceDB/rayforce.git"
[tool.cibuildwheel.macos]
environment = { MACOSX_DEPLOYMENT_TARGET = "11.0" }
[tool.cibuildwheel.linux]
manylinux-x86_64-image = "manylinux_2_28"
manylinux-aarch64-image = "manylinux_2_28"
before-all = [
"yum install -y git",
"yum groupinstall -y 'Development Tools'",
"yum install -y clang llvm",
]
[tool.ruff]
show-fixes = true
target-version = "py314"
line-length = 100
exclude = [
".git",
".venv",
"__pycache__",
"build",
"dist",
"*.egg-info",
".mypy_cache",
".pytest_cache",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes (unused imports, undefined names)
"I", # isort (import sorting)
"N", # pep8-naming (naming conventions)
"UP", # pyupgrade (modernize Python syntax)
"B", # flake8-bugbear (common bugs and design problems)
"C4", # flake8-comprehensions (better list/dict comprehensions)
"SIM", # flake8-simplify (code simplification)
"PIE", # flake8-pie (misc improvements)
"PT", # flake8-pytest-style (pytest best practices)
"RET", # flake8-return (return statement improvements)
"RUF", # ruff-specific rules (powerful ruff-only checks)
"TCH", # flake8-type-checking (TYPE_CHECKING imports)
"ARG", # flake8-unused-arguments
"ERA", # eradicate (detect commented-out code)
"PL", # pylint (selected useful rules)
"TRY", # tryceratops (better exception handling)
"PERF", # perflint (performance improvements)
"FBT", # flake8-boolean-trap (avoid boolean positional args)
"A", # flake8-builtins (shadowing builtins)
"COM", # flake8-commas (trailing commas)
"DTZ", # flake8-datetimez (timezone-aware datetimes)
"T10", # flake8-debugger (remove debugger statements)
"ISC", # flake8-implicit-str-concat
"Q", # flake8-quotes (consistent quote style)
"RSE", # flake8-raise (better raise statements)
"SLF", # flake8-self (self/cls usage)
"SLOT", # flake8-slots (use __slots__)
"PGH", # pygrep-hooks (regex-based rules)
"FURB", # refurb (modernize code)
]
ignore = [
"E501", # Line too long (handled by formatter)
"PLR0913", # Too many arguments
"PLR0912", # Too many branches
"PLR0915", # Too many statements
"PLR0911", # Too many return statements
"PLR2004", # Magic value usage
"PLC0415",
"PLW1641",
"FBT001",
"COM812",
"SLF001", # Private member accessed
"T201", # Print statements (might be intentional)
"TRY003", # Avoid specifying long messages outside exception class
]
fixable = ["ALL"]
unfixable = []
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["E501", "PLR2004", "ERA001"]
"scripts/**/*.py" = ["T201"]
"**/__init__.py" = ["TID252"]
[tool.ruff.lint.isort]
known-first-party = ["rayforce"]
split-on-trailing-comma = true
force-sort-within-sections = true
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"network: marks tests that require a running rayforce server or network I/O",
"plugin: marks tests that require optional dependencies (pandas, polars, pyarrow, etc.)",
"ffi: marks tests that exercise the C FFI layer directly",
"benchmark: marks benchmark tests (deselect with '-m \"not benchmark\"')",
]
addopts = [
"--strict-markers",
"--strict-config",
"-ra",
"-m", "not benchmark",
]
filterwarnings = [
"error",
"ignore::DeprecationWarning:importlib.*",
]
xfail_strict = true
[tool.coverage.run]
source = ["rayforce"]
omit = [
"*/tests/*",
"*/test_*.py",
"*/__pycache__/*",
"*/setup.py",
"*/benchmark/*",
"*/scripts/*",
"rayforce/rayforce/*", # C extension code
"rayforce/capi/*", # C API code
"rayforce/_rayforce_c.pyi", # Type stubs
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"@abstractmethod",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
precision = 2
show_missing = true
skip_covered = false
fail_under = 80
[tool.coverage.html]
directory = "htmlcov"