From 4c46d709966d47c356f77b3db61c864fe23b6804 Mon Sep 17 00:00:00 2001 From: mmcky Date: Fri, 8 Mar 2024 11:51:27 +1100 Subject: [PATCH 1/5] MAINT: anaconda=2024.02 and upgrade GA versions --- .github/workflows/cache.yml | 8 ++++---- .github/workflows/ci.yml | 8 ++++---- .github/workflows/execution.yml | 12 ++++++------ .github/workflows/linkcheck.yml | 8 ++++---- .github/workflows/publish.yml | 6 +++--- environment.yml | 2 +- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 1a67a4ce..f1c7c712 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -11,9 +11,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Anaconda - uses: conda-incubator/setup-miniconda@v2 + uses: conda-incubator/setup-miniconda@v3 with: auto-update-conda: true auto-activate-base: true @@ -39,13 +39,13 @@ jobs: run: | jb build lectures --path-output ./ -W --keep-going - name: Upload Execution Reports - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: failure() with: name: execution-reports path: _build/html/reports - name: Upload "_build" folder (cache) - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: build-cache path: _build \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7934f3a5..6159bdf5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,9 +5,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Anaconda - uses: conda-incubator/setup-miniconda@v2 + uses: conda-incubator/setup-miniconda@v3 with: auto-update-conda: true auto-activate-base: true @@ -35,7 +35,7 @@ jobs: shell: bash -l {0} run: pip list - name: Download "build" folder (cache) - uses: dawidd6/action-download-artifact@v2 + uses: dawidd6/action-download-artifact@v3 with: workflow: cache.yml branch: main @@ -68,7 +68,7 @@ jobs: name: _build path: _build - name: Preview Deploy to Netlify - uses: nwtgck/actions-netlify@v1.1 + uses: nwtgck/actions-netlify@v2 with: publish-dir: '_build/html/' production-branch: master diff --git a/.github/workflows/execution.yml b/.github/workflows/execution.yml index 35e3c926..03c32089 100644 --- a/.github/workflows/execution.yml +++ b/.github/workflows/execution.yml @@ -14,8 +14,8 @@ jobs: python-version: ["3.11"] steps: - name: Checkout - uses: actions/checkout@v2 - - uses: conda-incubator/setup-miniconda@v2 + uses: actions/checkout@v4 + - uses: conda-incubator/setup-miniconda@v3 with: auto-update-conda: true python-version: ${{ matrix.python-version }} @@ -41,7 +41,7 @@ jobs: shell: bash -l {0} run: jb build lectures --path-output=./ -W --keep-going - name: Upload Execution Reports - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: failure() with: name: execution-reports @@ -56,8 +56,8 @@ jobs: python-version: ["3.11"] steps: - name: Checkout - uses: actions/checkout@v2 - - uses: conda-incubator/setup-miniconda@v2 + uses: actions/checkout@v4 + - uses: conda-incubator/setup-miniconda@v3 with: auto-update-conda: true python-version: ${{ matrix.python-version }} @@ -73,7 +73,7 @@ jobs: shell: bash -l {0} run: jb build lectures --path-output=./ -W --keep-going - name: Upload Execution Reports - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: failure() with: name: execution-reports diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index 79f0578b..677a1967 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -16,9 +16,9 @@ jobs: python-version: ["3.11"] steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Anaconda - uses: conda-incubator/setup-miniconda@v2 + uses: conda-incubator/setup-miniconda@v3 with: auto-update-conda: true auto-activate-base: true @@ -27,7 +27,7 @@ jobs: environment-file: environment.yml activate-environment: quantecon - name: Download "build" folder (cache) - uses: dawidd6/action-download-artifact@v2 + uses: dawidd6/action-download-artifact@v3 with: workflow: cache.yml branch: main @@ -37,7 +37,7 @@ jobs: shell: bash -l {0} run: jb build lectures --path-output=./ --builder=custom --custom-builder=linkcheck - name: Upload Link Checker Reports - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: failure() with: name: linkcheck-reports diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ae3266cc..fa1d46dc 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,9 +9,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Anaconda - uses: conda-incubator/setup-miniconda@v2 + uses: conda-incubator/setup-miniconda@v3 with: auto-update-conda: true auto-activate-base: true @@ -39,7 +39,7 @@ jobs: shell: bash -l {0} run: pip list - name: Download "build" folder (cache) - uses: dawidd6/action-download-artifact@v2 + uses: dawidd6/action-download-artifact@v3 with: workflow: cache.yml branch: main diff --git a/environment.yml b/environment.yml index 6aa0c8ce..e326c739 100644 --- a/environment.yml +++ b/environment.yml @@ -3,7 +3,7 @@ channels: - default dependencies: - python=3.11 - - anaconda=2023.09 + - anaconda=2024.02 - pip - pip: - jupyter-book==0.15.1 From 3db12ea013ca8240939d0c7a23cde8aa9714fbd2 Mon Sep 17 00:00:00 2001 From: mmcky Date: Fri, 8 Mar 2024 12:01:13 +1100 Subject: [PATCH 2/5] TMP: disable cache --- .github/workflows/ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6159bdf5..3ecef6db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,13 +34,13 @@ jobs: - name: Display Pip Versions shell: bash -l {0} run: pip list - - name: Download "build" folder (cache) - uses: dawidd6/action-download-artifact@v3 - with: - workflow: cache.yml - branch: main - name: build-cache - path: _build + # - name: Download "build" folder (cache) + # uses: dawidd6/action-download-artifact@v3 + # with: + # workflow: cache.yml + # branch: main + # name: build-cache + # path: _build # Build Assets (Download Notebooks and PDF via LaTeX) - name: Build PDF from LaTeX shell: bash -l {0} From 1cea394764a9ffc2c1646d6144d6618b07f28215 Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 12 Mar 2024 10:32:45 +1100 Subject: [PATCH 3/5] update version numbers in github workflows --- .github/workflows/ci.yml | 10 ++++++++-- .github/workflows/execution.yml | 2 +- .github/workflows/publish.yml | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ecef6db..d6693245 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,9 +61,15 @@ jobs: shell: bash -l {0} run: | rm -r _build/.doctrees - jb build lectures --path-output ./ + jb build lectures --path-output ./ -nW --keep-going + - name: Upload Execution Reports (Download Notebooks) + uses: actions/upload-artifact@v4 + if: failure() + with: + name: execution-reports + path: _build/jupyter/reports - name: Save Build as Artifact - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: _build path: _build diff --git a/.github/workflows/execution.yml b/.github/workflows/execution.yml index 03c32089..2d5f5493 100644 --- a/.github/workflows/execution.yml +++ b/.github/workflows/execution.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - uses: conda-incubator/setup-miniconda@v3 + - uses: conda-incubator/setup-miniconda@v2 with: auto-update-conda: true python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fa1d46dc..d0f99f4c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -39,7 +39,7 @@ jobs: shell: bash -l {0} run: pip list - name: Download "build" folder (cache) - uses: dawidd6/action-download-artifact@v3 + uses: dawidd6/action-download-artifact@v4 with: workflow: cache.yml branch: main @@ -79,7 +79,7 @@ jobs: publish_dir: _build/html/ cname: python-advanced.quantecon.org - name: Upload "_build" folder (cache) - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: build-cache path: _build From 8af897714d6359413071e9398b6c4acb931dda62 Mon Sep 17 00:00:00 2001 From: kp992 Date: Tue, 30 Apr 2024 18:05:28 +0530 Subject: [PATCH 4/5] fix prop_cycle error --- lectures/smoothing_tax.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lectures/smoothing_tax.md b/lectures/smoothing_tax.md index c9e49bd2..a265a4f9 100644 --- a/lectures/smoothing_tax.md +++ b/lectures/smoothing_tax.md @@ -607,14 +607,13 @@ class TaxSmoothingExample: fig, ax = plt.subplots() ax.set_title('Cumulative return path (complete markets)') - line1 = ax.plot(np.arange(N), self.RT_path)[0] + line1 = ax.plot(np.arange(N), self.RT_path, color='blue')[0] c1 = line1.get_color() ax.set_xlabel('Periods') ax.set_ylabel('Cumulative return', color=c1) ax_ = ax.twinx() - ax_._get_lines.prop_cycler = ax._get_lines.prop_cycler - line2 = ax_.plot(np.arange(N), self.g_path, ls='--')[0] + line2 = ax_.plot(np.arange(N), self.g_path, ls='--', color='green')[0] c2 = line2.get_color() ax_.set_ylabel('Government expenditures', color=c2) From 32d3a1eb37acb7ad06e418842178878a1a5b4379 Mon Sep 17 00:00:00 2001 From: mmcky Date: Wed, 1 May 2024 10:48:24 +1000 Subject: [PATCH 5/5] re-enable build cache --- .github/workflows/ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d6693245..f072929a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,13 +34,13 @@ jobs: - name: Display Pip Versions shell: bash -l {0} run: pip list - # - name: Download "build" folder (cache) - # uses: dawidd6/action-download-artifact@v3 - # with: - # workflow: cache.yml - # branch: main - # name: build-cache - # path: _build + - name: Download "build" folder (cache) + uses: dawidd6/action-download-artifact@v3 + with: + workflow: cache.yml + branch: main + name: build-cache + path: _build # Build Assets (Download Notebooks and PDF via LaTeX) - name: Build PDF from LaTeX shell: bash -l {0}