Skip to content

Commit

Permalink
collect metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcaceres committed Jun 21, 2024
1 parent 55f1fff commit 29b13ca
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/collect_metadata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master

name: collect_metadata

jobs:
collect:
runs-on: ubuntu-latest

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
EMF_DATABASE_HOST: ${{ secrets.EMF_DATABASE_HOST }}
EMF_DATABASE_USER: ${{ secrets.EMF_DATABASE_USER}}
EMF_DATABASE_PASS: ${{ secrets.EMF_DATABASE_PASS}}
EMF_DATABASE: ${{ secrets.EMF_DATABASE}}

steps:
- uses: actions/checkout@v3

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

- name: Install system dependencies
run: |
sudo apt-get install -y make libicu-dev pandoc libcurl4-openssl-dev libssl-dev git libgit2-dev libpq-dev libfontconfig1-dev libfreetype6-dev libfribidi-dev libharfbuzz-dev libjpeg-dev libpng-dev libtiff-dev libxml2-dev libssh-dev
- name: Cache keys dependencies
run: |
install.packages('pkgdepends')
saveRDS(pkgdepends::new_pkg_deps('https://github.com/emf-creaf/EMFtoolbox')$resolve()$get_resolution(), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Restore R package cache
uses: actions/cache@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install packages
run: |
R -e 'install.packages("remotes")'
R -e 'remotes::install_github("emf-creaf/EMFtoolbox")'
- name: Collect metadata and update db
run: |
R -e 'EMFtoolbox::collect_metadata(.dry = FALSE)'
28 changes: 28 additions & 0 deletions metadata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
id: 'medfateland'
title: medfateland
emf_type: softwork
emf_public: true
emf_automatized: true
emf_reproducible: false
emf_draft: false
emf_data_type: emf_data_product
data_repository: ''
model_repository: ''
nodes:
- "medfate_model"
resource_link: softworks/medfateland
authors:
- mcaceres
- aameztegui
- naquilue
tags: ''
links:
url_pdf: ''
url_doi: ''
url_docs: 'https://emf-creaf.github.io/medfateland/'
url_source: 'https://github.com/emf-creaf/medfateland/'
requirements:
- 'R (>= 3.4.0)'
description: 'Simulate forest hydrology, forest function and dynamics over landscapes'
date: '2024-06-21'
date_lastmod: '2024-06-21'

0 comments on commit 29b13ca

Please sign in to comment.