CentreForDigitalHumanities / CentreForDigitalHumanities/programming-in-python

Single .py file for lesson and solution files

未关闭
#23 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
enhancement
主要语言
Jupyter Notebook
星标
1
派生
1
PR 合并指标
30 天内没有已合并 PR

描述

Currently, when I adapt anything in a lesson or solution, I need to change the corresponding lesson/solution as well. This is easy to forget, leads to incongruences and is generally not very dry, especially since the only difference between these files should be the solutions to the answers.

I wonder if there is a way to generate both the lesson notebook and solution notebook from the same `.py` file.

@JeltevanBoheemen: since you are the Keeper of Knowledge when it comes to this `.py -> .ipynb` conversion, is it possible to mark solution blocks with `# %% [solution]` and exclude them in the generation of the lesson notebooks?

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。