Skip to content

Commit 59d0e50

Browse files
authored
Merge branch 'main' into download-nb
2 parents 6e0161c + dbb4001 commit 59d0e50

File tree

104 files changed

+31587
-20987
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+31587
-20987
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build Cache [using jupyter-book] for Windows
2+
on:
3+
schedule:
4+
# Execute cache weekly at 3am on Monday
5+
- cron: '0 3 * * 1'
6+
workflow_dispatch: # Allows manual trigger if required
7+
8+
jobs:
9+
cache:
10+
runs-on: windows-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
- name: Setup Anaconda
15+
uses: conda-incubator/setup-miniconda@v3
16+
with:
17+
auto-update-conda: true
18+
auto-activate-base: true
19+
miniconda-version: 'latest'
20+
python-version: "3.12"
21+
environment-file: environment.yml
22+
activate-environment: quantecon
23+
- name: Build HTML
24+
shell: bash -l {0}
25+
run: |
26+
jb build lectures --path-output ./ -W --keep-going
27+
- name: Upload Execution Reports (HTML)
28+
uses: actions/upload-artifact@v4
29+
if: failure()
30+
with:
31+
name: execution-reports
32+
path: _build/html/reports
33+
- name: Upload "_build" folder (cache)
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: build-cache-windows
37+
path: _build
38+
include-hidden-files: true

.github/workflows/cache.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: Build Cache [using jupyter-book]
22
on:
3-
push:
4-
branches:
5-
- main
3+
schedule:
4+
# Execute cache weekly at 3am on Monday
5+
- cron: '0 3 * * 1'
6+
workflow_dispatch: # Allows manual trigger if required
67
jobs:
78
tests:
89
runs-on: ubuntu-latest
@@ -15,7 +16,7 @@ jobs:
1516
auto-update-conda: true
1617
auto-activate-base: true
1718
miniconda-version: 'latest'
18-
python-version: "3.11"
19+
python-version: "3.12"
1920
environment-file: environment.yml
2021
activate-environment: quantecon
2122
- name: graphviz Support # TODO: required?
@@ -33,11 +34,12 @@ jobs:
3334
latexmk \
3435
xindy \
3536
dvipng \
36-
cm-super
37+
cm-super \
38+
latex-cjk-all
3739
- name: Build HTML
3840
shell: bash -l {0}
3941
run: |
40-
jb build lectures --path-output ./ -W --keep-going
42+
jb build lectures --path-output ./ --keep-going
4143
- name: Upload Execution Reports (HTML)
4244
uses: actions/upload-artifact@v4
4345
if: failure()
@@ -48,4 +50,5 @@ jobs:
4850
uses: actions/upload-artifact@v4
4951
with:
5052
name: build-cache
51-
path: _build
53+
path: _build
54+
include-hidden-files: true

.github/workflows/ci-cn.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Build HTML [using jupyter-book] and CN environment
2+
on: [pull_request]
3+
jobs:
4+
preview:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Checkout
8+
uses: actions/checkout@v4
9+
- name: Setup Anaconda
10+
uses: conda-incubator/setup-miniconda@v3
11+
with:
12+
auto-update-conda: true
13+
auto-activate-base: true
14+
miniconda-version: 'latest'
15+
python-version: "3.12"
16+
environment-file: environment-cn.yml
17+
activate-environment: quantecon
18+
- name: Graphics Support
19+
run: |
20+
sudo apt-get -qq update && sudo apt-get install -y graphviz
21+
- name: Install latex dependencies
22+
run: |
23+
sudo apt-get -qq update
24+
sudo apt-get install -y \
25+
texlive-latex-recommended \
26+
texlive-latex-extra \
27+
texlive-fonts-recommended \
28+
texlive-fonts-extra \
29+
texlive-xetex \
30+
latexmk \
31+
xindy \
32+
dvipng \
33+
cm-super
34+
- name: Display Conda Environment Versions
35+
shell: bash -l {0}
36+
run: conda list
37+
- name: Display Pip Versions
38+
shell: bash -l {0}
39+
run: pip list
40+
- name: Download "build" folder (cache)
41+
uses: dawidd6/action-download-artifact@v9
42+
with:
43+
workflow: cache.yml
44+
branch: main
45+
name: build-cache
46+
path: _build
47+
- name: Build HTML
48+
shell: bash -l {0}
49+
run: |
50+
jb build lectures --path-output ./ -nW --keep-going
51+
- name: Upload Execution Reports (HTML)
52+
uses: actions/upload-artifact@v4
53+
if: failure()
54+
with:
55+
name: execution-reports
56+
path: _build/html/reports

