forked from narwhals-dev/narwhals
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
156 lines (141 loc) · 3.46 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "narwhals"
version = "1.10.0"
authors = [
{ name="Marco Gorelli", email="[email protected]" },
]
description = "Extremely lightweight compatibility layer between dataframe libraries"
readme = "README.md"
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
[tool.hatch.build]
exclude = [
"/.*",
"/docs",
"/tests",
"/tpch",
"/utils",
".gitignore",
"CONTRIBUTING.md",
"mkdocs.yml",
"noxfile.py",
"requirements-dev.txt",
]
[project.optional-dependencies]
cudf = ["cudf>=23.08.00"]
modin = ["modin"]
pandas = ["pandas>=0.25.3"]
polars = ["polars>=0.20.3"]
pyarrow = ["pyarrow>=11.0.0"]
dask = ["dask[dataframe]>=2024.7"]
[project.urls]
"Homepage" = "https://github.com/narwhals-dev/narwhals"
"Bug Tracker" = "https://github.com/narwhals-dev/narwhals"
[tool.ruff]
line-length = 90
fix = true
target-version = "py38"
lint.select = [
"ALL",
]
lint.ignore = [
"A001",
"ARG002",
"ANN101",
"ANN401",
"C901",
"COM812",
"D",
"DTZ001",
"E501",
"FIX",
"ISC001",
"NPY002",
"PD901", # This is a auxiliary library so dataframe variables have no concrete business meaning
"PLR0911",
"PLR0912",
"PLR0913",
"PLR2004",
"RET505",
"SLF001",
"TD003",
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101"]
"tpch/tests/*" = ["S101"]
"utils/*" = ["S311", "PTH123"]
"tpch/execute/*" = ["T201"]
"tpch/notebooks/*" = [
"ANN001",
"ANN201",
"EM101",
"EXE002",
"PTH123",
"T203",
"TRY003",
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.isort]
force-single-line = true
required-imports = ["from __future__ import annotations"]
[tool.ruff.format]
docstring-code-format = true
[tool.pytest.ini_options]
testpaths = ["tests"]
filterwarnings = [
"error",
'ignore:distutils Version classes are deprecated:DeprecationWarning',
'ignore:In the future `np.bool`',
'ignore:The copy keyword is deprecated and will be removed',
'ignore:make_block is deprecated and will be removed',
'ignore:np.find_common_type is deprecated',
'ignore:is_sparse is deprecated and will be removed',
'ignore:Passing a BlockManager to DataFrame is deprecated',
'ignore:.*defaulting to pandas implementation',
'ignore:.*implementation has mismatches with pandas',
'ignore:.*Do not use the `random` module inside strategies',
'ignore:.*You are using pyarrow version',
'ignore:.*but when imported by',
'ignore:Distributing .*This may take some time',
'ignore:.*The default coalesce behavior'
]
xfail_strict = true
markers = ["slow: marks tests as slow (deselect with '-m \"not slow\"')"]
env = [
"MODIN_ENGINE=python",
]
[tool.coverage.run]
plugins = ["covdefaults"]
[tool.coverage.report]
omit = [
'narwhals/typing.py',
'narwhals/stable/v1/typing.py',
'narwhals/this.py',
# we can run this in every environment that we measure coverage on due to upper-bound constraits
'narwhals/_ibis/*',
]
exclude_also = [
"> POLARS_VERSION",
"if sys.version_info() <",
"if implementation is Implementation.MODIN",
"if implementation is Implementation.CUDF",
'request.applymarker\(pytest.mark.xfail\)'
]
[tool.mypy]
strict = true
[[tool.mypy.overrides]]
# the pandas API is just too inconsistent for type hinting to be useful.
module = [
"pandas.*",
"cudf.*",
"modin.*",
]
ignore_missing_imports = true