From 62406cc44864f0296a2732a3e32de9e4495ec125 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Thu, 10 Oct 2024 10:41:01 +0200 Subject: [PATCH 01/16] TEMPORARY run mysteriously failing command directly --- .github/workflows/pytest.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index fb286dd6f..f00d21316 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -116,6 +116,10 @@ jobs: # TEMPORARY Work around pretenders/pretenders#153 pip install "bottle < 0.13" + - name: Debug jupyter kernelspec --version + run: jupyter kernelspec --version + shell: bash + - name: Install R dependencies and tutorial requirements run: | install.packages(c("remotes", "Rcpp")) From 418fc8bc0269cc888b20ce15a1488174a1993f4a Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Thu, 10 Oct 2024 11:23:09 +0200 Subject: [PATCH 02/16] TEMPORARY force re-install of IRkernel --- .github/workflows/pytest.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index f00d21316..83bed481c 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -126,7 +126,7 @@ jobs: remotes::install_cran( c("IRkernel", "reticulate"), dependencies = TRUE, - # force = TRUE, + force = TRUE, ) IRkernel::installspec() From 2655edf3905b102e358217617a5b0e7ed86c63ae Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Thu, 10 Oct 2024 11:49:46 +0200 Subject: [PATCH 03/16] TEMPORARY call failing line manually due to poor R error handling --- .github/workflows/pytest.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 83bed481c..a254f6d5a 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -129,6 +129,8 @@ jobs: force = TRUE, ) + system2('jupyter', c('kernelspec', '--version'), FALSE, FALSE) + IRkernel::installspec() # commented: for debugging From 89544137b15bddebd4f7c237f50cc4594de51560 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Thu, 10 Oct 2024 12:01:15 +0200 Subject: [PATCH 04/16] TEMPORARY make manual command print to stdout --- .github/workflows/pytest.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index a254f6d5a..54599b752 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -129,7 +129,7 @@ jobs: force = TRUE, ) - system2('jupyter', c('kernelspec', '--version'), FALSE, FALSE) + system2('jupyter', c('kernelspec', '--version'), TRUE, TRUE) IRkernel::installspec() From a29198bf6ec9ce77fc0fdb467265ee5d267959b7 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Thu, 10 Oct 2024 12:21:36 +0200 Subject: [PATCH 05/16] TEMPORARY debug which rscript is used --- .github/workflows/pytest.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 54599b752..ba4a6880f 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -120,6 +120,10 @@ jobs: run: jupyter kernelspec --version shell: bash + - name: Debug which Rscript is used below + run: which Rscript + shell: bash + - name: Install R dependencies and tutorial requirements run: | install.packages(c("remotes", "Rcpp")) From 7e42e9ab80b64baa3eab7fb0d5167187b8218e32 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Thu, 10 Oct 2024 12:29:46 +0200 Subject: [PATCH 06/16] TEMPORARY add more debug output within Rscript --- .github/workflows/pytest.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index ba4a6880f..c232ab172 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -133,6 +133,11 @@ jobs: force = TRUE, ) + system2('which', 'python', TRUE, TRUE) + system2('which', 'jupyter', TRUE, TRUE) + + system('jupyter', c('kernelspec', '--version'), TRUE, TRUE) + system2('jupyter', c('kernelspec', '--version'), TRUE, TRUE) IRkernel::installspec() From aedb85b52145e58e9697bdfda5e8f4e7fc396be4 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Thu, 10 Oct 2024 12:42:51 +0200 Subject: [PATCH 07/16] TEMPORARY make Rscript more verbose --- .github/workflows/pytest.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index c232ab172..33edb1c31 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -136,7 +136,7 @@ jobs: system2('which', 'python', TRUE, TRUE) system2('which', 'jupyter', TRUE, TRUE) - system('jupyter', c('kernelspec', '--version'), TRUE, TRUE) + system('jupyter kernelspec --version') system2('jupyter', c('kernelspec', '--version'), TRUE, TRUE) @@ -145,7 +145,7 @@ jobs: # commented: for debugging # print(reticulate::py_config()) # reticulate::py_run_string("import os; print(os.environ)") - shell: Rscript {0} + shell: Rscript --verbose {0} - name: Run test suite using pytest run: | From 6a7a480f57dd90e9f8ed58b31b0fc4aef2d590c8 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Thu, 10 Oct 2024 13:04:40 +0200 Subject: [PATCH 08/16] TEMPORARY parse command manually as offending function does --- .github/workflows/pytest.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 33edb1c31..fb18333fb 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -136,6 +136,8 @@ jobs: system2('which', 'python', TRUE, TRUE) system2('which', 'jupyter', TRUE, TRUE) + paste(c(shQuote('jupyter'), c('kernelspec', '--version')), collapse = " ") + system('jupyter kernelspec --version') system2('jupyter', c('kernelspec', '--version'), TRUE, TRUE) From d5a30c478fa9505ff0d415a461969b9d0d0c2490 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Thu, 10 Oct 2024 13:11:46 +0200 Subject: [PATCH 09/16] TEMPORARY debug PATH --- .github/workflows/pytest.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index fb18333fb..2d6301176 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -124,6 +124,10 @@ jobs: run: which Rscript shell: bash + - name: Debug PATH + run: echo $PATH + shell: bash + - name: Install R dependencies and tutorial requirements run: | install.packages(c("remotes", "Rcpp")) @@ -135,6 +139,7 @@ jobs: system2('which', 'python', TRUE, TRUE) system2('which', 'jupyter', TRUE, TRUE) + system2('which', 'jupyter-kernelspec', TRUE, TRUE) paste(c(shQuote('jupyter'), c('kernelspec', '--version')), collapse = " ") From 85a25d84afc2921b893170129486d84197c99f93 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Thu, 10 Oct 2024 13:18:42 +0200 Subject: [PATCH 10/16] TEMPORARY call jupyter-kernelspec directly --- .github/workflows/pytest.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 2d6301176..2180f3667 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -143,9 +143,9 @@ jobs: paste(c(shQuote('jupyter'), c('kernelspec', '--version')), collapse = " ") - system('jupyter kernelspec --version') + system('jupyter-kernelspec --version') - system2('jupyter', c('kernelspec', '--version'), TRUE, TRUE) + system2('jupyter-kernelspec', '--version', TRUE, TRUE) IRkernel::installspec() From 7ed3a6e88db8127f6e590e01ef69883dc2c90b14 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Mon, 14 Oct 2024 11:53:31 +0200 Subject: [PATCH 11/16] TEMPORARY run pip list from inside Rscript --- .github/workflows/pytest.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 2180f3667..39b8c981a 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -138,6 +138,10 @@ jobs: ) system2('which', 'python', TRUE, TRUE) + + system2('which', 'pip', TRUE, TRUE) + system2('pip', 'list', TRUE, TRUE) + system2('which', 'jupyter', TRUE, TRUE) system2('which', 'jupyter-kernelspec', TRUE, TRUE) From 10c76ace956c77db74bcde87008fb1c3df7dfdac Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Mon, 14 Oct 2024 12:52:17 +0200 Subject: [PATCH 12/16] TEMPORARY echo PYTHONPATH --- .github/workflows/pytest.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 39b8c981a..44b3094a9 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -138,6 +138,7 @@ jobs: ) system2('which', 'python', TRUE, TRUE) + system2('echo', '$PYTHONPATH', TRUE, TRUE) system2('which', 'pip', TRUE, TRUE) system2('pip', 'list', TRUE, TRUE) From d05b1ddc06e349896ca49f2ef4d9591bb0f3d283 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Mon, 14 Oct 2024 13:05:55 +0200 Subject: [PATCH 13/16] TEMPORARY echo PYTHONPATH outside of Rscript --- .github/workflows/pytest.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 44b3094a9..51f56319b 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -128,6 +128,10 @@ jobs: run: echo $PATH shell: bash + - name: Debug PYTHONPATH + run: echo $PYTHONPATH + shell: bash + - name: Install R dependencies and tutorial requirements run: | install.packages(c("remotes", "Rcpp")) From 8bebe0908022765237944b056370cbdfd28b0d79 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Mon, 14 Oct 2024 15:10:37 +0200 Subject: [PATCH 14/16] TEMPORARY check python path from within python --- .github/workflows/pytest.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 51f56319b..52f1a90d9 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -128,8 +128,8 @@ jobs: run: echo $PATH shell: bash - - name: Debug PYTHONPATH - run: echo $PYTHONPATH + - name: Debug python path + run: python -c "import sys; print(sys.executable, sys.path)" shell: bash - name: Install R dependencies and tutorial requirements @@ -142,7 +142,7 @@ jobs: ) system2('which', 'python', TRUE, TRUE) - system2('echo', '$PYTHONPATH', TRUE, TRUE) + system2('python', '-c "import sys; print(sys.executable, sys.path)"', TRUE, TRUE) system2('which', 'pip', TRUE, TRUE) system2('pip', 'list', TRUE, TRUE) From 4516cfcc85a8dfb3a479982adf0f8ab52ddb70f2 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Wed, 16 Oct 2024 15:20:38 +0200 Subject: [PATCH 15/16] TEMPORARY disable all steps other than R/Python-related ones --- .github/workflows/pytest.yaml | 56 +++++++++++++++++------------------ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 52f1a90d9..7913bd86e 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -19,14 +19,14 @@ jobs: strategy: matrix: os: - - macos-13 - - macos-latest + # - macos-13 + # - macos-latest - ubuntu-latest - - windows-latest + # - windows-latest python-version: - - "3.8" # Earliest version supported by ixmp - - "3.9" - - "3.10" + # - "3.8" # Earliest version supported by ixmp + # - "3.9" + # - "3.10" - "3.11" - "3.12" # Latest supported by ixmp gams-version: @@ -74,32 +74,32 @@ jobs: cache: pip cache-dependency-path: "**/pyproject.toml" - - uses: ts-graphviz/setup-graphviz@v2 - # TEMPORARY Work around ts-graphviz/setup-graphviz#630 - if: ${{ ! startswith(matrix.os, 'macos-') }} + # - uses: ts-graphviz/setup-graphviz@v2 + # # TEMPORARY Work around ts-graphviz/setup-graphviz#630 + # if: ${{ ! startswith(matrix.os, 'macos-') }} - uses: r-lib/actions/setup-r@v2 id: setup-r - - name: Cache GAMS installer and R packages - uses: actions/cache@v4 - with: - path: | - gams - ${{ env.R_LIBS_USER }} - key: ${{ matrix.os }}-R${{ steps.setup-r.outputs.installed-r-version }} - restore-keys: | - ${{ matrix.os }}- - - - uses: iiasa/actions/setup-gams@main - with: - version: ${{ matrix.gams-version }} - license: ${{ secrets.GAMS_LICENSE }} - - - name: Set RETICULATE_PYTHON - # Use the environment variable set by the setup-python action, above. - run: echo "RETICULATE_PYTHON=$pythonLocation" >> $GITHUB_ENV - shell: bash + # - name: Cache GAMS installer and R packages + # uses: actions/cache@v4 + # with: + # path: | + # gams + # ${{ env.R_LIBS_USER }} + # key: ${{ matrix.os }}-R${{ steps.setup-r.outputs.installed-r-version }} + # restore-keys: | + # ${{ matrix.os }}- + + # - uses: iiasa/actions/setup-gams@main + # with: + # version: ${{ matrix.gams-version }} + # license: ${{ secrets.GAMS_LICENSE }} + + # - name: Set RETICULATE_PYTHON + # # Use the environment variable set by the setup-python action, above. + # run: echo "RETICULATE_PYTHON=$pythonLocation" >> $GITHUB_ENV + # shell: bash - name: Install Python package and dependencies # [docs] contains [tests], which contains [report,tutorial] From d156586912d0dd013d23d1505ca0a9376f9e7644 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Wed, 16 Oct 2024 15:22:03 +0200 Subject: [PATCH 16/16] TEMPORARY check Python before setup-python --- .github/workflows/pytest.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 7913bd86e..883634e9c 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -67,6 +67,10 @@ jobs: with: fetch-depth: ${{ env.depth }} fetch-tags: true + + - name: Debug python path + run: python -c "import sys; print(sys.executable, sys.path)" + shell: bash - uses: actions/setup-python@v5 with: