forked from pola-rs/polars
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
194 lines (177 loc) · 5.08 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
[build-system]
requires = ["maturin>=0.14,<0.15"]
build-backend = "maturin"
[project]
name = "polars"
description = "Blazingly fast DataFrame library"
readme = "README.md"
authors = [
{ name = "Ritchie Vink", email = "[email protected]" },
]
license = { file = "LICENSE" }
requires-python = ">=3.7"
dependencies = [
"typing_extensions >= 4.0.1; python_version < '3.11'",
]
keywords = ["dataframe", "arrow", "out-of-core"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Rust",
"Topic :: Scientific/Engineering",
]
[project.urls]
Homepage = "https://www.pola.rs/"
Documentation = "https://pola-rs.github.io/polars/py-polars/html/reference/index.html"
Repository = "https://github.com/pola-rs/polars"
Changelog = "https://github.com/pola-rs/polars/releases"
[project.optional-dependencies]
# the Arrow memory format is stable between 4.0 and 5.0-SNAPSHOTS
# (which the Rust libraries use to take advantage of Rust API changes).
# NOTE: keep this list in sync with show_versions()
pyarrow = ["pyarrow>=4.0.0"]
pandas = ["pyarrow>=4.0.0", "pandas"]
numpy = ["numpy >= 1.16.0"]
fsspec = ["fsspec"]
connectorx = ["connectorx"]
xlsx2csv = ["xlsx2csv >= 0.8.0"]
deltalake = ["deltalake >= 0.6.2"]
timezone = ["backports.zoneinfo; python_version < '3.9'", "tzdata; platform_system == 'Windows'"]
matplotlib = ["matplotlib"]
all = [
"polars[pyarrow,pandas,numpy,fsspec,connectorx,xlsx2csv,deltalake,timezone,matplotlib]",
]
[tool.mypy]
files = ["polars", "tests"]
strict = true
enable_error_code = [
"redundant-expr",
"truthy-bool",
"ignore-without-code",
]
disable_error_code = [
"empty-body",
]
[[tool.mypy.overrides]]
module = [
"backports",
"pyarrow.*",
"polars.polars",
"matplotlib.*",
"fsspec.*",
"connectorx",
"deltalake",
"IPython.*",
"xlsx2csv",
"xlsxwriter",
"xlsxwriter.utility",
"xlsxwriter.worksheet",
"zoneinfo",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ["IPython.*"]
follow_imports = "skip"
[[tool.mypy.overrides]]
module = ["polars.*"]
# We exclude the polars module from warn_return_any, because the PyO3 api does not have Python
# type annotations. See https://github.com/PyO3/pyo3/issues/1112 for a discussion on adding
# this capability. We could add a stub file for polars.polars (the PyO3 api), but that
# amounts to duplicating almost all type annotations on our api, as the Python api itself is a
# thin wrapper around the PyO3 api to start with.
warn_return_any = false
[tool.ruff]
target-version = "py37"
line-length = 88
fix = true
select = [
"E", # pycodestyle
"W", # pycodestyle
"F", # Pyflakes
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"D", # flake8-docstrings
"I", # isort
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"Q", # flake8-quotes
"UP", # pyupgrade
"PT", # flake8-pytest-style
"RUF", # Ruff-specific rules
]
ignore = [
# Line length regulated by black
"E501",
# pydocstyle: http://www.pydocstyle.org/en/stable/error_codes.html
# numpy convention with a few additional lints
"D107",
"D202", # No blank lines allowed after function docstring -> clashes with Black
"D203",
"D212",
"D401",
"D402",
"D415",
"D416",
# flake8-pytest-style:
"PT011", # pytest.raises({exception}) is too broad, set the match parameter or use a more specific exception
# flake8-simplify
"SIM102", # Use a single `if` statement instead of nested `if` statements
# ruff
"RUF005", # unpack-instead-of-concatenating-to-collection-literal
# TODO: Remove errors below to further improve docstring linting
# Ordered from most common to least common errors.
"D105",
"D100",
"D103",
"D102",
"D104",
"D101",
]
[tool.ruff.pycodestyle]
max-doc-length = 88
[tool.ruff.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.flake8-type-checking]
strict = true
[tool.ruff.per-file-ignores]
"polars/datatypes.py" = ["B019"]
"tests/**/*.py" = ["D100", "D103"]
[tool.pytest.ini_options]
addopts = [
"--strict-config",
"--strict-markers",
"--import-mode=importlib",
# Default to running fast tests only. To run ALL tests, run: pytest -m ""
"-m not slow and not hypothesis and not benchmark",
]
markers = [
"slow: Tests with a longer than average runtime.",
"benchmark: Tests that should be run on a Polars release build.",
]
filterwarnings = "error" # Fail on warnings
[tool.coverage.run]
source = ["polars"]
branch = true
[tool.coverage.report]
fail_under = 85
skip_covered = true
show_missing = true
exclude_lines = [
"pragma: no cover",
"@overload",
"except ImportError",
"if TYPE_CHECKING:",
"from typing_extensions import ",
]