CentreForDigitalHumanities / CentreForDigitalHumanities/programming-in-python

Single .py file for lesson and solution files

Offen
#23 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Jupyter Notebook
Sterne
1
Forks
1
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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?

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.