Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion binder/apt.txt

This file was deleted.

21 changes: 13 additions & 8 deletions binder/postBuild
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
#!/bin/bash
#!/usr/bin/env bash

set -e
set -ex

# Make ROOT available for comparisons and workspace use
# c.f. https://github.com/conda-forge/root-feedstock
conda config --add channels conda-forge
conda config --set channel_priority strict
# Install Pixi
curl -fsSL https://pixi.sh/install.sh | sh
echo 'eval "$(pixi completion --shell bash)"' >> ~/.bashrc
. ~/.bashrc
# Sourcing ~/.bashrc doesn't seem to pick up changes, so manually set PATH
export PATH="~/.pixi/bin:${PATH}"
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tilde (~) in the PATH export will not expand to the home directory because it's inside double quotes. This should use $HOME instead:

export PATH="$HOME/.pixi/bin:${PATH}"
Suggested change
export PATH="~/.pixi/bin:${PATH}"
export PATH="$HOME/.pixi/bin:${PATH}"

Copilot uses AI. Check for mistakes.

Comment on lines +8 to 11
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sourcing ~/.bashrc won't work reliably in non-interactive scripts. The Pixi installation typically modifies .bashrc for interactive shells only. Consider using the Pixi binary path directly by setting the PATH immediately after installation without relying on shell configuration files.

Suggested change
. ~/.bashrc
# Sourcing ~/.bashrc doesn't seem to pick up changes, so manually set PATH
export PATH="~/.pixi/bin:${PATH}"
# Removed sourcing of ~/.bashrc; set PATH directly instead
export PATH="$HOME/.pixi/bin:${PATH}"

Copilot uses AI. Check for mistakes.
# Use mamba to speed up install
mamba install --yes root_base
# Export workspace to conda explicit spec
pixi workspace export conda-explicit-spec --platform linux-64 binder/

# Install environment
mamba install --name notebook --file binder/default_linux-64_conda_spec.txt
10 changes: 0 additions & 10 deletions binder/requirements.txt

This file was deleted.

2 changes: 1 addition & 1 deletion binder/runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.12
python-3.13
8 changes: 1 addition & 7 deletions book/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,7 @@ pixi run start

#### Using `pip`

then install from the included `requirements.txt` in the top level `binder/` directory of [the source repository](https://github.com/pyhf/pyhf-tutorial)

```
(pyhf-tutorial) $ python -m pip install --upgrade --requirement binder/requirements.txt
```

If you want to also get the dependencies to build and explore the Jupyter Book form of the tutorial you can install them with
then install from the included `requirements.txt` in the top level `book/` directory of [the source repository](https://github.com/pyhf/pyhf-tutorial)

```
(pyhf-tutorial) $ python -m pip install --upgrade --requirement book/requirements.txt
Expand Down
13 changes: 12 additions & 1 deletion book/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
jupyter-book==0.15.1
pyhf[xmlio,minuit,contrib]==0.7.6
# visualization
ipywidgets~=8.1.8
ipympl~=0.9.8
pandas~=2.3.3
altair~=6.0.0
rich==14.2.0
# jupyter notebooks
notebook>=7.0.0
jupyterlab>=4.0.3
# book
jupyter-book==2.0.2
86 changes: 86 additions & 0 deletions pixi.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ altair = ">=6.0.0,<7"
rich = ">=14.2.0,<15"
# comparison
root_base = ">=6.36.4,<7"
jq = ">=1.8.1,<2"

[feature.lab.dependencies]
notebook = ">=7.5.0,<8"
Expand Down