Update Paper joss #149
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: R-test | |
on: | |
pull_request: | |
branches: | |
[main] | |
push: | |
branches: | |
[main, dev] | |
schedule: | |
- cron: '11 1 1 * *' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
R-test: | |
name: python ${{ matrix.python-version }}, ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
env: | |
REPO_NAME: ${{ github.event.repository.name }} | |
strategy: | |
matrix: | |
os: [windows-latest, macos-latest] | |
python-version: ['3.8', '3.9', '3.10', '3.11'] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
miniforge-version: 'latest' | |
- name: Conda install | |
shell: bash -el {0} | |
run: | | |
# conda deactivate | |
# conda rename -n test wq_harmonize | |
conda install "pytest" "numpy<2.0" "pandas<2.0" "geopandas>=0.10.2, <0.13" "pint>=0.18" "dataretrieval>=1.0, <1.0.5" "requests" | |
conda install pip | |
pip install . | |
conda create --name wq_harmonize --clone test | |
- name: Print Conda environment | |
shell: bash -l {0} | |
run: | | |
conda info | |
conda list | |
- name: Set up R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: 'release' | |
#- uses: r-lib/actions/setup-renv@v2 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- name: R depends | |
shell: Rscript {0} | |
run: | | |
install.packages(c("knitr", "rmarkdown", "reticulate")) | |
- name: setup r-reticulate venv & render rmd | |
shell: Rscript {0} | |
run: | | |
library(reticulate) | |
# packages = c( | |
# "pytest", "numpy<2.0", "pandas<2.0", "geopandas>=0.10.2, <0.13", "pint>=0.18", | |
# "dataretrieval>=1.0, <1.0.5", "requests" | |
# ) | |
# reticulate::install_miniconda() | |
# reticulate::conda_create("wq_harmonize", python_version = "${{ matrix.python-version }}") | |
# reticulate::conda_install("wq_harmonize", packages) | |
# path_to_venv <- virtualenv_create( | |
# envname = "wq_harmonize", | |
# python = Sys.which("python"), # placed on PATH by the setup-python action | |
# packages | |
# ) | |
# use_virtualenv("wq_harmonize") | |
reticulate::use_condaenv("wq_harmonize") | |
#reticulate::py_install("git+https://github.com/USEPA/harmonize-wq.git", pip = TRUE, envname = "wq_harmonize") | |
rmarkdown::render(input = "demos/Harmonize_Pensacola.Rmd") | |
- name: Upload artifact | |
if: ${{ (matrix.os == 'windows-latest') && (matrix.python-version == 3.11) }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: demos-artifact | |
# Upload entire demos folder | |
path: './demos' |