Skip to content

Commit

Permalink
Corrections avec echo true (#279)
Browse files Browse the repository at this point in the history
* overwrite echo false

* force qmd

* correct

* include

* nump

* gha

* Automated changes

* Automated changes

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
linogaliana and github-actions[bot] committed Sep 24, 2022
1 parent eb8f922 commit d068cb6
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/netlify-test.yaml
Expand Up @@ -131,6 +131,7 @@ jobs:
run: |
git diff --name-only origin/master origin/${GITHUB_HEAD_REF} >> diff
python build/tweak_render.py
python build/tweak_options_quarto.py
python build/pimp_notebook.py
quarto render content --to ipynb --execute
mkdir -p corrections
Expand Down
20 changes: 20 additions & 0 deletions build/tweak_options_quarto.py
@@ -0,0 +1,20 @@
import glob
import re

from tweak_markdown import read_file, write_file

with open('diff') as f:
lines = f.read().splitlines()

list_files = [l for l in lines if l.endswith('.qmd')]

def clean_overwrite_file(fl):
content = read_file(fl)
content = re.sub("#\|echo: false", "", content)
content = re.sub("#\| echo: false", "", content)
content = re.sub("#\|include: false", "", content)
content = re.sub("#\| include: false", "", content)
write_file(fl, content)

if __name__ == '__main__':
[clean_overwrite_file(fl) for fl in list_files]
5 changes: 3 additions & 2 deletions content/course/manipulation/01_numpy/index.qmd
Expand Up @@ -60,8 +60,9 @@ np.random.seed(12345)
```


Si les scripts suivants sont exécutés dans un `Notebook Jupyter`, il est recommandé d'utiliser les paramètres suivants
pour contrôler le rendu
Si les scripts suivants sont exécutés dans un `Notebook Jupyter`,
il est recommandé d'utiliser les paramètres suivants
pour contrôler le rendu:

~~~python
from IPython.core.interactiveshell import InteractiveShell
Expand Down

0 comments on commit d068cb6

Please sign in to comment.