@@ -4,8 +4,6 @@ SHELL = /bin/bash
44
55YML = $(wildcard notebooks/** /* .yml)
66REQ := $(basename $(notdir $(YML ) ) )
7- NB != find chapters -name "*.quarto_ipynb" -o -name "*.ipynb" -not -path \
8- "*/.jupyter_cache/*"
97
108CONDA_ENV != conda info --base
119CONDA_ACTIVATE := source $(CONDA_ENV ) /etc/profile.d/conda.sh ; \
2018 @echo " Usage:"
2119 @echo " make environment - Create Conda environments"
2220 @echo " make kernel - Create Conda environments and Jupyter kernels"
23- @echo " make post-render - Post-render Quarto book"
24- @echo " make preview - Preview Jupyter Book"
2521 @echo " "
2622 @echo " make teardown - Remove Conda environments and Jupyter kernels"
2723 @echo " make clean - Removes ipynb_checkpoints and quarto \
@@ -47,30 +43,10 @@ $(KERNEL_DIR):
4743kernel : $(CONDA_ENV ) /envs/eo-datascience $(CONDA_ENV_DIR ) $(KERNEL_DIR )
4844 @echo -e " jupyter kernels are ready."
4945
50- post-render :
51- $(foreach f, $(NB ) , \
52- mv $(f ) " $( subst chapters,notebooks,$( subst .quarto_ipynb,.ipynb,$( f) ) ) " ; )
53- cp ./Makefile ./notebooks/
54- cp -r ./chapters/images ./notebooks
55-
56- preview : $(CONDA_ENV ) /envs/eo-datascience $(CONDA_ENV_DIR ) $(KERNEL_DIR )
57- $(CONDA_ACTIVATE ) eo-datascience
58- - mkdir -p _preview/notebooks
59- python -m pip install .
60- cp ./chapters/references.bib ./_preview/notebooks/
61- cp -r ./chapters/images ./_preview/notebooks
62- wget https://raw.githubusercontent.com/TUW-GEO/eo-datascience-cookbook/refs/heads/main/README.md -nc -P ./_preview
63- wget https://raw.githubusercontent.com/TUW-GEO/eo-datascience-cookbook/refs/heads/main/_config.yml -nc -P ./_preview
64- wget https://raw.githubusercontent.com/TUW-GEO/eo-datascience-cookbook/refs/heads/main/notebooks/how-to-cite.md -nc -P ./_preview/notebooks
65- render_sfinx_toc ./_preview
66- clean_nb ./notebooks ./_preview/notebooks
67- jupyter-book build ./_preview
68- jupyter-book build ./_preview
69-
7046clean :
71- rm --force --recursive .ipynb_checkpoints/ ** /.ipynb_checkpoints/ _book/ \
72- _freeze/ .quarto/ _preview/ ./pytest_cache ./ ** / ** / ** /.jupyter_cache \
73- . /** /** /.jupyter_cache
47+ rm --force --recursive ** / .ipynb_checkpoints ** /** / .ipynb_checkpoints \
48+ ** / ** / ** /.ipynb_checkpoints ./pytest_cache ** /.jupyter_cache \
49+ ** / ** /.jupyter_cache ** /** /** /.jupyter_cache
7450
7551teardown :
7652 conda remove -n eo-datascience --all -y
0 commit comments