-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpixi.toml
More file actions
159 lines (139 loc) · 4.42 KB
/
pixi.toml
File metadata and controls
159 lines (139 loc) · 4.42 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
[workspace]
channels = ["https://prefix.dev/conda-forge"]
platforms = ["linux-64", "osx-arm64", "osx-64"]
preview = ["pixi-build"]
# -------------------------------
# === Packaging Configuration ===
# -------------------------------
[package]
version = "dynamic" # Until pixi recommends something else
[package.build]
backend = { name = "pixi-build-python", version = "*" }
[package.build.config]
noarch = false
[workspace.build-variants]
python = ["3.10.*", "3.11.*", "3.12.*", "3.13.*", "3.14.*"]
[package.host-dependencies]
uv = "*"
python = "*"
hatch-cython = ">=0.6.0"
hatch-vcs = "*"
cython = ">=3.1,<4"
llvm-openmp = "*"
cherab = "1.5.*"
[package.run-dependencies]
imas-python = "*"
typing-extensions = ">=4.5"
# ---------------------------------
# === Development Configuration ===
# ---------------------------------
[dependencies]
cherab-imas = { path = "." }
ipython = "*"
pooch = "*"
rich = "*"
# Publication-quality plot
ultraplot = ">=1.72.0"
# Visualization for 3D-related stuff
plotly = ">=6.5.2,<7"
[tasks]
ipython = { cmd = "ipython", description = "🐍 Start an IPython shell" }
# === Testing feature ===
[feature.test.dependencies]
pytest = "*"
pytest-cov = "*"
[feature.test.tasks]
test = { cmd = ["pytest", "tests"], description = "🧪 Run the tests" }
# === Docs feature ===
[feature.docs.dependencies]
sphinx = ">=7,<8.2"
sphinx-copybutton = "*"
sphinx-codeautolink = "*"
sphinx-design = "*"
sphinx-immaterial = "*"
linkify-it-py = "*"
myst-parser = "*"
# For notebook support
ipykernel = "*"
ipywidgets = "*"
nbsphinx = "*"
pandoc = "*"
[feature.docs.pypi-dependencies]
sphinx-github-style = "*"
sphinx-api-relink = "*"
[feature.docs.tasks]
doc-build = { cmd = [
"sphinx-build",
"-b",
"{{ target }}",
"-j",
"auto",
"source",
"build/{{ target }}",
], cwd = "docs", args = [
{ arg = "target", default = "html" },
], description = "📝 Build the docs" }
doc-serve = { cmd = [
"python",
"-m",
"http.server",
"8000",
"--directory",
"build/html",
], cwd = "docs", description = "🚀 Start a local server for the docs" }
# === Linting feature ===
[feature.lint.dependencies]
dprint = "*"
lefthook = "*"
ruff = "*"
typos = "*"
mypy = "*"
pyrefly = "*"
actionlint = "*"
shellcheck = "*"
validate-pyproject = "*"
cython-lint = "*"
blacken-docs = "*"
taplo = "*"
nbstripout = ">=0.9.1,<0.10"
[feature.lint.tasks]
lefthook = { cmd = "lefthook", description = "🔗 Run lefthook" }
hooks = { cmd = "lefthook install", description = "🔗 Install pre-commit hooks" }
pre-commit = { cmd = "lefthook run pre-commit", description = "🔗 Run pre-commit checks" }
mypy = { cmd = "mypy", description = "Type check with mypy" }
pyrefly-check = { cmd = "pyrefly check", description = "Type check with pyrefly" }
ruff-check = { cmd = "ruff check --fix", description = "Lint with ruff" }
ruff-format = { cmd = "ruff format", description = "Format with ruff" }
dprint = { cmd = "dprint fmt", description = "Format with dprint" }
typos = { cmd = "typos --write-changes --force-exclude", description = "Fix typos" }
taplo = { cmd = "taplo fmt", description = "Format toml files with taplo" }
actionlint = { cmd = "actionlint", description = "Lint actions with actionlint" }
blacken-docs = { cmd = "blacken-docs", description = "Format Python markdown blocks with Black" }
validate-pyproject = { cmd = "validate-pyproject pyproject.toml", description = "Validate pyproject.toml" }
cython-lint = { cmd = "cython-lint", description = "Lint Cython files" }
lint = { cmd = "lefthook run pre-commit --all-files --force", description = "🧹 Run all linters" }
# Clean build artifacts
[feature.tools.tasks]
clean = { cmd = "find src -type f \\( -name '*.c' -o -name '*.so' -o -name '*.pyd' -o -name '*.dll' \\) -delete", description = "🧹 Clean build artifacts" }
doc-clean = { cmd = [
"rm",
"-rf",
"build",
"source/_api",
], cwd = "docs", description = "🔥 Clean the docs build & api directory" }
# === Python environment features ===
[feature.py310.dependencies]
python = "3.10.*"
[feature.py314.dependencies]
python = "3.14.*"
[environments]
default = { features = ["py314"], solve-group = "py314" }
docs = { features = ["py314", "docs"], solve-group = "py314" }
test = { features = ["py314", "test"], solve-group = "py314" }
test-py314 = { features = [
"py314",
"test",
], solve-group = "py314" } # alias of test
test-py310 = ["py310", "test"]
lint = { features = ["lint", "test"], solve-group = "py314" }
tools = { features = ["tools"], no-default-feature = true }