Skip to content

Conversation

@matthewfeickert
Copy link
Member

  • Use binder/postBuild pattern to install conda explicit spec export of Pixi environment into Binder conda environment.
  • Remove binder/apt.txt and binder/requirements.txt.
  • Update book/introduction.md to note that for pip or uv users the dependencies are in book/requirements.txt.

@matthewfeickert matthewfeickert self-assigned this Dec 2, 2025
@matthewfeickert matthewfeickert added the documentation Improvements or additions to documentation label Dec 2, 2025
@matthewfeickert matthewfeickert added enhancement New feature or request binder Binder related labels Dec 2, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR modernizes the Binder deployment by using a locked Pixi environment instead of manually maintained requirements files. It installs Pixi during the Binder build and exports a conda explicit spec from the Pixi workspace to ensure environment reproducibility. The changes also update Python to 3.13 and consolidate dependency management.

Key changes:

  • Adds jq as a conda dependency in pixi.toml (previously in binder/apt.txt)
  • Implements a new Binder build approach using Pixi workspace export to conda explicit spec
  • Updates book/requirements.txt with current dependency versions for pip/uv users

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
pixi.toml Added jq as a dependency to replace the apt package
pixi.lock Lock file updates for jq and its dependency oniguruma across all platforms
book/requirements.txt Updated from minimal jupyter-book spec to full dependency list for pip users
book/introduction.md Updated documentation to reference book/requirements.txt instead of binder/requirements.txt
binder/runtime.txt Updated Python version from 3.12 to 3.13
binder/requirements.txt Removed (dependencies now managed through Pixi)
binder/postBuild Replaced ROOT installation with Pixi-based workflow
binder/apt.txt Removed (jq now installed via conda)
Comments suppressed due to low confidence (1)

binder/postBuild:6

  • Installing Pixi via curl in the postBuild script introduces a potential security risk and build reproducibility concern. The script downloads and executes code without verification. Consider:
  1. Pinning to a specific Pixi version
  2. Verifying the checksum of the downloaded installer
  3. Or pre-installing Pixi in the base Binder image if possible
curl -fsSL https://pixi.sh/install.sh | sh

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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
. ~/.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.

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 binder/postBuild pattern to install conda explicit spec export
  of Pixi environment into Binder conda environment.
* Remove binder/apt.txt and binder/requirements.txt.
* Update book/introduction.md to note that for pip or uv users the
  dependencies are in book/requirements.txt.
@matthewfeickert matthewfeickert force-pushed the feat/condense-binder-to-pixi branch from 4ff6dd3 to 1357386 Compare December 2, 2025 01:17
@matthewfeickert matthewfeickert merged commit 1cb3f8a into main Dec 2, 2025
5 checks passed
@matthewfeickert matthewfeickert deleted the feat/condense-binder-to-pixi branch December 2, 2025 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

binder Binder related documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants