Skip to content

Commit

Permalink
Merge pull request #11 from aaronyicongfu/main
Browse files Browse the repository at this point in the history
added jupyterlite
  • Loading branch information
aaronyicongfu authored Sep 25, 2024
2 parents 571a2aa + 1d8c0d7 commit 69e228e
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 20 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
docs/build
*.swp
docs/source/images/people/.DS_Store
.DS_Store

*.db
23 changes: 23 additions & 0 deletions docs/source/OutreachBlogPosts/python.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
======
Python
======

This is an in-browser python execution environment where you can test your
python code live:

.. replite::
:kernel: xeus-python
:height: 900px
:prompt_color: #dc3545

from IPython.display import clear_output
import matplotlib.pyplot as plt
import numpy as np

x = np.linspace(0, 2 * np.pi, 101)

for i in range(100):
clear_output(wait=True)
y = np.sin(x + i * 0.1)
plt.plot(x, y)
plt.pause(0.1)
38 changes: 20 additions & 18 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,39 @@

# -- Project information -----------------------------------------------------

project = 'SMDO Research Group'
copyright = '2023, SMDO Group'
author = 'SMDO Group'
project = "SMDO Research Group"
copyright = "2023, SMDO Group"
author = "SMDO Group"

# The full version, including alpha/beta/rc tags
release = '0.0.1'
release = "0.0.1"


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.

# fmt: off
extensions = [
"sphinx.ext.githubpages", # publish HTML docs in github pages
"sphinxcontrib.bibtex", # 3rd-party extension that handles bibtex,
# can be installed by:
# can be installed by:
# $ pip install sphinxcontrib-bibtex
"sphinxcontrib.youtube", # $ pip install sphinxcontrib-youtube
"sphinx_tabs.tabs",
"sphinx_design"
"sphinx_design",
"jupyterlite_sphinx"
]
# fmt: on


# bibtex settings
bibtex_bibfiles = ['bib/publications.bib']
bibtex_bibfiles = ["bib/publications.bib"]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand All @@ -59,14 +63,14 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'press' # install: $ pip install sphinx-press-theme
html_theme = "press" # install: $ pip install sphinx-press-theme

html_theme_options = {
"external_links":[
# ("people", "TODO: add proper link"),
# ("publications", "TODO: add proper link"),
# ("projects", "TODO: add proper link"),
# ("code", "TODO: add proper link"),
"external_links": [
# ("people", "TODO: add proper link"),
# ("publications", "TODO: add proper link"),
# ("projects", "TODO: add proper link"),
# ("code", "TODO: add proper link"),
("GitHub", "https://github.com/smdogroup"),
],
}
Expand All @@ -77,8 +81,6 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]

html_css_files =[
'css/outreach_styles.css'
]
html_css_files = ["css/outreach_styles.css"]
7 changes: 7 additions & 0 deletions docs/source/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: xeus-python-kernel
channels:
- https://repo.mamba.pm/emscripten-forge
- conda-forge
dependencies:
- xeus-python
- matplotlib
9 changes: 8 additions & 1 deletion docs/source/outreach.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,11 @@ Here is the start of the outreach page.

OutreachBlogPosts/history
OutreachBlogPosts/objective


Here is an in-browser python environment where you can test your favorate
python code live!

.. toctree::
:maxdepth: 1

OutreachBlogPosts/python

0 comments on commit 69e228e

Please sign in to comment.