-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathpyproject.toml
207 lines (181 loc) · 4.02 KB
/
pyproject.toml
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
[project]
name = "samplics"
version = "0.4.46"
description = "Select, weight and analyze complex sample data"
authors = [{ name = "Mamadou S Diallo", email = "[email protected]" }]
readme = "README.md"
requires-python = ">=3.10"
keywords = ["sampling", "sample", "weighting", "estimation", "survey"]
classifiers = [
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Development Status :: 4 - Beta",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering",
]
dependencies = ["numpy >=2.1", "statsmodels >=0.14", "polars[pyarrow]>=1.21.0"]
[dependency-groups]
dev = ["pytest>=8.3.3", "pytest-cov>=4.1", "codecov>=2.1", "jupyterlab>=4.3.5"]
[project.urls]
repository = "https://github.com/survey-methods/samplics"
documentation = "https://samplics-org.github.io/samplics/"
homepage = "https://samplics-org.github.io/samplics//"
[tool.black]
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
'''
# line-length = 99
# target-version = ["py310", "py311"]
[tool.pytest.ini_options]
addopts = "--ignore=tests/apis --ignore=tests/sae --ignore=tests/types"
# testpaths = ["tests"]
[tool.ruff]
src = ["src", "tests"]
# extend-exclude = ["tests"]
line-length = 99
target-version = "py313"
[tool.ruff.lint]
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
select = ["D", "E", "F", "W", "I001"]
ignore = ["D", "E501"] # for development we can ignore the docs
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = [
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"I",
"N",
"Q",
"S",
"T",
"W",
"ANN",
"ARG",
"BLE",
"COM",
"DJ",
"DTZ",
"EM",
"ERA",
"EXE",
"FBT",
"ICN",
"INP",
"ISC",
"NPY",
"PD",
"PGH",
"PIE",
"PL",
"PT",
"PTH",
"PYI",
"RET",
"RSE",
"RUF",
"SIM",
"SLF",
# "TCH",
"TID",
"TRY",
"UP",
"YTT",
]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
per-file-ignores = {}
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.pycodestyle]
ignore-overlong-task-comments = true
[tool.ruff.lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.ruff.lint.isort]
known-first-party = ["samplics"]
known-third-party = [
"matplotlib",
"numpy",
"pandas",
"polars",
"pydantic",
"scipy",
"statsmodels",
]
lines-after-imports = 2
lines-between-types = 1
[tool.mypy]
ignore_missing_imports = true
follow_imports = "silent"
strict_optional = true
allow_redefinition = true
show_error_context = false
show_column_numbers = true
# Ensure full coverage
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
# Restrict dynamic typing
disallow_any_generics = false
warn_no_return = true
warn_return_any = true
no_implicit_optional = true
# Know what you are doing
warn_unreachable = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_unused_configs = true
exclude = [".venv", "tests"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.sdist]
sources = ["src"]
exclude = ["tests", "tests/*"]
[tool.hatch.build.targets.wheel]
sources = ["src"]
exclude = ["tests", "tests/*"]
# [[tool.uv.index]]
# name = "testpypi"
# url = "https://test.pypi.org/simple/"
# publish-url = "https://test.pypi.org/legacy/"