|
55 | 55 | extra-packages: any::rcmdcheck |
56 | 56 | needs: check |
57 | 57 |
|
58 | | - - name: setup r-reticulate venv |
59 | | - shell: Rscript {0} |
60 | | - run: | |
61 | | - python_packages <- c("numpy", "fastf1") |
62 | | -
|
63 | | - library(reticulate) |
64 | | - virtualenv_create("r-reticulate", Sys.which("python")) |
65 | | - virtualenv_install("r-reticulate", python_packages) |
66 | | -
|
67 | | - path_to_python <- virtualenv_python("r-reticulate") |
68 | | - writeLines(sprintf("RETICULATE_PYTHON=%s", path_to_python), |
69 | | - Sys.getenv("GITHUB_ENV")) |
70 | | -
|
71 | 58 | - uses: r-lib/actions/check-r-package@v2 |
72 | 59 | with: |
73 | 60 | upload-snapshots: true |
@@ -107,58 +94,6 @@ jobs: |
107 | 94 | with: |
108 | 95 | upload-snapshots: true |
109 | 96 |
|
110 | | - R-CMD-check-old-ff1: |
111 | | - runs-on: ${{ matrix.config.os }} |
112 | | - |
113 | | - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) old fastf1 |
114 | | - |
115 | | - strategy: |
116 | | - fail-fast: false |
117 | | - matrix: |
118 | | - config: |
119 | | - - {os: ubuntu-latest, r: 'release'} |
120 | | - |
121 | | - env: |
122 | | - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} |
123 | | - R_KEEP_PKG_SOURCE: yes |
124 | | - |
125 | | - steps: |
126 | | - - uses: actions/checkout@v3 |
127 | | - |
128 | | - - uses: r-lib/actions/setup-pandoc@v2 |
129 | | - |
130 | | - - uses: r-lib/actions/setup-r@v2 |
131 | | - with: |
132 | | - r-version: ${{ matrix.config.r }} |
133 | | - http-user-agent: ${{ matrix.config.http-user-agent }} |
134 | | - use-public-rspm: true |
135 | | - |
136 | | - - uses: actions/setup-python@v4 |
137 | | - with: |
138 | | - python-version: "3.x" |
139 | | - |
140 | | - - uses: r-lib/actions/setup-r-dependencies@v2 |
141 | | - with: |
142 | | - extra-packages: any::rcmdcheck |
143 | | - needs: check |
144 | | - |
145 | | - - name: setup r-reticulate venv |
146 | | - shell: Rscript {0} |
147 | | - run: | |
148 | | - python_packages <- c("urllib3", "fastf1==3.3.9") |
149 | | -
|
150 | | - library(reticulate) |
151 | | - virtualenv_create("r-reticulate", Sys.which("python")) |
152 | | - virtualenv_install("r-reticulate", python_packages) |
153 | | -
|
154 | | - path_to_python <- virtualenv_python("r-reticulate") |
155 | | - writeLines(sprintf("RETICULATE_PYTHON=%s", path_to_python), |
156 | | - Sys.getenv("GITHUB_ENV")) |
157 | | -
|
158 | | - - uses: r-lib/actions/check-r-package@v2 |
159 | | - with: |
160 | | - upload-snapshots: true |
161 | | - |
162 | 97 | R-CMD-check-hard: |
163 | 98 | # NOTE: This workflow only directly installs "hard" dependencies, i.e. Depends, |
164 | 99 | # Imports, and LinkingTo dependencies. Notably, Suggests dependencies are never |
@@ -201,6 +136,7 @@ jobs: |
201 | 136 | any::knitr |
202 | 137 | any::rmarkdown |
203 | 138 | any::markdown |
| 139 | + any::vcr |
204 | 140 | needs: check |
205 | 141 |
|
206 | 142 | - uses: r-lib/actions/check-r-package@v2 |
@@ -245,19 +181,15 @@ jobs: |
245 | 181 | - name: setup r-reticulate venv |
246 | 182 | shell: Rscript {0} |
247 | 183 | run: | |
248 | | - python_packages <- c("numpy") |
249 | | -
|
250 | | - library(reticulate) |
251 | | - virtualenv_create("r-reticulate", Sys.which("python")) |
252 | | - virtualenv_install("r-reticulate", python_packages) |
253 | | - #force dev version install with repl python from reticulate |
254 | | - repl_python(quiet = TRUE) |
255 | | - %pip install git+https://github.com/theOehrly/Fast-F1.git |
256 | | - exit |
257 | | -
|
258 | | - path_to_python <- virtualenv_python("r-reticulate") |
259 | | - writeLines(sprintf("RETICULATE_PYTHON=%s", path_to_python), |
260 | | - Sys.getenv("GITHUB_ENV")) |
| 184 | + path_to_python <- reticulate::virtualenv_create( |
| 185 | + envname = "r-reticulate", |
| 186 | + python = Sys.which("python"), |
| 187 | + packages = c("numpy") |
| 188 | + ) |
| 189 | + writeLines(sprintf("RETICULATE_PYTHON=%s", path_to_python), |
| 190 | + Sys.getenv("GITHUB_ENV")) |
| 191 | + reticulate::py_require('fastf1@git+https://github.com/theOehrly/Fast-F1.git') |
| 192 | + reticulate::py_available(TRUE) |
261 | 193 |
|
262 | 194 | - uses: r-lib/actions/check-r-package@v2 |
263 | 195 | with: |
|
0 commit comments