From abd3fc68c3ada7b6703fac3f77b4dabc35d923d1 Mon Sep 17 00:00:00 2001 From: Ivan Ogasawara Date: Tue, 2 Apr 2024 21:32:47 -0400 Subject: [PATCH] prepare changes for the blog post --- .makim.yaml | 19 +++++++++++++++++++ poetry.lock | 2 +- pyproject.toml | 2 ++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.makim.yaml b/.makim.yaml index 4596d3c..125e708 100644 --- a/.makim.yaml +++ b/.makim.yaml @@ -21,6 +21,25 @@ groups: docs: targets: + pre-build: + help: pre-build step + shell: bash + run: | + mkdir -p build + # Directory to search for .ipynb files + export SEARCH_DIR="docs/tutorials" + + # Find all .ipynb files, excluding .ipynb_checkpoints, + # and convert them to Markdown named 'index.md' + find "$SEARCH_DIR" -path "*/.ipynb_checkpoints/*" -prune -o -name \ + "*.ipynb" -exec sh -c \ + 'jupyter nbconvert --to markdown --output-dir "$(dirname "$0")" "$0"' {} \; + + # remove console colors from md files + find "$SEARCH_DIR" -name \ + "*.md" -exec sh -c \ + 'cat "$0" | python docs/scripts/clean-output.py > "$(dirname "$0")/temp_index.md" && mv "$(dirname "$0")/temp_index.md" "$0"' {} \; + build: help: Build documentation run: | diff --git a/poetry.lock b/poetry.lock index 2b8df10..864fae5 100644 --- a/poetry.lock +++ b/poetry.lock @@ -3621,4 +3621,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = ">=3.8.1,<4" -content-hash = "4c38b64a95776fed287584531650c23f8ada86323d99e0016bfbd29e3785fecc" +content-hash = "0b816a4e7258c766ee939c9e91b71837ef7318fcea53752ef271ebea33287287" diff --git a/pyproject.toml b/pyproject.toml index 0515434..dd16638 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,6 +54,8 @@ vulture = ">=2.7" compose-go = ">=2.20.2" jupyterlab = ">=4.1.5" nox = ">=2024.3.2" +nbconvert = ">=7.16.3" +pymdown-extensions = ">=10.7.1" [build-system] requires = ["poetry-core>=1.0.0", "poetry>=1.5.1"]