Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update actions #136

Merged
merged 18 commits into from
Dec 17, 2024
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
^Meta$
^Dockerfile$
^.devcontainer
^.venv/
32 changes: 13 additions & 19 deletions .github/workflows/R_CDM_check_hades.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
CDM5_SQL_SERVER_PASSWORD: ${{ secrets.CDM5_SQL_SERVER_PASSWORD }}
CDM5_SQL_SERVER_SERVER: ${{ secrets.CDM5_SQL_SERVER_SERVER }}
CDM5_SQL_SERVER_USER: ${{ secrets.CDM5_SQL_SERVER_USER }}
UV_SYSTEM_PYTHON: 1

steps:
- uses: actions/checkout@v4
Expand All @@ -58,7 +59,13 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.11'


- name: Install the latest version of uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
python-version: "3.11"

- name: Install system requirements
if: runner.os == 'Linux'
run: |
Expand All @@ -75,38 +82,25 @@ jobs:
extra-packages: any::rcmdcheck
needs: check

- uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: setup r-reticulate venv
shell: Rscript {0}
run: |
python_packages <-
c("polars", "tqdm", "connectorx", "pyarrow", "pynvml", "numpy")

library(reticulate)
virtualenv_create("r-reticulate", Sys.which("python"), packages=python_packages)
virtualenv_install("r-reticulate", "torch", pip_options = c("--index-url https://download.pytorch.org/whl/cpu"))
run: |
uv pip install polars tqdm connectorx pyarrow pynvml numpy
uv pip install torch --index https://download.pytorch.org/whl/cpu/

path_to_python <- virtualenv_python("r-reticulate")
writeLines(sprintf("RETICULATE_PYTHON=%s", path_to_python),
Sys.getenv("GITHUB_ENV"))

- uses: r-lib/actions/check-r-package@v2
with:
args: 'c("--no-manual", "--as-cran")'
error-on: '"warning"'
check-dir: '"check"'

- name: Install covr
if: runner.os == 'ubuntu-24.04'
if: runner.os == 'Linux'
run: |
remotes::install_cran("covr")
shell: Rscript {0}

- name: Test coverage
if: runner.os == 'ubuntu-24.04'
if: runner.os == 'Linux'
run: covr::codecov(token = "${{ secrets.CODECOV_TOKEN }}")
shell: Rscript {0}

Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/R_CMD_check_main_weekly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,17 @@ jobs:
WEBAPI_TEST_SECURE_WEBAPI_URL: ${{ secrets.WEBAPI_TEST_SECURE_WEBAPI_URL }}
WEBAPI_TEST_ADMIN_USER_NAME: ${{ secrets.WEBAPI_TEST_ADMIN_USER_NAME }}
WEBAPI_TEST_ADMIN_USER_PASSWORD: ${{ secrets.WEBAPI_TEST_ADMIN_USER_PASSWORD }}
TORCH_INSTALL: '1'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.11'

- uses: r-lib/actions/setup-tinytex@v2

Expand All @@ -73,12 +72,13 @@ jobs:
shell: Rscript {0}
run: |
python_packages <-
c("polars", "tqdm", "connectorx", "pyarrow", "scikit-learn")
c("polars", "tqdm", "connectorx", "pyarrow")

library(reticulate)
virtualenv_create("r-reticulate", Sys.which("python"))
virtualenv_install("r-reticulate", python_packages)
virtualenv_install("r-reticulate", "torch", pip_options = c("--index-url https://download.pytorch.org/whl/cpu"))
virtualenv_create("r-reticulate", Sys.which("python"),
packages=python_packages)
virtualenv_install("r-reticulate", "torch",
pip_options = c("--index-url https://download.pytorch.org/whl/cpu"))

path_to_python <- virtualenv_python("r-reticulate")
writeLines(sprintf("RETICULATE_PYTHON=%s", path_to_python),
Expand Down
Loading