|
|
|
|
|
by elviejo
3025 days ago
|
|
I didn't downvote but I'll try to explain. Is the fact that you got the idea exactly backwards:
is not about putting comments on your scripts.
Is about writing an article, intended to be read by humans, that is also executable. Imagine it this way:
Suppose you are reading a blog post on how to install, configure vagrant and install drupal on it.
The article is pretty clear an well written and you enjoy it. And you also know that is correct because every single one of the instructions shown was executed while you were reading the article and every output was given back to you. That is literate programming, is closer to a jupyter notebook than to 'comments on scripts'. |
|
You can keep the notebook in the repo if you do two (or three) things:
1. The scripts read passwords from a key store instead of the notebook source. I wrote a Python package for doing this easily in Python cells; for bash, I just use subcommands.
2. A git pre-commit hook clears the notebook output cells.
3. (Optional) A git pre-commit or pre-push hook searches for text that looks like private credentials.