Skip to content

Commit 56f02bb

Browse files
author
Susan Vanderplas
committed
Ok, let's try this.
1 parent 731a342 commit 56f02bb

File tree

1 file changed

+24
-20
lines changed

1 file changed

+24
-20
lines changed

.github/workflows/main.yml

+24-20
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ jobs:
1111
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1212
GH_PAT: ${{ secrets.GH_PAT }}
1313
GITHUB_PAT: ${{ secrets.GH_PAT }}
14-
WORKON_HOME: "~/.virtualenvs"
1514

1615
steps:
1716
- uses: actions/checkout@v4
@@ -33,20 +32,21 @@ jobs:
3332
&& sudo apt install gh -y
3433
shell: /bin/bash {0}
3534

36-
- name: Setup Python and virtual environment using requirements file
37-
id: setup-python-venv
38-
uses: srvanderplas/[email protected]
39-
with:
40-
python-version-file: '.python-version'
41-
cache-dependency-path: requirements.txt
42-
install-cmd: "./py-deps -i"
43-
44-
- name: Test
45-
run: |
46-
echo $RETICULATE_PYTHON;
47-
echo $RETICULATE_PYTHON_ENV;
48-
echo "$pythonLocation" >> $GITHUB_PATH;
35+
#
36+
# - name: Setup Python and virtual environment using requirements file
37+
# id: setup-python-venv
38+
# uses: srvanderplas/[email protected]
39+
# with:
40+
# python-version-file: '.python-version'
41+
# cache-dependency-path: requirements.txt
42+
# install-cmd: "./py-deps -i"
4943

44+
# - name: Test
45+
# run: |
46+
# echo $RETICULATE_PYTHON;
47+
# echo $RETICULATE_PYTHON_ENV;
48+
# echo "$pythonLocation" >> $GITHUB_PATH;
49+
#
5050

5151
- name: Renv setup
5252
uses: r-lib/actions/setup-renv@v2
@@ -57,17 +57,21 @@ jobs:
5757
renv::status()
5858
renv::diagnostics()
5959
60-
- name: Reticulate checks
60+
- name: Setup Python/venv with reqs file in reticulate
61+
id: setup-reticulate-venv
6162
shell: Rscript {0}
6263
run: |
63-
print(getwd())
64-
65-
system("bash venv/bin/activate")
66-
system("which python")
64+
reticulate::install_python(version=readLines(".python-version"))
65+
reticulate::py_install(c("virtualenv"))
66+
reticulate::virtualenv_root(".")
67+
reticulate::virtualenv_create("venv", requirements="requirements.txt")
68+
reticulate::use_virtualenv("venv")
6769
70+
- name: Reticulate checks
71+
shell: Rscript {0}
72+
run: |
6873
devtools::session_info()
6974
reticulate::py_config()
70-
reticulate::use_virtualenv("${{ env.VIRTUAL_ENV }}")
7175
7276
- uses: quarto-dev/quarto-actions/setup@v2
7377
with:

0 commit comments

Comments
 (0)