From e30a226fbe4737c66662d4ebd2a372d0226d82a7 Mon Sep 17 00:00:00 2001 From: mmcky Date: Mon, 25 Aug 2025 15:48:38 +1000 Subject: [PATCH 1/2] [TEST] ENH: add syntax warning checker to PR --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 18a2cdae..f4c5cda8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,6 +64,13 @@ jobs: with: name: execution-reports path: _build/html/reports + - name: Check for Python warnings (PR mode = changed files) + if: github.event_name == 'pull_request' + uses: QuantEcon/meta/.github/actions/check-warnings@copilot/fix-224 + with: + html-path: './_build/html' + pr-mode: 'true' + fail-on-warning: 'true' - name: Preview Deploy to Netlify uses: nwtgck/actions-netlify@v3 with: From a401cf2941600821b306d464072b34d7444ab8de Mon Sep 17 00:00:00 2001 From: mmcky Date: Mon, 25 Aug 2025 15:50:39 +1000 Subject: [PATCH 2/2] tst: force a syntax warning in a changed file --- lectures/about_py.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lectures/about_py.md b/lectures/about_py.md index 4f9c883c..db22cc0f 100644 --- a/lectures/about_py.md +++ b/lectures/about_py.md @@ -29,6 +29,11 @@ anymore. Sorry, R people. I used to be one of you but we no longer descend into R." -- Chris Wiggins ``` +```{code-cell} python3 +import warnings +warnings.warn("Forced Syntax Warning for Debug.", SyntaxWarning) +``` + ## Overview This lecture series will teach you to use Python for scientific computing, with