-
Notifications
You must be signed in to change notification settings - Fork 7
Enable jupyterlite pixi tasks #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+116
−14
Merged
Changes from 17 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
5bcb0b6
Explain how to launch executable tutorials.
danielballan d794c80
WIP: enable jupyterlite pixi tasks
ksunden a83ac3f
Nuke environment.yml, not needed
danielballan c936f0f
Fix rebase mistake
danielballan c640a92
Update path to jupyterlab settings overrides.
danielballan 654925b
build -> _build
danielballan 16ea233
Give absolute path to activation script.
danielballan 9871c42
Fix env var for PIXI_PROJECT_ROOT
ksunden b5d5e05
Reorganize base environment into feature
ksunden 89559da
Indirection for activation script since extension is important
ksunden ec9f315
Fix activation script
ksunden d64e68b
Add script to convert md files into ipynb for jupyterlite
ksunden 84e16c4
Add some pins in pixi.toml for jupyterlite deps
ksunden c1b8e95
Fix merge conflict
ksunden 9aa694c
Better comment conversion script
ksunden 1865482
Add jupytext to jupyterlite-host for conversion
ksunden 98b65bf
Add ipympl to jupyterlite-host env
ksunden e7d2c81
Add jupyterlite build_wasm to ci/cd workflows
ksunden File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eux | ||
|
||
mkdir -p ${CONDA_PREFIX}/share/jupyter/lab/settings | ||
cp ${PIXI_PROJECT_ROOT}/.binder/overrides.json ${CONDA_PREFIX}/share/jupyter/lab/settings/overrides.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
# This is a script which copies the contents of the tutorials | ||
# directory into a build directory (_build/ipynbs). | ||
# The notebook markdown files are converted to ipynbs with other | ||
# files (non-executable md files, static images, etc) are copied | ||
# directly. | ||
# This is intended for jupyterlite to build pointing to the build | ||
# directory since the markdown files do not currently work in | ||
# jupyterlite. | ||
|
||
# Find Markdown files convert. | ||
files_to_process=$(find tutorials -type f) | ||
|
||
OUTDIR="_build/ipynbs" | ||
|
||
# Identify Markdown files that are Jupytext and convert them all. | ||
for file in ${files_to_process}; do | ||
# Ensure result directory exists | ||
echo "Making directory: $OUTDIR/$(dirname $file)" | ||
mkdir -p $OUTDIR/$(dirname $file) | ||
|
||
echo loop in $file | ||
# Extract the kernel information from the Jupytext Markdown file. | ||
kernel_info=$(grep -A 10 '^---$' "$file" | grep -E 'kernelspec') | ||
# Copy directly if not a notebook file | ||
if [ -z "$kernel_info" ]; then | ||
cp $file $OUTDIR/$file | ||
continue | ||
fi | ||
# Convert to ipynb format, to be consumed by pytest nbval plugin. | ||
notebook_file="${file%.md}.ipynb" | ||
jupytext --to ipynb "$file" --output $OUTDIR/${notebook_file} | ||
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.