Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare jupyter book for discussion #9

Closed
kuchaale opened this issue Apr 9, 2021 · 2 comments
Closed

Prepare jupyter book for discussion #9

kuchaale opened this issue Apr 9, 2021 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@kuchaale
Copy link
Member

kuchaale commented Apr 9, 2021

See VACILT/trend_paper/#4 or my book here.

@kuchaale kuchaale added documentation Improvements or additions to documentation enhancement New feature or request labels Apr 9, 2021
@kuchaale kuchaale assigned kuchaale and unassigned kuchaale Apr 9, 2021
@kuchaale
Copy link
Member Author

The Github page is ready on this address: https://vacilt.github.io/SSW_project/. So far it is set to be built from the /docs folder in the master branch. We can manually put the content there as stated here.

@kuchaale kuchaale removed the enhancement New feature or request label Apr 27, 2021
@kuchaale
Copy link
Member Author

kuchaale commented May 3, 2021

I would like to add hide-input tag to all notebooks. It will enhance readability (see here). You can adapt the following script:

import os.path
import nbformat as nbf
from glob import glob

notebooks = glob(os.path.join(path, "*.ipynb"))

for ipath in notebooks:
    ntbk = nbf.read(ipath, nbf.NO_CONVERT)

    for cell in ntbk.cells:
        cell_tags = cell.get("metadata", {}).get("tags", [])
        if len(cell_tags) == 0:
            cell_tags.append("hide-input")
        cell["metadata"]["tags"] = cell_tags

    nbf.write(ntbk, os.path.join(path, os.path.splitext(os.path.basename(ipath))[0]+"_clean.ipynb"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants