ehmatthes / ehmatthes/intro_programming
Refactor build_html_site.py
- Dominant language
- Jupyter Notebook
- Stars
- 400
- Forks
- 191
- PR merge metrics
- No merged PRs in 30d
Description
The script can certainly be cleaned up. Some improvements would be in-script refactoring work, some would involve modifying notebooks and templates.
- Instead of manually specifying which notebooks get show/hide all output buttons, either set a notebook metadata property and check for that in the template, or examine the notebook and look for any output blocks. If no output blocks, don't include the show/hide all output buttons. (See #148)
- Approach to deleting and rebuilding html_site/ has five levels of nesting. That can be simplified or refactored into functions.
- The script currently calls nbconvert from the command line from within a python script. I did this because I first learned to use nbconvert from the command line. Since we're using a python script, it would be better to use nbconvert as a library. See [here](http://nbconvert.readthedocs.io/en/latest/nbconvert_library.html). This might reduce the need for separate files like scripts/my_config.py, and would eliminate the use of environment variables.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.