Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 2
enable-beta-ecosystems: true # required for the conda ecosystem
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
commit-message:
prefix: ⬆️
- package-ecosystem: conda
directory: /
schedule:
interval: weekly
commit-message:
prefix: ⬆️
ignore:
- dependency-name: jupyter-book
# jupyter-book 2.x is the MyST-MD rewrite and is not a drop-in
# upgrade for the Sphinx-based 1.x pipeline this repo uses.
versions: ['>=2.0']
- dependency-name: python
# Python version is constrained by the anaconda distribution
7 changes: 5 additions & 2 deletions .github/workflows/cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
schedule:
- cron: '0 2 * * 1' # Every Monday at 2am UTC
workflow_dispatch: # Manual trigger when needed
push:
branches: [main]
paths: [environment.yml] # Rebuild cache when the environment changes

jobs:
build:
Expand All @@ -15,12 +18,12 @@ jobs:
packages: read
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Build and Cache Lectures
uses: quantecon/actions/build-jupyter-cache@v0.6.0
with:
builder: 'html'
builders: 'html'
create-issue-on-failure: true
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
packages: read
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

Expand All @@ -29,7 +29,7 @@ jobs:
upload-failure-reports: true

- name: Upload Build Artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: html-build
path: ${{ steps.build.outputs.build-path }}
53 changes: 53 additions & 0 deletions .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Link Checker
on:
schedule:
# Weekly on Sunday 23:00 UTC (Monday morning in Australia)
- cron: '0 23 * * 0'
workflow_dispatch:

jobs:
linkcheck:
runs-on: ubuntu-latest
permissions:
issues: write # required for peter-evans/create-issue-from-file
steps:
# This repo deploys GitHub Pages via the artifact workflow (OIDC), so
# there is no gh-pages branch to check out — mirror the live site instead.
- name: Mirror published site
id: mirror
run: |
wget --quiet --recursive --no-parent --no-host-directories \
--accept html https://dp.quantecon.org/ || true
count=$(find . -name '*.html' | wc -l | tr -d ' ')
echo "Mirrored $count HTML file(s) from https://dp.quantecon.org/"
if [ "$count" -eq 0 ]; then
# Mirror failed (site down or wget broke). Don't run lychee against
# an empty mirror and report green — surface the failure instead.
echo "ok=false" >> "$GITHUB_OUTPUT"
mkdir -p lychee
{
echo "## Link Checker — mirror failed"
echo
echo "\`wget\` mirrored **0 HTML files** from https://dp.quantecon.org/, so the link check did not run."
echo "The live site may be down, or the mirror step may be broken — please investigate."
} > lychee/out.md
else
echo "ok=true" >> "$GITHUB_OUTPUT"
fi

- name: Link Checker
id: lychee
if: steps.mirror.outputs.ok == 'true'
uses: lycheeverse/lychee-action@v2
with:
fail: false
args: --accept 403,503 '**/*.html'

# Open an issue if the mirror failed, or if lychee found broken links.
- name: Create Issue From File
if: steps.mirror.outputs.ok != 'true' || steps.lychee.outputs.exit_code != 0
uses: peter-evans/create-issue-from-file@v6
with:
title: Link Checker Report
content-filepath: ./lychee/out.md
labels: report, automated issue, linkchecker
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
packages: read
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

Expand All @@ -41,7 +41,7 @@ jobs:
upload-failure-reports: true

- name: Upload Build Artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: html-build
path: ${{ steps.build.outputs.build-path }}
Expand All @@ -59,7 +59,7 @@ jobs:
url: ${{ steps.deployment.outputs.page-url }}
steps:
- name: Download Build Artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
name: html-build
path: _build/html
Expand Down
6 changes: 3 additions & 3 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
- sphinx-tojupyter==0.6.0
- sphinxext-rediraffe==0.3.0
- sphinx-exercise==1.2.1
- sphinx-proof==0.3.0
- sphinxcontrib-youtube==1.4.1
- sphinx-togglebutton==0.3.2
- sphinx-proof==0.4.0
- sphinxcontrib-youtube==1.5.0
- sphinx-togglebutton==0.4.5
- sphinx-reredirects==1.1.0
2 changes: 0 additions & 2 deletions lectures/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ sphinx:
og_logo_url: https://assets.quantecon.org/img/qe-og-logo.png
description: This website presents a set of lectures on dynamic programming, designed and written by Thomas J. Sargent and John Stachurski.
keywords: Python, QuantEcon, Quantitative Economics, Economics, Dynamic Programming, Tom J. Sargent, John Stachurski
analytics:
google_analytics_id: G-XXXXXXXXXX
launch_buttons:
colab_url : https://colab.research.google.com
intersphinx_mapping:
Expand Down
Loading