.github/workflows/ci-windows.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: HTML Build on Windows
2+
on: [pull_request]
3+
jobs:
4+
preview:
5+
runs-on: windows-latest
6+
steps:
7+
- name: Checkout
8+
uses: actions/checkout@v4
9+
- name: Setup Anaconda
10+
uses: conda-incubator/setup-miniconda@v3
11+
with:
12+
auto-update-conda: true
13+
auto-activate-base: true
14+
miniconda-version: 'latest'
15+
python-version: "3.12"
16+
environment-file: environment.yml
17+
activate-environment: quantecon
18+
- name: Download "build" folder (cache)
19+
uses: dawidd6/action-download-artifact@v9
20+
with:
21+
workflow: cache-windows.yml
22+
branch: main
23+
name: build-cache-windows
24+
path: _build
25+
- name: Display Conda Environment Versions
26+
shell: bash -l {0}
27+
run: conda list
28+
- name: Display Pip Versions
29+
shell: bash -l {0}
30+
run: pip list
31+
- name: Build HTML
32+
shell: bash -l {0}
33+
run: |
34+
jb build lectures --path-output ./ -nW --keep-going
35+
- name: Upload Execution Reports (HTML)
36+
uses: actions/upload-artifact@v4
37+
if: failure()
38+
with:
39+
name: execution-reports
40+
path: _build/html/reports

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
auto-update-conda: true
1313
auto-activate-base: true
1414
miniconda-version: 'latest'
15-
python-version: "3.11"
15+
python-version: "3.12"
1616
environment-file: environment.yml
1717
activate-environment: quantecon
1818
- name: Graphics Support #TODO: Review if graphviz is needed
@@ -38,7 +38,7 @@ jobs:
3838
shell: bash -l {0}
3939
run: pip list
4040
- name: Download "build" folder (cache)
41-
uses: dawidd6/action-download-artifact@v6
41+
uses: dawidd6/action-download-artifact@v9
4242
with:
4343
workflow: cache.yml
4444
branch: main

.github/workflows/collab.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on: [pull_request]
33

44
jobs:
55
test:
6-
runs-on: ubuntu-latest-m
6+
runs-on: quantecon-large
77
container:
88
image: us-docker.pkg.dev/colab-images/public/runtime:latest
99
steps:
@@ -20,7 +20,7 @@ jobs:
2020
shell: bash -l {0}
2121
run: pip list
2222
- name: Download "build" folder (cache)
23-
uses: dawidd6/action-download-artifact@v6
23+
uses: dawidd6/action-download-artifact@v9
2424
with:
2525
workflow: cache.yml
2626
branch: main
@@ -30,7 +30,7 @@ jobs:
3030
- name: Install Build Software
3131
shell: bash -l {0}
3232
run: |
33-
pip install jupyter-book==0.15.1 docutils==0.17.1 quantecon-book-theme==0.7.2 sphinx-tojupyter==0.3.0 sphinxext-rediraffe==0.2.7 sphinx-exercise==0.4.1 sphinxcontrib-youtube==1.1.0 sphinx-togglebutton==0.3.1 arviz==0.13.0 sphinx_proof==0.2.0 sphinx_reredirects==0.1.3
33+
pip install jupyter-book==1.0.3 docutils==0.17.1 quantecon-book-theme==0.8.2 sphinx-tojupyter==0.3.0 sphinxext-rediraffe==0.2.7 sphinx-exercise==1.0.1 sphinxcontrib-youtube==1.3.0 sphinx-togglebutton==0.3.2 arviz==0.13.0 sphinx_proof==0.2.0 sphinx_reredirects==0.1.4
3434
# Build of HTML (Execution Testing)
3535
- name: Build HTML
3636
shell: bash -l {0}

