Add reticulate #49
Workflow file for this run
This file contains hidden or 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: "Update Publications" | |
| on: | |
| push: | |
| branches: | |
| - dpe-1262-fix-pub-script | |
| schedule: | |
| - cron: "0 0 1 * *" | |
| workflow_dispatch: | |
| env: | |
| RETICULATE_AUTOCONFIGURE: 'FALSE' | |
| R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| jobs: | |
| update-publications: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # - name: Set up Python | |
| # uses: actions/setup-python@v4 | |
| # with: | |
| # python-version: "3.10" | |
| - uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: '4.3.1' | |
| - name: Install system dependencies | |
| run: | | |
| export DEBIAN_FRONTEND=noninteractive | |
| sudo apt-get update && \ | |
| sudo apt-get -y install libpng-dev \ | |
| pandoc \ | |
| git-core \ | |
| libv8-dev \ | |
| libxml2-dev \ | |
| libcurl4-openssl-dev \ | |
| libssl-dev \ | |
| libssh2-1-dev \ | |
| zlib1g-dev \ | |
| libgit2-dev \ | |
| python3 \ | |
| python3-dev \ | |
| python3-pip \ | |
| python3-venv | |
| # pandoc-citeproc | |
| - name: Install dependencies | |
| run: | | |
| install.packages('remotes') | |
| remotes::install_cran('rentrez') | |
| remotes::install_cran('librarian') | |
| remotes::install_version('rjson', version='0.2.21') | |
| remotes::install_version('reticulate', version='1.28') | |
| reticulate::install_miniconda() | |
| reticulate::use_condaenv("r-reticulate", required=TRUE) | |
| reticulate::py_config() | |
| remotes::install_cran("synapser", repos = c("http://ran.synapse.org", "https://cloud.r-project.org")) | |
| # deps <- readRDS('depends.Rds') | |
| # deps[['installed']] <- vapply(deps[['package']], remotes:::local_sha, character(1)) | |
| # update(deps) | |
| shell: Rscript {0} | |
| - name: Update OpenSSL in Conda | |
| run: | | |
| /home/runner/.local/share/r-miniconda/bin/conda install --yes -c conda-forge openssl | |
| # - name: Install Miniconda | |
| # run: | | |
| # Rscript -e "remotes::install_github('rstudio/reticulate')" | |
| # Rscript -e "reticulate::install_miniconda()" | |
| # - name: Install Python deps | |
| # run: | | |
| # Rscript -e "reticulate::py_discover_config()" | |
| # Rscript -e "reticulate::py_install(c('pandas', 'numpy', 'boto3', 'synapseclient'), pip = TRUE)" | |
| # - name: Install porTools | |
| # run: | | |
| # Rscript -e "remotes::install_github('eliteportal/publication_scraper')" | |
| - name: Query PubMed and upload results | |
| run: | | |
| Rscript ./inst/scripts/query-pubmed-grants.R --grant_table syn51209786 --parent syn51317180 --pub_table syn51407023 --auth_token ${{ secrets.SYNAPSE_PAT }} |