-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathpyproject.toml
More file actions
177 lines (161 loc) · 5.4 KB
/
pyproject.toml
File metadata and controls
177 lines (161 loc) · 5.4 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
[build-system]
requires = [
# ARROW-248, pin to less than 72.2.
"setuptools>=70,<72.2",
"cython>=3.0",
# Needed for numpy headers.
"numpy>=2.1.0",
# Must be kept in sync with "project.dependencies" below.
"pyarrow>=23.0,<23.1.0",
]
[project]
name = "pymongoarrow"
description = "Tools for using NumPy, Pandas, Polars, and PyArrow with MongoDB"
license = {text = "Apache License, Version 2.0"}
authors = [{name = "Prashant Mital"}]
maintainers = [{name = "MongoDB"}, {name = "Inc."}]
keywords = ["mongo", "mongodb", "pymongo", "arrow", "bson", "numpy", "pandas", "polars"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX",
"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 :: Python :: Implementation :: CPython",
"Topic :: Database",
]
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
# Must be kept in sync with "build_sytem.requires" above.
"pyarrow >=23.0,<23.1",
"pymongo >=4.4,<5",
# See comment in test-pandas optional dep below for why we have separate
# numpy version deps.
"numpy>=1.26; python_version < '3.11'",
"numpy>=2.1.0; python_version >= '3.11'",
"packaging >=23.2",
]
dynamic = ["version"]
[project.urls]
Homepage = "https://www.mongodb.org"
Documentation = "https://mongo-arrow.readthedocs.io"
Source = "https://github.com/mongodb-labs/mongo-arrow/tree/main/bindings/python"
Tracker = "https://jira.mongodb.org/projects/INTPYTHON/issues"
[project.optional-dependencies]
test = ["pytz>=2025.2", "pytest>=8.0"]
test-polars = ["polars>=1.10"]
# Ensure we test both pandas 2.x and 3.x. pandas 3.x only supports python 3.11+.
# pandas 2.x on python 3.11 only supports numpy<2.
test-pandas = ["pandas>=2.0.3; python_version < '3.11'", "numpy<2; python_version < '3.11'", "pandas>=3.0; python_version >= '3.11'"]
[tool.setuptools]
zip-safe = false
include-package-data = true
platforms = ["Linux", "Mac OS X"]
[tool.setuptools.package-data]
pymongoarrow = ["*.pxd", "*.pyx", "*.pyi", "*.so.*", "*.dylib", "*.dll", "*.pyd"]
[tool.setuptools.packages.find]
exclude = [
"test",
"docs",
]
namespaces = false
[tool.setuptools.dynamic]
version = {attr = "pymongoarrow.version.__version__"}
[tool.cibuildwheel]
skip = "pp* *-manylinux_i686 *_ppc64le *_s390x *-musllinux*"
before-build = "bash ./cibw_before_build.sh"
build-frontend = "build"
test-command = "python -c \"from pymongoarrow.lib import libbson_version\""
# Disable wheel repair, see https://jira.mongodb.org/browse/INTPYTHON-122.
repair-wheel-command = ""
[tool.cibuildwheel.environment]
LIBBSON_INSTALL_DIR = "./libbson"
[tool.cibuildwheel.linux]
archs = "x86_64 aarch64"
manylinux-x86_64-image = "manylinux_2_28"
manylinux-aarch64-image = "manylinux_2_28"
repair-wheel-command = [
"pip install \"auditwheel>=6,<7\"",
"auditwheel repair -w {dest_dir} --exclude libarrow* {wheel}"
]
[tool.cibuildwheel.macos]
archs = "x86_64 arm64"
[tool.pytest.ini_options]
minversion = "7"
addopts = ["-ra", "--strict-config", "--strict-markers", "--durations=5", "--junitxml=xunit-results/TEST-results.xml"]
testpaths = ["test"]
log_cli_level = "INFO"
faulthandler_timeout = 1500
xfail_strict = true
filterwarnings = [
"error",
"module:The global interpreter lock:RuntimeWarning", # from pandas
"module:matching against an empty string will:pytest.PytestWarning", # from pandas
"module:.*behaviour will change in pandas 3.0:FutureWarning", # from pandas
]
[tool.ruff]
line-length = 100
[tool.ruff.lint]
select = [
"E", "F", "W", # flake8
"B", # flake8-bugbear
"I", # isort
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"RUF", # Ruff-specific
"S", # flake8-bandit
"SIM", # flake8-simplify
"T20", # flake8-print
"UP", # pyupgrade
"YTT", # flake8-2020
"EXE", # flake8-executable
]
ignore = [
"PLR", # Design related pylint codes
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"PLC0415", # `import` should be at the top-level of a file
]
unfixable = [
]
exclude = [
]
[tool.ruff.lint.per-file-ignores]
"setup.py" = ["PTH", "EM", "B", "S", "E501"]
"docs/source/conf.py" = ["E501", "S", "PTH"]
"benchmarks.py" = ["T201", "E501", "C4", "EM101"]
"test/*.py" = ["PT", "S", "ARG", "B", "C", "EM", "E501", "RUF005", "UP038"]
[dependency-groups]
dev = [
"check-manifest>=0.50",
"packaging>=25.0",
"pre-commit>=4.2.0",
"setuptools>=79.0.0",
"sphinx-autobuild>=2024.10.3",
]
benchmark = [
"asv>=0.6.5"
]
docs = [
"sphinx>=5.3,<9",
"sphinx_rtd_theme>=2,<4",
"sphinxcontrib-shellcheck>=1,<2",
"furo==2025.12.19"
]