.github/workflows/linkcheck.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
os: ["ubuntu-latest"]
16-
python-version: ["3.11"]
16+
python-version: ["3.12"]
1717
steps:
1818
- name: Checkout
1919
uses: actions/checkout@v4
@@ -23,11 +23,11 @@ jobs:
2323
auto-update-conda: true
2424
auto-activate-base: true
2525
miniconda-version: 'latest'
26-
python-version: "3.11"
26+
python-version: "3.12"
2727
environment-file: environment.yml
2828
activate-environment: quantecon
2929
- name: Download "build" folder (cache)
30-
uses: dawidd6/action-download-artifact@v6
30+
uses: dawidd6/action-download-artifact@v9
3131
with:
3232
workflow: cache.yml
3333
branch: main

.github/workflows/publish.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
auto-update-conda: true
1717
auto-activate-base: true
1818
miniconda-version: 'latest'
19-
python-version: "3.11"
19+
python-version: "3.12"
2020
environment-file: environment.yml
2121
activate-environment: quantecon
2222
- name: Install latex dependencies
@@ -39,7 +39,7 @@ jobs:
3939
shell: bash -l {0}
4040
run: pip list
4141
- name: Download "build" folder (cache)
42-
uses: dawidd6/action-download-artifact@v6
42+
uses: dawidd6/action-download-artifact@v9
4343
with:
4444
workflow: cache.yml
4545
branch: main
@@ -55,15 +55,15 @@ jobs:
5555
# run: |
5656
# mkdir -p _build/html/_pdf
5757
# cp -u _build/latex/*.pdf _build/html/_pdf
58-
# - name: Build Download Notebooks (sphinx-tojupyter)
59-
# shell: bash -l {0}
60-
# run: |
61-
# jb build lectures --path-output ./ --builder=custom --custom-builder=jupyter
62-
# - name: Copy Download Notebooks for GH-PAGES
63-
# shell: bash -l {0}
64-
# run: |
65-
# mkdir -p _build/html/_notebooks
66-
# cp -u _build/jupyter/*.ipynb _build/html/_notebooks
58+
- name: Build Download Notebooks (sphinx-tojupyter)
59+
shell: bash -l {0}
60+
run: |
61+
jb build lectures --path-output ./ --builder=custom --custom-builder=jupyter
62+
- name: Copy Download Notebooks for GH-PAGES
63+
shell: bash -l {0}
64+
run: |
65+
mkdir -p _build/html/_notebooks
66+
cp -u _build/jupyter/*.ipynb _build/html/_notebooks
6767
# Build HTML (Website)
6868
# BUG: rm .doctress to remove `sphinx` rendering issues for ipywidget mimetypes
6969
# and clear the sphinx cache for building final HTML documents.

_notebook_repo/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# lecture-python.notebooks
1+
# lecture-python-intro.notebooks
22

3-
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantEcon/lecture-python.notebooks/master)
3+
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantEcon/lecture-python-intro.notebooks/master)
44

5-
Notebooks for https://python.quantecon.org
5+
<!-- Notebooks for https://python-intro.quantecon.org -->
66

7-
**Note:** This README should be edited [here](https://github.com/quantecon/lecture-python.myst/_notebook_repo)
7+
**Note:** This README should be edited [here](https://github.com/quantecon/lecture-python-intro/_notebook_repo)

_notebook_repo/environment.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
name: lecture-python
1+
name: lecture-python-intro
22
channels:
33
- default
44
dependencies:
5-
- python=3.8
6-
- anaconda
5+
- python=3.10
6+
- anaconda=2023.03
77

0 commit comments

Comments
 (0)