From a7a76c1eba176779312bf7711d3b419463e25487 Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 1 Jun 2021 11:55:23 +1000 Subject: [PATCH 01/10] [GA] Run Builds on a Schedule + Execution Checks --- .github/workflows/scheduled.yml | 40 +++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/scheduled.yml diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml new file mode 100644 index 00000000..731210d1 --- /dev/null +++ b/.github/workflows/scheduled.yml @@ -0,0 +1,40 @@ +name: Run Execution Tests [Latest Anaconda] +on: + pull_request: + types: [opened] + schedule: + # UTC 22:00 is early morning in Australia + - cron: '0 22 * * *' +jobs: + execution-tests: + name: Execution Tests (${{ matrix.python-version }}, ${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ["ubuntu-latest", "macos-latest", "windows-latest"] + python-version: ["3.8"] + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + python-version: ${{ matrix.python-version }} + - name: Install Anaconda + Dependencies [Linux,OS X] + shell: bash -l {0} + run: | + conda install anaconda + pip install jupyter-book sphinx-multitoc-numbering quantecon-book-theme sphinxext-rediraffe + - name: Install Anaconda + Dependencies [Windows] + shell: pwsh + run: | + conda install anaconda + pip install jupyter-book + pip install jupyter-book sphinx-multitoc-numbering quantecon-book-theme sphinxext-rediraffe + - name: Build Lectures (+ Execution Checks) [Linux, OS X] + shell: bash -l {0} + run: jb build lectures --path-output=./ + - name: Build Lectures (+ Execution Checks) [Windows] + shell: pwsh + run: jb build lectures --path-output=./ \ No newline at end of file From 62dccff57efdd7bce100fe0c80a978b7d6d48ead Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 1 Jun 2021 12:05:16 +1000 Subject: [PATCH 02/10] split tasks into osx,linux + windows --- .github/workflows/scheduled.yml | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index 731210d1..bcc556e2 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -6,13 +6,13 @@ on: # UTC 22:00 is early morning in Australia - cron: '0 22 * * *' jobs: - execution-tests: + execution-tests-linux-osx: name: Execution Tests (${{ matrix.python-version }}, ${{ matrix.os }}) runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: ["ubuntu-latest", "macos-latest", "windows-latest"] + os: ["ubuntu-latest", "macos-latest"] python-version: ["3.8"] steps: - name: Checkout @@ -26,15 +26,30 @@ jobs: run: | conda install anaconda pip install jupyter-book sphinx-multitoc-numbering quantecon-book-theme sphinxext-rediraffe + - name: Build Lectures (+ Execution Checks) [Linux, OS X] + shell: bash -l {0} + run: jb build lectures --path-output=./ + execution-tests-win: + name: Execution Tests (${{ matrix.python-version }}, ${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ["windows-latest"] + python-version: ["3.8"] + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + python-version: ${{ matrix.python-version }} - name: Install Anaconda + Dependencies [Windows] - shell: pwsh + shell: powershell run: | conda install anaconda pip install jupyter-book pip install jupyter-book sphinx-multitoc-numbering quantecon-book-theme sphinxext-rediraffe - - name: Build Lectures (+ Execution Checks) [Linux, OS X] - shell: bash -l {0} - run: jb build lectures --path-output=./ - name: Build Lectures (+ Execution Checks) [Windows] - shell: pwsh + shell: powershell run: jb build lectures --path-output=./ \ No newline at end of file From d3b96fea583cde1537fce22a14061920e6173258 Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 1 Jun 2021 12:07:51 +1000 Subject: [PATCH 03/10] enable test workflow to run --- .github/workflows/scheduled.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index bcc556e2..a52bccbc 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -1,7 +1,7 @@ name: Run Execution Tests [Latest Anaconda] on: pull_request: - types: [opened] + types: [push] schedule: # UTC 22:00 is early morning in Australia - cron: '0 22 * * *' From 683ef97d955c11696e5fb9d86d8f37e8fa39acda Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 1 Jun 2021 12:09:26 +1000 Subject: [PATCH 04/10] enable test run --- .github/workflows/scheduled.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index a52bccbc..e4436df1 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -1,7 +1,5 @@ name: Run Execution Tests [Latest Anaconda] -on: - pull_request: - types: [push] +on: [push] schedule: # UTC 22:00 is early morning in Australia - cron: '0 22 * * *' From 755e8f8a18e10a1d7c64fa97f36047d7aadbcd90 Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 1 Jun 2021 12:11:27 +1000 Subject: [PATCH 05/10] enable test without schedule --- .github/workflows/scheduled.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index e4436df1..75ec96de 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -1,8 +1,8 @@ name: Run Execution Tests [Latest Anaconda] -on: [push] - schedule: - # UTC 22:00 is early morning in Australia - - cron: '0 22 * * *' +on: push + # schedule: + # # UTC 22:00 is early morning in Australia + # - cron: '0 22 * * *' jobs: execution-tests-linux-osx: name: Execution Tests (${{ matrix.python-version }}, ${{ matrix.os }}) From eb05a1c828c2255655832c88df38d0a48b120f9f Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 1 Jun 2021 12:15:06 +1000 Subject: [PATCH 06/10] add sphinx-tojupyter --- .github/workflows/scheduled.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index 75ec96de..18380d55 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -23,7 +23,7 @@ jobs: shell: bash -l {0} run: | conda install anaconda - pip install jupyter-book sphinx-multitoc-numbering quantecon-book-theme sphinxext-rediraffe + pip install jupyter-book sphinx-multitoc-numbering quantecon-book-theme sphinxext-rediraffe sphinx_tojupyter - name: Build Lectures (+ Execution Checks) [Linux, OS X] shell: bash -l {0} run: jb build lectures --path-output=./ @@ -47,7 +47,7 @@ jobs: run: | conda install anaconda pip install jupyter-book - pip install jupyter-book sphinx-multitoc-numbering quantecon-book-theme sphinxext-rediraffe + pip install jupyter-book sphinx-multitoc-numbering quantecon-book-theme sphinxext-rediraffe sphinx_tojupyter - name: Build Lectures (+ Execution Checks) [Windows] shell: powershell run: jb build lectures --path-output=./ \ No newline at end of file From b217ebc8fb52f98ec4989aa0032147bfcad0b955 Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 1 Jun 2021 12:30:58 +1000 Subject: [PATCH 07/10] fail on warnings --- .github/workflows/scheduled.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index 18380d55..5e5c3d7c 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -26,7 +26,7 @@ jobs: pip install jupyter-book sphinx-multitoc-numbering quantecon-book-theme sphinxext-rediraffe sphinx_tojupyter - name: Build Lectures (+ Execution Checks) [Linux, OS X] shell: bash -l {0} - run: jb build lectures --path-output=./ + run: jb build lectures --path-output=./ -W --keep-going execution-tests-win: name: Execution Tests (${{ matrix.python-version }}, ${{ matrix.os }}) runs-on: ${{ matrix.os }} @@ -50,4 +50,4 @@ jobs: pip install jupyter-book sphinx-multitoc-numbering quantecon-book-theme sphinxext-rediraffe sphinx_tojupyter - name: Build Lectures (+ Execution Checks) [Windows] shell: powershell - run: jb build lectures --path-output=./ \ No newline at end of file + run: jb build lectures --path-output=./ -W --keep-going \ No newline at end of file From 95f7fb00c337462a850fae295512e09b8cd854a3 Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 1 Jun 2021 12:51:02 +1000 Subject: [PATCH 08/10] Enable upload of execution reports if failure() --- .github/workflows/scheduled.yml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index 5e5c3d7c..b5e116fa 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -19,14 +19,20 @@ jobs: with: auto-update-conda: true python-version: ${{ matrix.python-version }} - - name: Install Anaconda + Dependencies [Linux,OS X] + - name: Install Anaconda + Dependencies shell: bash -l {0} run: | conda install anaconda pip install jupyter-book sphinx-multitoc-numbering quantecon-book-theme sphinxext-rediraffe sphinx_tojupyter - - name: Build Lectures (+ Execution Checks) [Linux, OS X] + - name: Build Lectures (+ Execution Checks) shell: bash -l {0} run: jb build lectures --path-output=./ -W --keep-going + - name: Upload Execution Reports + uses: actions/upload-artifact@v2 + if: failure() + with: + name: execution-reports + path: _build/html/reports execution-tests-win: name: Execution Tests (${{ matrix.python-version }}, ${{ matrix.os }}) runs-on: ${{ matrix.os }} @@ -42,12 +48,18 @@ jobs: with: auto-update-conda: true python-version: ${{ matrix.python-version }} - - name: Install Anaconda + Dependencies [Windows] + - name: Install Anaconda + Dependencies shell: powershell run: | conda install anaconda pip install jupyter-book pip install jupyter-book sphinx-multitoc-numbering quantecon-book-theme sphinxext-rediraffe sphinx_tojupyter - - name: Build Lectures (+ Execution Checks) [Windows] + - name: Build Lectures (+ Execution Checks) shell: powershell - run: jb build lectures --path-output=./ -W --keep-going \ No newline at end of file + run: jb build lectures --path-output=./ -W --keep-going + - name: Upload Execution Reports + uses: actions/upload-artifact@v2 + if: failure() + with: + name: execution-reports + path: _build/html/reports From e9791c1a34818e201e26e310963c714ddb49a451 Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 1 Jun 2021 13:48:01 +1000 Subject: [PATCH 09/10] [windows] fix to improve compatibility with windows yfinance --- lectures/pandas.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lectures/pandas.md b/lectures/pandas.md index 0d06e311..e0e70cf0 100644 --- a/lectures/pandas.md +++ b/lectures/pandas.md @@ -549,7 +549,7 @@ Following the work you did in {ref}`Exercise 1 `, you can query the data ```{code-cell} python3 indices_data = read_data( indices_list, - start=dt.datetime(1928, 1, 2), + start=dt.datetime(1971, 1, 1), #Common Start Date end=dt.datetime(2020, 12, 31) ) ``` From 7bc4d5121065f6ae9376203a3a2eb340cc968ccd Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 1 Jun 2021 14:06:52 +1000 Subject: [PATCH 10/10] rename execution checks --- .github/workflows/{scheduled.yml => execution.yml} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename .github/workflows/{scheduled.yml => execution.yml} (95%) diff --git a/.github/workflows/scheduled.yml b/.github/workflows/execution.yml similarity index 95% rename from .github/workflows/scheduled.yml rename to .github/workflows/execution.yml index b5e116fa..1b804667 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/execution.yml @@ -1,8 +1,8 @@ name: Run Execution Tests [Latest Anaconda] -on: push - # schedule: - # # UTC 22:00 is early morning in Australia - # - cron: '0 22 * * *' +on: + schedule: + # UTC 22:00 is early morning in Australia + - cron: '0 22 * * *' jobs: execution-tests-linux-osx: name: Execution Tests (${{ matrix.python-version }}, ${{ matrix.os }})