Skip to content

Commit

Permalink
Deploying to gh-pages from @ 88c8178 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
janash committed Nov 25, 2024
1 parent 33a5f53 commit 450a218
Show file tree
Hide file tree
Showing 160 changed files with 12,240 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 21843f7f3001092ed70092339d9fa442
tags: 645f666f9bcd5a90fca523b33c5a78b7
4 changes: 4 additions & 0 deletions _sources/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Workshop Template
======================================

This is a MolSSI template for creating a Jupyter book.
127 changes: 127 additions & 0 deletions _sources/sample.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Sample Notebook\n",
"\n",
"```{admonition} Overview\n",
":class: overview\n",
"\n",
"Questions:\n",
"\n",
"* What format does MolSSI use for Jupyter books?\n",
"\n",
"Objectives:\n",
"\n",
"* Use custom admonitions\n",
"\n",
"```\n",
"\n",
"The MolSSI Jupyter book template contains many custom admonitions that you should use when developing your notebook. To make an overview plot, use the following syntax:\n",
"\n",
"````\n",
"\n",
"```{admonition} Overview\n",
":class: overview\n",
"\n",
"Questions:\n",
"\n",
"* What format does MolSSI use for Jupyter books?\n",
"\n",
"Objectives:\n",
"\n",
"* Use custom admonitions\n",
"\n",
"```\n",
"````\n",
"\n",
"We also have custom exercise admonitions:\n",
"\n",
"``````{admonition} Exercise\n",
":class: exercise\n",
"\n",
"This is an exercise\n",
"\n",
"`````{admonition} Solution\n",
":class: solution dropdown\n",
"\n",
"This is a solution\n",
"\n",
"`````\n",
"``````\n",
"\n",
"Syntax:\n",
"\n",
"```````\n",
"``````{admonition} Exercise\n",
":class: exercise\n",
"\n",
"This is an exercise\n",
"\n",
"`````{admonition} Solution\n",
":class: solution dropdown\n",
"\n",
"This is a solution\n",
"\n",
"`````\n",
"``````\n",
"```````\n",
"\n",
"\n",
"```{admonition} Key Points\n",
":class: key\n",
"\n",
"* Key Point 1\n",
"\n",
"* Key Point 2\n",
"\n",
"```\n",
"\n",
"Syntax:\n",
"\n",
"````\n",
"```{admonition} Key Points\n",
":class: key\n",
"\n",
"* Key Point 1\n",
"\n",
"* Key Point 2\n",
"\n",
"```\n",
"````\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.3"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}
81 changes: 81 additions & 0 deletions _sources/sample2.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Sample Notebook 2\n",
"\n",
"It might be more transferable to use colored divs for special sections.\n",
"\n",
"Blue for overview\n",
"<div class=\"alert alert-block alert-info\"> \n",
"<h2>Overview</h2>\n",
"\n",
"<strong>Questions:</strong>\n",
"* How do I use colored divs in a notebook?\n",
"\n",
"<strong>Objectives:</strong>\n",
"* Learn how to use colored divs in a notebook.\n",
"\n",
"</div>\n",
"\n",
"Green for information\n",
"<div class=\"alert alert-block alert-success\">\n",
"<h3>Information</h3>\n",
"This is some useful information.\n",
"\n",
"```python\n",
"print(\"Hello, World!\")\n",
"```\n",
"</div>\n",
"\n",
"<div class=\"alert alert-block alert-warning\">\n",
"<h3>Exercise</h3>\n",
"Orange for exercises.\n",
"</div>\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"ename": "",
"evalue": "",
"output_type": "error",
"traceback": [
"\u001b[1;31mFailed to start the Kernel. \n",
"\u001b[1;31mUnable to start Kernel 'Julia 1.10.4' due to a timeout waiting for the ports to get used. \n",
"\u001b[1;31mView Jupyter <a href='command:jupyter.viewOutput'>log</a> for further details."
]
}
],
"source": [
"print(\"Hello, World!\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "jupyter-book-2024",
"language": "python",
"name": "python3"
},
"language_info": {
"name": "python",
"version": "3.12.7"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
42 changes: 42 additions & 0 deletions _sources/setup.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "collective-theorem",
"metadata": {},
"source": [
"# Set Up\n",
"\n",
"This page should give directions for setting up the software environment for the lessons. \n",
"\n",
"## Installing Julia\n",
"Put Directions for installing Julia here.\n",
"\n",
"## Obtain lesson materials\n",
"Give directions for obtaining any lesson materials here.\n",
"These might be pre-filled notebooks or files to download.\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
101 changes: 101 additions & 0 deletions _sphinx_design_static/design-tabs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
// @ts-check

// Extra JS capability for selected tabs to be synced
// The selection is stored in local storage so that it persists across page loads.

/**
* @type {Record<string, HTMLElement[]>}
*/
let sd_id_to_elements = {};
const storageKeyPrefix = "sphinx-design-tab-id-";

/**
* Create a key for a tab element.
* @param {HTMLElement} el - The tab element.
* @returns {[string, string, string] | null} - The key.
*
*/
function create_key(el) {
let syncId = el.getAttribute("data-sync-id");
let syncGroup = el.getAttribute("data-sync-group");
if (!syncId || !syncGroup) return null;
return [syncGroup, syncId, syncGroup + "--" + syncId];
}

/**
* Initialize the tab selection.
*
*/
function ready() {
// Find all tabs with sync data

/** @type {string[]} */
let groups = [];

document.querySelectorAll(".sd-tab-label").forEach((label) => {
if (label instanceof HTMLElement) {
let data = create_key(label);
if (data) {
let [group, id, key] = data;

// add click event listener
// @ts-ignore
label.onclick = onSDLabelClick;

// store map of key to elements
if (!sd_id_to_elements[key]) {
sd_id_to_elements[key] = [];
}
sd_id_to_elements[key].push(label);

if (groups.indexOf(group) === -1) {
groups.push(group);
// Check if a specific tab has been selected via URL parameter
const tabParam = new URLSearchParams(window.location.search).get(
group
);
if (tabParam) {
console.log(
"sphinx-design: Selecting tab id for group '" +
group +
"' from URL parameter: " +
tabParam
);
window.sessionStorage.setItem(storageKeyPrefix + group, tabParam);
}
}

// Check is a specific tab has been selected previously
let previousId = window.sessionStorage.getItem(
storageKeyPrefix + group
);
if (previousId === id) {
// console.log(
// "sphinx-design: Selecting tab from session storage: " + id
// );
// @ts-ignore
label.previousElementSibling.checked = true;
}
}
}
});
}

/**
* Activate other tabs with the same sync id.
*
* @this {HTMLElement} - The element that was clicked.
*/
function onSDLabelClick() {
let data = create_key(this);
if (!data) return;
let [group, id, key] = data;
for (const label of sd_id_to_elements[key]) {
if (label === this) continue;
// @ts-ignore
label.previousElementSibling.checked = true;
}
window.sessionStorage.setItem(storageKeyPrefix + group, id);
}

document.addEventListener("DOMContentLoaded", ready, false);
1 change: 1 addition & 0 deletions _sphinx_design_static/sphinx-design.min.css

Large diffs are not rendered by default.

Loading

0 comments on commit 450a218

Please sign in to comment.