Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d99152c

Browse filesBrowse files
authored
ENH: Build download notebooks using sphinx-tojupyter (#100)
* update configuration for download notebooks * enable pdf production * update ci, enable download notebooks * update anaconda * migrate to use jupyter raw directives * add test run for theme branch * fix test run of branch * enable html targetting * remove pdf templates and settings for now and deploy in a different PR
1 parent 83572db commit d99152c
Copy full SHA for d99152c
Expand file treeCollapse file tree

22 files changed

+52
-25
lines changed
Open diff view settings
Collapse file

‎.github/workflows/ci.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/ci.yml
+15-2Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,21 @@ jobs:
77
- name: Checkout
88
uses: actions/checkout@v2
99
- name: Setup Anaconda
10-
uses: goanpeca/setup-miniconda@v1
10+
uses: conda-incubator/setup-miniconda@v2
1111
with:
1212
auto-update-conda: true
1313
auto-activate-base: true
1414
miniconda-version: 'latest'
1515
python-version: 3.8
1616
environment-file: environment.yml
17-
activate-environment: qe-lectures
17+
activate-environment: lecture-python-programming
18+
- name: Install QuantEcon Book Theme
19+
shell: bash -l {0}
20+
run: |
21+
git clone https://github.com/quantecon/quantecon-book-theme
22+
cd quantecon-book-theme && git checkout download-nb
23+
python setup.py install
24+
cd .. && rm -r quantecon-book-theme
1825
- name: Display Conda Environment Versions
1926
shell: bash -l {0}
2027
run: conda list
@@ -25,6 +32,12 @@ jobs:
2532
shell: bash -l {0}
2633
run: |
2734
jb build lectures --path-output ./
35+
- name: Build Download Notebooks (sphinx-tojupyter)
36+
shell: bash -l {0}
37+
run: |
38+
jb build lectures --path-output ./ --builder=custom --custom-builder=jupyter
39+
mkdir _build/html/_notebooks
40+
cp _build/jupyter/*.ipynb _build/html/_notebooks
2841
- name: Preview Deploy to Netlify
2942
uses: nwtgck/actions-netlify@v1.1
3043
with:
Collapse file

‎.gitignore‎

Copy file name to clipboard
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
_build/
22
__pycache__/
3-
.DS_Store
3+
.DS_Store
4+
dask-worker-space
Collapse file

‎environment.yml‎

Copy file name to clipboard
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
name: qe-lectures
1+
name: lecture-python-programming
22
channels:
33
- default
44
dependencies:
55
- python=3.8
66
- anaconda=2020.07
77
- pip
88
- pip:
9-
- jupyter-book
9+
- git+https://github.com/executablebooks/jupyter-book.git
1010
- sphinxext-rediraffe
1111
- git+https://github.com/executablebooks/sphinx-multitoc-numbering
12-
- git+https://github.com/quantecon/quantecon-book-theme
1312
- git+https://github.com/executablebooks/sphinx-exercise.git
1413
- joblib
1514
- interpolation
15+
- git+https://github.com/QuantEcon/sphinx-tojupyter.git
1616

Collapse file

‎lectures/_config.yml‎

Copy file name to clipboardExpand all lines: lectures/_config.yml
+14-1Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ html:
1212
baseurl: https://python.quantecon.org/
1313

1414
sphinx:
15-
extra_extensions: [sphinx_multitoc_numbering, sphinx_exercise, sphinxext.rediraffe]
15+
extra_extensions: [sphinx_multitoc_numbering, sphinx_exercise, sphinxext.rediraffe, sphinx_tojupyter]
1616
config:
1717
html_favicon: _static/lectures-favicon.ico
1818
html_theme: quantecon_book_theme
@@ -29,3 +29,16 @@ sphinx:
2929
google_analytics_id: UA-54984338-9
3030
rediraffe_redirects:
3131
index_toc.md: intro.md
32+
tojupyter_static_file_path: ["source/_static", "_static"]
33+
tojupyter_target_html: true
34+
tojupyter_urlpath: "https://python-programming.quantecon.org/"
35+
tojupyter_image_urlpath: "https://python-programming.quantecon.org/_static/"
36+
tojupyter_lang_synonyms: ["ipython", "ipython3", "python"]
37+
tojupyter_kernels:
38+
python3:
39+
kernelspec:
40+
display_name: "Python"
41+
language: python3
42+
name: python3
43+
file_extension: ".py"
44+
tojupyter_images_markdown: true
Collapse file

‎lectures/about_py.md‎

Copy file name to clipboardExpand all lines: lectures/about_py.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ kernelspec:
1010
---
1111

1212
(about_py)=
13-
```{raw} html
13+
```{raw} jupyter
1414
<div id="qe-notebook-header" align="right" style="text-align:right;">
1515
<a href="https://quantecon.org/" title="quantecon.org">
1616
<img style="width:250px;display:inline;" width="250px" src="https://assets.quantecon.org/img/qe-menubar-logo.svg" alt="QuantEcon">
Collapse file

‎lectures/debugging.md‎

Copy file name to clipboardExpand all lines: lectures/debugging.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ kernelspec:
1010
---
1111

1212
(debugging)=
13-
```{raw} html
13+
```{raw} jupyter
1414
<div id="qe-notebook-header" align="right" style="text-align:right;">
1515
<a href="https://quantecon.org/" title="quantecon.org">
1616
<img style="width:250px;display:inline;" width="250px" src="https://assets.quantecon.org/img/qe-menubar-logo.svg" alt="QuantEcon">
Collapse file

‎lectures/functions.md‎

Copy file name to clipboardExpand all lines: lectures/functions.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ kernelspec:
1010
---
1111

1212
(functions)=
13-
```{raw} html
13+
```{raw} jupyter
1414
<div id="qe-notebook-header" align="right" style="text-align:right;">
1515
<a href="https://quantecon.org/" title="quantecon.org">
1616
<img style="width:250px;display:inline;" width="250px" src="https://assets.quantecon.org/img/qe-menubar-logo.svg" alt="QuantEcon">
Collapse file

‎lectures/getting_started.md‎

Copy file name to clipboardExpand all lines: lectures/getting_started.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ kernelspec:
1010
---
1111

1212
(getting_started)=
13-
```{raw} html
13+
```{raw} jupyter
1414
<div id="qe-notebook-header" align="right" style="text-align:right;">
1515
<a href="https://quantecon.org/" title="quantecon.org">
1616
<img style="width:250px;display:inline;" width="250px" src="https://assets.quantecon.org/img/qe-menubar-logo.svg" alt="QuantEcon">
Collapse file

‎lectures/matplotlib.md‎

Copy file name to clipboardExpand all lines: lectures/matplotlib.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ kernelspec:
1010
---
1111

1212
(matplotlib)=
13-
```{raw} html
13+
```{raw} jupyter
1414
<div id="qe-notebook-header" align="right" style="text-align:right;">
1515
<a href="https://quantecon.org/" title="quantecon.org">
1616
<img style="width:250px;display:inline;" width="250px" src="https://assets.quantecon.org/img/qe-menubar-logo.svg" alt="QuantEcon">
Collapse file

‎lectures/need_for_speed.md‎

Copy file name to clipboardExpand all lines: lectures/need_for_speed.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ kernelspec:
1010
---
1111

1212
(speed)=
13-
```{raw} html
13+
```{raw} jupyter
1414
<div id="qe-notebook-header" align="right" style="text-align:right;">
1515
<a href="https://quantecon.org/" title="quantecon.org">
1616
<img style="width:250px;display:inline;" width="250px" src="https://assets.quantecon.org/img/qe-menubar-logo.svg" alt="QuantEcon">

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.