-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathpyproject.toml
220 lines (179 loc) · 6.15 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
215
216
217
218
219
220
[project]
name = "sage-flatsurf"
version = "0.7.2"
authors = [
{name = "Vincent Delecroix"},
{name = "W. Patrick Hooper"},
{name = "Julian Rüth"},
]
dependencies = [
"bidict",
"more-itertools",
"surface-dynamics>=0.6.0,<0.7.0",
"matplotlib",
]
description = "Flat surfaces in SageMath"
requires-python = ">= 3.9"
readme = "README.md"
keywords = ["surfaces", "dynamics", "geometry", "flat surfaces", "Abelian differentials", "quadratic differentials", "Riemann surfaces"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Scientific/Engineering :: Mathematics",
]
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]
[tool.hatch.build.targets.wheel]
packages = ["flatsurf"]
[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["linux-64", "osx-64"]
[tool.pixi.environments]
sagemath-97 = ["sagemath-97", "flipper", "gmpxxyy", "pyeantic", "pyexactreal", "test"]
sagemath-98 = ["sagemath-98", "flipper", "gmpxxyy", "pyeantic", "pyexactreal", "test"]
sagemath-100 = ["sagemath-100", "flipper", "gmpxxyy", "pyeantic", "pyexactreal", "test"]
sagemath-101 = ["sagemath-101", "flipper", "gmpxxyy", "pyeantic", "pyexactreal", "test"]
sagemath-102 = ["sagemath-102", "flipper", "gmpxxyy", "pyeantic", "pyexactreal", "test"]
sagemath-103 = ["sagemath-103", "flipper", "gmpxxyy", "pyeantic", "pyexactreal", "test"]
asv = ["asv"]
doc = ["doc", "flipper", "gmpxxyy", "pyeantic", "pyexactreal", "pyflatsurf"]
dev = ["dev", "sagemath-104", "flipper", "gmpxxyy", "pyeantic", "pyexactreal", "pyflatsurf", "ipyvue-flatsurf", "test", "lint"]
# Shared dependencies for all features below.
[tool.pixi.dependencies]
bidict = "*"
matplotlib-base = "*"
more-itertools = "*"
numpy = "*"
surface-dynamics = ">=0.6.0,<0.7"
sagelib = ">=9.4"
gap-defaults = "*"
pip = "*"
conda = "*"
[tool.pixi.pypi-dependencies]
sage-flatsurf = { path = ".", editable = true }
[tool.pixi.feature.test.dependencies]
# sage's run_doctest needs ipywidgets
ipywidgets = "*"
pytest = "*"
pytest-xdist = "*"
pytest-repeat = "*"
[tool.pixi.feature.test.tasks]
doctest = "sage -tp --force-lib --optional=sage$SAGE_OPTIONALS_FLIPPER$SAGE_OPTIONALS_PYEANTIC$SAGE_OPTIONALS_PYEXACTREAL$SAGE_OPTIONALS_PYFLATSURF flatsurf doc"
doctest-long = "sage -tp --long --force-lib --optional=sage$SAGE_OPTIONALS_FLIPPER$SAGE_OPTIONALS_PYEANTIC$SAGE_OPTIONALS_PYEXACTREAL$SAGE_OPTIONALS_PYFLATSURF flatsurf doc"
[tool.pixi.feature.flipper]
activation.env.SAGE_OPTIONALS_FLIPPER = ",flipper"
[tool.pixi.feature.flipper.pypi-dependencies]
flipper = "*"
[tool.pixi.feature.gmpxxyy]
activation.env.SAGE_OPTIONALS_GMPXXYY = ",gmpxxyy"
[tool.pixi.feature.gmpxxyy.dependencies]
gmpxxyy = "*"
[tool.pixi.feature.pyeantic]
activation.env.SAGE_OPTIONALS_PYEANTIC = ",pyeantic"
[tool.pixi.feature.pyeantic.dependencies]
pyeantic = ">=1,<3"
[tool.pixi.feature.pyexactreal]
activation.env.SAGE_OPTIONALS_PYEXACTREAL = ",pyexactreal"
[tool.pixi.feature.pyexactreal.dependencies]
pyexactreal = ">=3.1.0,<5"
[tool.pixi.feature.pyflatsurf]
activation.env.SAGE_OPTIONALS_PYFLATSURF = ",pyflatsurf"
[tool.pixi.feature.pyflatsurf.dependencies]
pyflatsurf = ">=3.15.2,<4"
[tool.pixi.feature.ipyvue-flatsurf.dependencies]
# ipyvue-flatsurf pins to an old version of ruamel-yaml for no good reason so we have to force that.
"ruamel.yaml" = "0.17.*"
[tool.pixi.feature.ipyvue-flatsurf.pypi-dependencies]
ipyvue-flatsurf = ">=0.6.0,<0.7.0"
[tool.pixi.feature.lint.dependencies]
black = "*"
codespell = "*"
pylint = "*"
ruff = "*"
pycodestyle = "*"
[tool.pixi.feature.lint.tasks]
# We run our notebooks through black to make sure everything is nicely formatted in our examples.
# Consequently, we cannot use SageMath syntax in the notebooks. (But presently we do not need it anyway.)
black = "black flatsurf/**/*.py && jupytext --sync --pipe black doc/examples/*.md"
codespell = "codespell flatsurf"
# We ignore warnings in pycodestyle that are incompatible with black's formatting rules
pycodestyle = "pycodestyle --ignore=E203,W503 --max-line-length=256 flatsurf/ test/"
ruff = "ruff check --select C4,UP008,UP031,UP034 ."
# A lot of linters are disabled, see .pylintrc. We should enable most of them eventually.
pylint = "pylint flatsurf"
lint = { depends-on = ["black", "codespell", "pycodestyle", "ruff", "pylint"] }
[tool.pixi.feature.dev.dependencies]
jupyterlab = "*"
jupytext = "*"
twine = "*"
rever = "*"
[tool.pixi.feature.dev.tasks]
sage = "sage"
jupyter = "jupyter lab"
pytest = "pytest -n auto test"
test = "pixi run doctest-long && pixi run pytest"
[tool.pixi.feature.doc.dependencies]
furo = "*"
jupyter_sphinx = "*"
myst-nb = "*"
scipy = "*"
sphinx = ">=7,<8"
tachyon = "*"
veerer = "*"
linkchecker = "*"
[tool.pixi.feature.doc.pypi-dependencies]
sage-docbuild = "==10.3"
[tool.pixi.feature.doc.tasks.doc-build]
cwd = "doc"
cmd = "make html SPHINXOPTS='-W -n --keep-going'"
[tool.pixi.feature.doc.tasks.doc]
cmd = """
sh -c '
python -m http.server $PORT --bind localhost --directory _build/html &
SERVER_PID=$!
trap "kill $SERVER_PID" EXIT
sleep 1
echo "Preview the documentation at http://localhost:$PORT/"
echo "Press Ctrl-C to continue"
wait $SERVER_PID
'
"""
env = { PORT = "8880" }
depends-on = ["doc-build"]
cwd = "doc"
[tool.pixi.feature.doc.tasks.doc-linkcheck]
cmd = "make linkcheck"
depends-on = ["doc-build"]
cwd = "doc"
[tool.pixi.feature.sagemath-97.dependencies]
sagelib = "9.7"
python = "~=3.10.0"
[tool.pixi.feature.sagemath-98.dependencies]
sagelib = "9.8"
python = "~=3.10.0"
[tool.pixi.feature.sagemath-100.dependencies]
sagelib = "10.0"
python = "~=3.10.0"
[tool.pixi.feature.sagemath-101.dependencies]
sagelib = "10.1"
python = "~=3.10.0"
[tool.pixi.feature.sagemath-102.dependencies]
sagelib = "10.2"
python = "~=3.11.0"
[tool.pixi.feature.sagemath-103.dependencies]
sagelib = "10.3"
python = "~=3.11.0"
[tool.pixi.feature.sagemath-104.dependencies]
sagelib = "10.4"
python = "~=3.12.0"
[tool.pixi.feature.asv.dependencies]
asv = ">=0.6.4,<0.7"
libmambapy = "*"
conda-build = "*"
[activation.env]
MAKEFLAGS = "-j$(nproc)"
SAGE_NUM_THREADS = "$(nproc)"