Skip to content

Commit 1fc33ca

Browse files
authored
Merge pull request #1 from QuantEcon/main
Update
2 parents 1d67b3e + 9e6bceb commit 1fc33ca

Some content is hidden

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

93 files changed

+8680
-2655
lines changed

.github/dependabot.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: github-actions
9+
directory: /
10+
commit-message:
11+
prefix: ⬆️
12+
schedule:
13+
interval: weekly

.github/workflows/cache.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout
11-
uses: actions/checkout@v2
11+
uses: actions/checkout@v4
1212
- name: Setup Anaconda
13-
uses: conda-incubator/setup-miniconda@v2
13+
uses: conda-incubator/setup-miniconda@v3
1414
with:
1515
auto-update-conda: true
1616
auto-activate-base: true
1717
miniconda-version: 'latest'
18-
python-version: "3.11"
18+
python-version: "3.12"
1919
environment-file: environment.yml
2020
activate-environment: quantecon
2121
- name: graphviz Support # TODO: required?
@@ -39,13 +39,14 @@ jobs:
3939
run: |
4040
jb build lectures --path-output ./ -W --keep-going
4141
- name: Upload Execution Reports (HTML)
42-
uses: actions/upload-artifact@v2
42+
uses: actions/upload-artifact@v4
4343
if: failure()
4444
with:
4545
name: execution-reports
4646
path: _build/html/reports
4747
- name: Upload "_build" folder (cache)
48-
uses: actions/upload-artifact@v2
48+
uses: actions/upload-artifact@v4
4949
with:
5050
name: build-cache
51-
path: _build
51+
path: _build
52+
include-hidden-files: true

.github/workflows/ci.yml

