Skip to content

Commit 1ed0371

Browse files
feat: Add Pixi workspace to pyproject.toml
* Add Pixi workspace to pyproject.toml under [tool.pixi] table. * Add Pixi lock file to .gitignore.
1 parent 6b690c5 commit 1ed0371

File tree

3 files changed

+62
-0
lines changed

3 files changed

+62
-0
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.git_archival.txt export-subst
22
*.py diff=python
33
*.md diff=markdown
4+
# SCM syntax highlighting & preventing 3-way merges
5+
pixi.lock merge=binary linguist-language=YAML linguist-generated=true

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,8 @@ htmlcov
4444

4545
# text editors
4646
.vscode/
47+
48+
# pixi environments
49+
.pixi/*
50+
!.pixi/config.toml
51+
pixi.lock

pyproject.toml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,3 +281,58 @@ flake8-tidy-imports.ban-relative-imports = "all"
281281
[tool.ruff.lint.per-file-ignores]
282282
"docs/lite/jupyterlite.py" = ["F401", "F704"]
283283
"**.ipynb" = ["F821", "F401", "F841", "F811", "E703"]
284+
285+
[tool.pixi.workspace]
286+
channels = ["conda-forge"]
287+
platforms = ["linux-64", "osx-arm64"]
288+
289+
[tool.pixi.pypi-dependencies]
290+
pyhf = { path = ".", editable = true }
291+
292+
[tool.pixi.tasks]
293+
294+
[tool.pixi.dependencies]
295+
click = ">=8.0.0"
296+
jsonpatch = ">=1.15"
297+
jsonschema = ">=4.15.0"
298+
pyyaml = ">=5.1"
299+
scipy = ">=1.5.4,!=1.16.0,!=1.16.1,!=1.16.2"
300+
tqdm = ">=4.56.0"
301+
302+
[tool.pixi.feature.xmlio.dependencies]
303+
uproot = ">=4.1.1"
304+
305+
[tool.pixi.feature.jax.dependencies]
306+
jax = ">=0.4.1"
307+
308+
[tool.pixi.feature.jax-cpu.dependencies]
309+
jax = ">=0.4.1"
310+
jaxlib = { version = "*", build = "cpu*" }
311+
312+
[tool.pixi.feature.jax-gpu.dependencies]
313+
jax = ">=0.4.1"
314+
315+
[tool.pixi.feature.jax-gpu.system-requirements]
316+
cuda = "12.0"
317+
318+
[tool.pixi.feature.contrib.dependencies]
319+
matplotlib = ">=3.0.0"
320+
requests = ">=2.22.0"
321+
322+
[tool.pixi.feature.minuit.dependencies]
323+
iminuit = ">=2.7.0"
324+
325+
[tool.pixi.environments]
326+
default = { solve-group = "default" }
327+
jax = { features = ["jax"], solve-group = "default" }
328+
jax-cpu = { features = ["jax-cpu"], solve-group = "default" }
329+
jax-gpu = { features = ["jax-gpu"], solve-group = "gpu" }
330+
xmlio = { features = ["xmlio"], solve-group = "default" }
331+
minuit = { features = ["minuit"], solve-group = "default" }
332+
contrib = { features = ["contrib"], solve-group = "default" }
333+
backends = { features = ["jax", "minuit"], solve-group = "default" }
334+
all = { features = ["jax", "minuit", "xmlio", "contrib"], solve-group = "default" }
335+
336+
# dev = { features = ["dev"], solve-group = "default" }
337+
# docs = { features = ["docs"], solve-group = "default" }
338+
# test = { features = ["test"], solve-group = "default" }

0 commit comments

Comments
 (0)