Skip to content

Commit

Permalink
feat: host interactive presentations via Binder (#15)
Browse files Browse the repository at this point in the history
* build: activate RISE
* build: install ampform, qrules, ipympl, mpl_interactions...
* ci: add postBuild for binder
* ci: install appmode
* docs: add analytic continuation presentation
* docs: add demo main page
* test: run pytest over demos
  • Loading branch information
redeboer committed Jun 15, 2021
1 parent d381f50 commit 594174c
Show file tree
Hide file tree
Showing 13 changed files with 1,264 additions and 6 deletions.
36 changes: 34 additions & 2 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"language": "en-US",
"words": [
"ampform",
"argand",
"blatt",
"breit",
"compwa",
Expand All @@ -72,39 +73,60 @@
"sympy",
"tensorflow",
"tensorwaves",
"weisskopf"
"weisskopf",
"wigners"
],
"ignoreWords": [
"adrs",
"appmode",
"asdot",
"astype",
"autolaunch",
"autonumbering",
"axhline",
"axvline",
"celltoolbar",
"cmath",
"codemirror",
"colorbar",
"commitlint",
"componentwise",
"csqrt",
"dotprint",
"evaluatable",
"expertsystem",
"figsize",
"filterwarnings",
"getsource",
"graphviz",
"gridspec",
"hasattr",
"imag",
"iplt",
"ipympl",
"ipynb",
"ipyplot",
"ipython",
"ipywidgets",
"isinstance",
"isort",
"jaxlib",
"kernelspec",
"lambdifier",
"linestyle",
"linewidth",
"linkcheck",
"linspace",
"livereveal",
"markdownlint",
"mathbb",
"mathrm",
"maxdepth",
"nbconvert",
"nbformat",
"ncols",
"nonlocal",
"nrows",
"numpycode",
"pandoc",
"phsp",
Expand All @@ -116,16 +138,26 @@
"rtfd",
"scimath",
"seealso",
"seterr",
"showcode",
"showmarkdowntxt",
"showtags",
"spflueger",
"startswith",
"subslide",
"suptitle",
"symplot",
"theano",
"timeit",
"toctree",
"treewise",
"venv",
"xlabel",
"xlim",
"xreplace",
"xticks",
"ylabel",
"ylim"
"ylim",
"yticks"
]
}
30 changes: 28 additions & 2 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ jobs:
python-version: [3.7]
steps:
- uses: actions/checkout@master
- run: git fetch origin
- name: Check modified notebooks
id: git-diff
run:
echo "::set-output name=dependency-changes::$(git diff --name-only
origin/$GITHUB_BASE_REF -- docs | grep ipynb)"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@master
with:
Expand All @@ -30,5 +36,25 @@ jobs:
pip install .[test]
sudo apt-get -y install graphviz
- name: Run notebooks with pytest (diff only)
run:
pytest $(git diff --name-only origin/$GITHUB_BASE_REF | grep ipynb)
run: pytest ${{ steps.git-diff.outputs.dependency-changes }}

pytest-demos:
name: Test demo notebooks
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python-version: [3.7]
steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@master
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]
sudo apt-get -y install graphviz
- name: Run demo notebooks
run: pytest demo
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ repos:
- id: fix-nbformat-version
- id: format-setup-cfg
- id: pin-nb-requirements
exclude: >
(?x)^(
demo/.*
)$
- repo: https://github.com/asottile/blacken-docs
rev: v1.10.0
Expand Down
9 changes: 9 additions & 0 deletions demo/analytic-continuation.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.output_png {
display: table-cell;
text-align: center;
vertical-align: middle;
}
.output_subarea.output_latex {
font-family: Monaco;
font-size: 23pt;
}
Loading

0 comments on commit 594174c

Please sign in to comment.