Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions strip_solutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import os
from shutil import copytree, ignore_patterns

KERNELNAME = "DMSC-School"

BASE_CELL = {
"cell_type": "code",
"execution_count": None,
Expand Down Expand Up @@ -56,6 +58,10 @@ def clean(filepath, destination, add_mpl_widget_cell=False):
out.append(cell)
obj["cells"] = out

# Update kernelspec name
obj["metadata"]["kernelspec"]["display_name"] = KERNELNAME
obj["metadata"]["kernelspec"]["name"] = KERNELNAME

outfile = os.path.join(destination, filepath)
with open(outfile, "w", encoding="utf-8") as f:
json.dump(obj, f, indent=1)
Expand Down Expand Up @@ -89,6 +95,8 @@ def clean(filepath, destination, add_mpl_widget_cell=False):
".python-version",
"requirements.in",
"typos.toml",
"pixi.toml",
"pixi.lock",
),
dirs_exist_ok=True,
)
Expand Down
Loading