-
Notifications
You must be signed in to change notification settings - Fork 475
/
Copy pathpyproject.toml
214 lines (184 loc) · 5.2 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
208
209
210
211
212
213
214
[project]
name = "Pint"
authors = [{ name = "Hernan E. Grecco", email = "[email protected]" }]
dynamic = ["version"]
license = { text = "BSD" }
description = "Physical quantities module"
readme = "README.rst"
maintainers = [
{ name = "Hernan E. Grecco", email = "[email protected]" },
{ name = "Jules Chéron", email = "[email protected]" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Programming Language :: Python",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
requires-python = ">=3.11"
keywords = ["physical", "quantities", "unit", "conversion", "science"]
dependencies = [
"platformdirs>=2.1.0",
"typing_extensions>=4.0.0",
"flexcache>=0.3",
"flexparser>=0.4",
]
[tool.hatch.build]
packages = ["pint"]
include = ["pint/default_en.txt", "pint/constants_en.txt"]
[project.optional-dependencies]
test = ["pytest", "pytest-cov", "pytest-subtests", "pytest-benchmark"]
test-mpl = ["pytest-mpl"]
test-all = ["pint[test, test-mpl]"]
codspeed = ["pint[test-all]", "pytest-codspeed"]
numpy = ["numpy >= 1.23"]
uncertainties = ["uncertainties >= 3.1.6"]
babel = ["babel <= 2.8"]
pandas = ["pint-pandas >= 0.3"]
xarray = ["xarray"]
dask = ["dask"]
mip = ["mip >= 1.13"]
matplotlib = ["matplotlib"]
all = [
"pint[numpy,uncertainties,babel,pandas,pandas,xarray,dask,mip,matplotlib]",
]
docs = [
"sphinx>=6",
"ipython<=8.12",
"nbsphinx",
"jupyter_client",
"ipykernel",
"graphviz",
"pooch",
"sparse",
"Serialize",
"pygments>=2.4",
"sphinx-book-theme>=1.1.0",
"sphinx_copybutton",
"sphinx_design",
"docutils", #==0.14",
"commonmark==0.8.1",
"recommonmark==0.5.0",
"babel",
]
[project.urls]
Homepage = "https://github.com/hgrecco/pint"
Documentation = "https://pint.readthedocs.io/"
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
[tool.uv]
cache-keys = [{ file = "pyproject.toml" }, { git = true }]
[tool.pytest.ini_options]
addopts = "--import-mode=importlib"
pythonpath = "."
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
extend-select = ["I"]
[tool.pixi.project]
channels = ["https://fast.prefix.dev/conda-forge"]
platforms = ['osx-arm64', 'linux-64', 'win-64']
[tool.pixi.tasks]
[tool.pixi.pypi-dependencies]
pint = { path = ".", editable = true }
[tool.pixi.environments]
dev = { features = ["numpy", "dev", "py313"], solve-group = "default" }
lint = { features = ["lint"], no-default-feature = true }
build = { features = ["build"], no-default-feature = true }
typecheck = { features = ["typecheck"], solve-group = "default" }
test = { features = ["test"], solve-group = "default" }
test-all = { features = ["test-all"], solve-group = "default" }
numpy = { features = ["numpy"], solve-group = "default" }
codspeed = { features = ["codspeed"], solve-group = "default" }
docs = { features = [
"docs",
"numpy",
"mip",
"matplotlib",
"dask",
"xarray",
"test",
"py311",
] }
# When pint[all] works in pixi, this will be easier.
all = { features = [
"test",
"test-mpl",
"codspeed",
"numpy",
"uncertainties",
"babel",
"pandas",
"xarray",
"dask",
"mip",
"matplotlib",
], solve-group = "default" }
test-py311 = ["test", "py311"]
test-py312 = ["test", "py312"]
test-py313 = ["test", "py313"]
test-py311-numpy = ["numpy", "test", "py311"]
test-py312-numpy = ["numpy", "test", "py312"]
test-py313-numpy = ["numpy", "test", "py313"]
test-py311-all = ["all", "test", "py311"]
test-py312-all = ["all", "test", "py312"]
test-py313-all = ["all", "test", "py313"]
[tool.pixi.feature.dev.dependencies]
tomlkit = "*"
[tool.pixi.feature.lint.dependencies]
pre-commit = "*"
pre-commit-hooks = "*"
taplo = "*"
ruff = "*"
mdformat = "*"
mdformat-ruff = "*"
[tool.pixi.feature.lint.tasks]
pre-commit-install = "pre-commit install"
lint = "pre-commit run"
[tool.pixi.feature.build.dependencies]
uv = "*"
[tool.pixi.feature.build.tasks]
build = "uv build"
publish = "uv publish"
[tool.pixi.feature.test.tasks]
test = "pytest --benchmark-skip"
bench = "pytest --benchmark-only"
[tool.pixi.feature.typecheck.dependencies]
pyright = "*"
pip = "*"
[tool.pixi.feature.typecheck.tasks]
typecheck = "pyright"
[tool.pixi.feature.docs.pypi-dependencies]
pint = { path = ".", editable = true }
[tool.pixi.feature.docs.tasks]
docbuild = "sphinx-build -n -j auto -b html -d build/doctrees docs build/html"
doctest = "sphinx-build -a -j auto -b doctest -d build/doctrees docs build/doctest"
[tool.pixi.feature.docs.dependencies]
pandoc = "*"
[tool.pixi.feature.py311.dependencies]
python = "3.11.*"
[tool.pixi.feature.py312.dependencies]
python = "3.12.*"
[tool.pixi.feature.py313.dependencies]
python = "3.13.*"
[tool.pyright]
include = ["pint"]
exclude = ["pint/testsuite"]
[tool.pyright.defineConstant]
HAS_BABEL = true
HAS_UNCERTAINTIES = true
HAS_NUMPY = true
AS_MIP = true
HAS_DASK = true