Skip to content

Commit eb26663

Browse files
committed
Remove _scripts, use new PyPI module instead
I've refactored the notebook post-processing into the `jljb` module.
1 parent 0fc5f00 commit eb26663

File tree

15 files changed

+8
-2009
lines changed

15 files changed

+8
-2009
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,12 @@ when opened as a notebook. Another difference we want to see between the HTML
187187
and the notebook version is that we want to avoid putting the solutions in the
188188
notebook version, to allow more space for thought about the exercise. Both to
189189
modify any ugly formatting, and to remove the exercise solutions, we
190-
post-process the pages with a script `_scripts/process_notebooks.py` to load
191-
the pages as text notebooks, and write out `.ipynb` files with modified markup
192-
that looks better in a Jupyter interface. Some of the authoring advice here is
193-
to allow that process to work smoothly, because the `process_notebooks.py` file
194-
reads the input Myst-MD format notebooks using
190+
post-process the pages with a script `jljb-write-dir` from the [jljb
191+
package](https://github.com/matthew-brett/jljb) to load the pages as text
192+
notebooks, and write out `.ipynb` files with modified markup that looks better
193+
in a Jupyter interface. Some of the authoring advice here is to allow that
194+
process to work smoothly, because the `process_notebooks.py` file reads the
195+
input Myst-MD format notebooks using
195196
[Jupytext](https://jupytext.readthedocs.io) before converting to Jupyter
196197
`.ipynb` files.
197198

Makefile

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,7 @@ html:
1111
jl:
1212
# Jupyter-lite files for book build.
1313
$(PIP_INSTALL_CMD) -r jl-build-requirements.txt
14-
rm -rf $(JL_DIR)
15-
mkdir $(JL_DIR)
16-
cp -r data images $(JL_DIR)
17-
$(PYTHON) _scripts/process_notebooks.py $(JL_DIR)
18-
$(PYTHON) -m jupyter lite build \
19-
--contents $(JL_DIR) \
20-
--output-dir $(BUILD_DIR)/interact \
21-
--lite-dir $(JL_DIR)
14+
jljb-write-dir $(BUILD_DIR)/interact data images --jl-tmp $(JL_DIR)
2215

2316
lint:
2417
pre-commit run --all-files --show-diff-on-failure --color always

_config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ exclude_patterns:
2121
- LICENSE.md
2222
- CONTRIBUTING.md
2323
- todo.md
24-
- _scripts/*
2524
- _notes/*
2625
- _to_ignore.md
2726
- data/LICENSE.txt

_scripts/examples2nb.py

Lines changed: 0 additions & 244 deletions
This file was deleted.

0 commit comments

Comments
 (0)