Skip to content

Commit

Permalink
Add Jupyter Build scripts and content is now root
Browse files Browse the repository at this point in the history
  • Loading branch information
Timothy Middelkoop committed Nov 2, 2021
1 parent 8306073 commit 7493d2d
Show file tree
Hide file tree
Showing 16 changed files with 87 additions and 179 deletions.
49 changes: 0 additions & 49 deletions _toc.yml

This file was deleted.

9 changes: 9 additions & 0 deletions build-book.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

python3 -m venv .venv

. .venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install -U jupyter-book sphinx_inline_tabs

jupyter-book build content/
4 changes: 0 additions & 4 deletions class-essentials-story 2.svg

This file was deleted.

File renamed without changes
5 changes: 4 additions & 1 deletion _config.yml → content/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ logo: CLASS-logo.png
# Force re-execution of notebooks on each build.
# See https://jupyterbook.org/content/execute.html
execute:
execute_notebooks: force
execute_notebooks: off

# Ignore build, git, and dev folders.
exclude_patterns: [ _build, .git, .venv, .ipynb_checkpoints, .vscode ]

# Define the name of the latex output file for PDF builds
latex:
Expand Down
49 changes: 49 additions & 0 deletions content/_toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Table of contents
# Learn more at https://jupyterbook.org/customize/toc.html

format: jb-book
root: intro

parts:
- caption: Introduction
chapters:
- file: intro_to_cloud

- caption: CLASS Essentials Modules
chapters:
- file: AWS/intro_to_AWS_Essentials
sections:
- file: AWS/01_intro_to_cloud_console
- file: AWS/02_intro_to_compute_part1
- file: AWS/03_intro_to_compute_part2
- file: AWS/04_intro_to_cli
- file: AWS/05_intro_to_cloud_storage
- file: AWS/06_running_analysis
- file: AWS/07_monitoring_costs
- file: AWS/08_cleaning_up_resources

- file: Azure/intro_to_Azure_Essentials
sections:
- file: Azure/01_intro_to_cloud_console
- file: Azure/02_intro_to_compute_part1
- file: Azure/03_intro_to_compute_part2
- file: Azure/04_intro_to_cli
- file: Azure/05_intro_to_cloud_storage
- file: Azure/06_running_analysis
- file: Azure/07_monitoring_costs
- file: Azure/08_cleaning_up_resources

- file: GCP/intro_to_GCP_Essentials
sections:
- file: GCP/01_intro_to_cloud_console
- file: GCP/02_intro_to_cloud_compute_part1
- file: GCP/03_intro_to_cloud_compute_part2
- file: GCP/04_intro_to_cli
- file: GCP/05_intro_to_cloud_storage
- file: GCP/06_running_analysis
- file: GCP/07_monitoring_costs
- file: GCP/08_cleaning_up_resources

- caption: Extra Learning Materials
chapters:
- file: ELM/01_bash_shell
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
125 changes: 0 additions & 125 deletions markdown.md

This file was deleted.

4 changes: 4 additions & 0 deletions preview-book.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

# Preview html in Visual Studio Code or Cloud Shell preview
python3 -m http.server --directory content/_build/html 8080
20 changes: 20 additions & 0 deletions push-book.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

# Set origin to $1 with a default of "private"
ORIGIN="${1:-private}"
echo "push-book.sh ORIGIN:${ORIGIN}"

BRANCH=$(git symbolic-ref --short HEAD)
git branch -D gh-pages
git checkout -b gh-pages

rm -rf docs/
cp -av content/_build/html/ docs/
touch docs/.nojekyll ## config static

git add docs/
git commit -m "Publish Jupyerbook" docs/

git push --force ${ORIGIN} gh-pages

git checkout ${BRANCH}
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
jupyter-book
sphinx_inline_tabs
matplotlib
numpy

0 comments on commit 7493d2d

Please sign in to comment.