Skip to content

Commit 7a369de

Browse files
committed
fix(bash/env): when rebuilt env, had issue with not using the environment's jupyter - add line to get jupyter path, and add jupyter to environment (plus renamed environment)
1 parent 922c502 commit 7a369de

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

environment.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
name: template-des
1+
name: pydesrapmms
22
channels:
33
- conda-forge
44
dependencies:
55
- ipykernel=6.29.5
66
- jinja2=3.1.5
77
- joblib=1.4.2
8+
- jupyter=1.1.1
89
- nbconvert=7.16.6
910
- nbformat=5.10.4
1011
- nbqa=1.9.0

run_notebooks.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
#!/usr/bin/env bash
22

3+
# Get the conda environment's jupyter path
4+
CONDA_JUPYTER=$(dirname "$(which python)")/jupyter
5+
36
# Loop through all notebooks in the specified directory
47
for nb in notebooks/*.ipynb; do
58
echo "🏃 Running notebook: $nb"
69

710
# Execute and update the notebook in-place
811
# With some processing to remove metadata created by nbconvert
9-
if python -m jupyter nbconvert --to notebook --inplace --execute \
12+
if "${CONDA_JUPYTER}" nbconvert --to notebook --inplace --execute \
1013
--ClearMetadataPreprocessor.enabled=True \
1114
--ClearMetadataPreprocessor.clear_notebook_metadata=False \
1215
--ClearMetadataPreprocessor.preserve_cell_metadata_mask="kernelspec" \

0 commit comments

Comments
 (0)