-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
189 lines (174 loc) · 5.14 KB
/
pyproject.toml
File metadata and controls
189 lines (174 loc) · 5.14 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
[build-system]
requires = ["maturin>=1.8,<2"]
build-backend = "maturin"
[project]
name = "polars-janitor"
version = "0.1.1"
description = "Small janitorial helpers for Polars dataframes."
readme = "README.md"
requires-python = ">=3.10"
license = { file = "LICENSE" }
authors = [
{ name = "VovaVili" },
]
maintainers = [
{ name = "VovaVili" },
]
keywords = [
"data-cleaning",
"dataframe",
"janitor",
"polars",
"rust",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Rust",
"Topic :: Scientific/Engineering :: Information Analysis",
"Typing :: Typed",
]
dependencies = [
"polars>=1.29.0",
]
[project.urls]
Homepage = "https://github.com/VovaVili/polars_janitor"
Repository = "https://github.com/VovaVili/polars_janitor"
Issues = "https://github.com/VovaVili/polars_janitor/issues"
Changelog = "https://github.com/VovaVili/polars_janitor/releases"
[project.optional-dependencies]
dev = [
"hypothesis>=6.0",
"maturin>=1.8,<2",
"pytest>=8.0",
"ruff>=0.8",
]
[tool.maturin]
bindings = "pyo3"
features = ["extension-module"]
module-name = "polars_janitor._rust"
python-source = "src"
include = [
{ path = "benchmarks/**/*", format = "sdist" },
{ path = "Cargo.lock", format = "sdist" },
{ path = "docs/**/*", format = "sdist" },
{ path = "examples/**/*", format = "sdist" },
{ path = "LICENSE", format = "sdist" },
{ path = "README.md", format = "sdist" },
{ path = "rust/**/*", format = "sdist" },
{ path = "scripts/**/*", format = "sdist" },
{ path = "src/**/*", format = "sdist" },
{ path = "uv.lock", format = "sdist" },
]
[tool.ruff]
line-length = 120
[tool.ruff.format]
docstring-code-line-length = 120
[tool.ruff.lint]
select = [
"F", # pyflakes
"E", # pycodestyle, errors
"W", # pycodestyle, warnings
"I", # isort
"C90", # McCabe complexity
"D", # pydocstyle, all conventions
"A", # flake8-builtins
"DTZ", # flake8, ban timezone-naive datetimes
"BLE", # flake8-blind-except
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"T10", # flake8-debugger
"EXE", # flake8-executable
"LOG", # flake8-logging
"G", # flake8-logging-format
"S", # flake8-bandit
"PT", # flake8-pytest-style
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"TC", # flake8-type-checking
"PTH", # flake8-use-pathlib
"ARG", # flake8-unused-arg
"PIE", # flake8-pie
"RSE", # flake8-raise
"RET", # flake8-return
"ICN", # flake8-import-conventions
"SLOT", # flake8-slots
"N", # pep8-naming
"ERA", # eradicate
"UP", # pyupgrade
"FURB", # refurb
"PERF", # perflint
"TRY", # tryceratops
"RUF", # ruff-specific rules
"FA102", # Add "from __future__ import annotations" to every file
"PLC", # Pylint conventions
"PLE", # Pylint errors
"PLW", # Pylint warnings
# Selected Pylint refactors that are relatively uncontroversial.
"PLR01",
"PLR02",
"PLR04",
# "PLR09", # Enforces shorter functions, but longer functions are not necessarily bad when done right
"PLR17",
# "PLR2004", # Avoids magic values, but enforcing it everywhere can be too demanding
"PLR2044",
"PLR5",
# "PLR6", # Good ruleset, but requires Ruff preview mode
# Useful rules for third-party libraries
"AIR", # Airflow
"FAST", # FastAPI
"NPY", # NumPy
]
ignore = [
# Conflicts with another pydocstyle rule
"D203",
"D213",
"TRY003", # Long error messages are not inherently bad; subclassing every exception case is overkill
"TRY301", # It can be useful to raise inside a try block while testing
# Given two mutually exclusive shell-related options, choose the more secure one
"S603",
"S606",
# Replacing built-in open() with pathlib can be needlessly verbose and slightly less performant
"PTH110",
"PTH123",
"ICN003", # Aliased imports make some Polars and PySpark code more readable, e.g. `from polars import col, lit`
# Conflicting Ruff formatter rules:
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"W191",
"E111",
"E114",
"E117",
"D206",
"D300",
"COM812",
"COM819",
"ISC002",
# Uncomment the following if working with Marimo notebooks
# "PLC0415",
# "N803",
# "N806",
# "B018", # Ignored in Jupyter notebooks, but not automatically detected for Marimo notebooks yet
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["D104"] # __init__.py files can be empty
"tests/*.py" = ["S101"] # pytest relies on asserts
[tool.ruff.lint.flake8-type-checking]
runtime-evaluated-base-classes = [
"pydantic.BaseModel",
]
runtime-evaluated-decorators = [
"pydantic.dataclasses.dataclass",
"pydantic.validate_call",
]