+10-4
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@v2
41+
uses: dawidd6/action-download-artifact@v9
4242
with:
4343
workflow: cache.yml
4444
branch: main
@@ -51,6 +51,12 @@ jobs:
5151
jb build lectures --builder pdflatex --path-output ./ -n --keep-going
5252
mkdir -p _build/html/_pdf
5353
cp -u _build/latex/*.pdf _build/html/_pdf
54+
- name: Upload Execution Reports (LaTeX)
55+
uses: actions/upload-artifact@v4
56+
if: failure()
57+
with:
58+
name: execution-reports
59+
path: _build/latex/reports
5460
- name: Build Download Notebooks (sphinx-tojupyter)
5561
shell: bash -l {0}
5662
run: |
@@ -66,13 +72,13 @@ jobs:
6672
rm -r _build/.doctrees
6773
jb build lectures --path-output ./ -nW --keep-going
6874
- name: Upload Execution Reports (HTML)
69-
uses: actions/upload-artifact@v2
75+
uses: actions/upload-artifact@v4
7076
if: failure()
7177
with:
7278
name: execution-reports
7379
path: _build/html/reports
7480
- name: Preview Deploy to Netlify
75-
uses: nwtgck/actions-netlify@v2
81+
uses: nwtgck/actions-netlify@v3.0
7682
with:
7783
publish-dir: '_build/html/'
7884
production-branch: main

.github/workflows/collab.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build Project on Google Collab (Execution)
2+
on: [pull_request]
3+
4+
jobs:
5+
test:
6+
runs-on: quantecon-large
7+
container:
8+
image: us-docker.pkg.dev/colab-images/public/runtime:latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
with:
12+
ref: ${{ github.event.pull_request.head.sha }}
13+
- name: Check for dockerenv file
14+
run: (ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv)
15+
- name: Check python version
16+
shell: bash -l {0}
17+
run: |
18+
python --version
19+
- name: Display Pip Versions
20+
shell: bash -l {0}
21+
run: pip list
22+
- name: Download "build" folder (cache)
23+
uses: dawidd6/action-download-artifact@v9
24+
with:
25+
workflow: cache.yml
26+
branch: main
27+
name: build-cache
28+
path: _build
29+
# Install build software
30+
- name: Install Build Software
31+
shell: bash -l {0}
32+
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
34+
# Build of HTML (Execution Testing)
35+
- name: Build HTML
36+
shell: bash -l {0}
37+
run: |
38+
jb build lectures --path-output ./ -n -W --keep-going
39+
- name: Upload Execution Reports
40+
uses: actions/upload-artifact@v4
41+
if: failure()
42+
with:
43+
name: execution-reports
44+
path: _build/html/reports
45+
- name: Preview Deploy to Netlify
46+
uses: nwtgck/[email protected]
47+
with:
48+
publish-dir: '_build/html/'
49+
production-branch: main
50+
github-token: ${{ secrets.GITHUB_TOKEN }}
51+
deploy-message: "Preview Deploy from GitHub Actions"
52+
env:
53+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
54+
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}

.github/workflows/linkcheck.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ 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
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@v4
2020
- name: Setup Anaconda
21-
uses: conda-incubator/setup-miniconda@v2
21+
uses: conda-incubator/setup-miniconda@v3
2222
with:
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@v2
30+
uses: dawidd6/action-download-artifact@v9
3131
with:
3232
workflow: cache.yml
3333
branch: main
@@ -37,7 +37,7 @@ jobs:
3737
shell: bash -l {0}
3838
run: jb build lectures --path-output=./ --builder=custom --custom-builder=linkcheck
3939
- name: Upload Link Checker Reports
40-
uses: actions/upload-artifact@v2
40+
uses: actions/upload-artifact@v4
4141
if: failure()
4242
with:
4343
name: linkcheck-reports

.github/workflows/publish.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout
12-
uses: actions/checkout@v2
12+
uses: actions/checkout@v4
1313
- name: Setup Anaconda
14-
uses: conda-incubator/setup-miniconda@v2
14+
uses: conda-incubator/setup-miniconda@v3
1515
with:
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@v2
42+
uses: dawidd6/action-download-artifact@v9
4343
with:
4444
workflow: cache.yml
4545
branch: main
@@ -73,7 +73,7 @@ jobs:
7373
rm -r _build/.doctrees
7474
jb build lectures --path-output ./
7575
- name: Deploy to Netlify
76-
uses: nwtgck/actions-netlify@v1.1
76+
uses: nwtgck/actions-netlify@v3.0
7777
with:
7878
publish-dir: '_build/html/'
7979
production-branch: main
@@ -83,13 +83,13 @@ jobs:
8383
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
8484
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
8585
- name: Deploy website to gh-pages
86-
uses: peaceiris/actions-gh-pages@v3
86+
uses: peaceiris/actions-gh-pages@v4
8787
with:
8888
github_token: ${{ secrets.GITHUB_TOKEN }}
8989
publish_dir: _build/html/
9090
cname: intro.quantecon.org
9191
- name: Upload "_build" folder (cache)
92-
uses: actions/upload-artifact@v2
92+
uses: actions/upload-artifact@v4
9393
with:
9494
name: build-publish
9595
path: _build

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.DS_Store
22
lectures/_build
3-
*/.ipynb_checkpoints/
3+
.ipynb_checkpoints/
4+
.virtual_documents/
45
_build/*

environment.yml

+10-17
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,17 @@ channels:
33
- default
44
- conda-forge
55
dependencies:
6-
- python=3.11
7-
- anaconda=2024.02
6+
- python=3.12
7+
- anaconda=2024.10
88
- pip
99
- pip:
10-
- jupyter-book==0.15.1
11-
- docutils==0.17.1
12-
- quantecon-book-theme==0.7.1
10+
- jupyter-book==1.0.3
11+
- quantecon-book-theme==0.7.6
1312
- sphinx-tojupyter==0.3.0
1413
- sphinxext-rediraffe==0.2.7
15-
- sphinx-exercise==0.4.1
16-
- sphinx-proof==0.1.3
17-
- ghp-import==1.1.0
18-
- sphinxcontrib-youtube==1.1.0
19-
- sphinx-togglebutton==0.3.1
20-
# Sandpit Requirements
21-
# - PuLP
22-
# - cvxpy
23-
# - cvxopt
24-
# - cylp
25-
# - array-to-latex
26-
# - prettytable
14+
- sphinx-exercise==1.0.1
15+
- ghp-import==2.1.0
16+
- sphinxcontrib-youtube==1.3.0 #Version 1.3.0 is required as quantecon-book-theme is only compatible with sphinx<=5
17+
- sphinx-proof==0.2.0
18+
- sphinx-togglebutton==0.3.2
19+
- sphinx-reredirects==0.1.4 #Version 0.1.5 requires sphinx>=7.1

lectures/_config.yml

+17-9
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ latex:
3535
targetname: quantecon-python-intro.tex
3636

3737
sphinx:
38-
extra_extensions: [sphinx_multitoc_numbering, sphinxext.rediraffe, sphinx_exercise, sphinx_togglebutton, sphinx.ext.intersphinx, sphinx_proof, sphinx_tojupyter]
38+
extra_extensions: [sphinx_multitoc_numbering, sphinxext.rediraffe, sphinx_exercise, sphinx_togglebutton, sphinx.ext.intersphinx, sphinx_proof, sphinx_tojupyter, sphinx_reredirects]
3939
config:
4040
bibtex_reference_style: author_year
4141
# false-positive links
@@ -44,7 +44,11 @@ sphinx:
4444
nb_render_image_options:
4545
width: 80%
4646
nb_code_prompt_show: "Show {type}"
47+
suppress_warnings: [mystnb.unknown_mime_type, myst.domains]
48+
proof_minimal_theme: true
4749
# -------------
50+
html_js_files:
51+
- https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js
4852
html_favicon: _static/lectures-favicon.ico
4953
html_theme: quantecon_book_theme
5054
html_static_path: ['_static']
@@ -67,34 +71,35 @@ sphinx:
6771
analytics:
6872
google_analytics_id: G-QDS1YRJNGM
6973
launch_buttons:
70-
notebook_interface : classic # The interface interactive links will activate ["classic", "jupyterlab"]
71-
binderhub_url : https://mybinder.org # The URL of the BinderHub (e.g., https://mybinder.org)
7274
colab_url : https://colab.research.google.com
7375
thebe : false # Add a thebe button to pages (requires the repository to run on Binder)
7476
intersphinx_mapping:
77+
intermediate:
78+
- https://python.quantecon.org/
79+
- null
7580
pyprog:
7681
- https://python-programming.quantecon.org/
7782
- null
7883
intro:
7984
- https://intro.quantecon.org/
8085
- null
8186
dle:
82-
- https://quantecon.github.io/lecture-dle/
87+
- https://dle.quantecon.org/
8388
- null
8489
dps:
85-
- https://quantecon.github.io/lecture-dps/
90+
- https://dps.quantecon.org/
8691
- null
8792
eqm:
88-
- https://quantecon.github.io/lecture-eqm/
93+
- https://eqm.quantecon.org/
8994
- null
9095
stats:
91-
- https://quantecon.github.io/lecture-stats/
96+
- https://stats.quantecon.org/
9297
- null
9398
tools:
94-
- https://quantecon.github.io/lecture-tools-techniques/
99+
- https://tools-techniques.quantecon.org/
95100
- null
96101
dynam:
97-
- https://quantecon.github.io/lecture-dynamics/
102+
- https://dynamics.quantecon.org/
98103
- null
99104
mathjax3_config:
100105
tex:
@@ -104,6 +109,9 @@ sphinx:
104109
mathjax_path: https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
105110
rediraffe_redirects:
106111
index_toc.md: intro.md
112+
# Remote Redirects
113+
redirects:
114+
ak2: https://python.quantecon.org/ak2.html
107115
tojupyter_static_file_path: ["_static"]
108116
tojupyter_target_html: true
109117
tojupyter_urlpath: "https://intro.quantecon.org/"

0 commit comments

Comments
 (0)