diff --git a/.github/workflows/collect_metadata.yml b/.github/workflows/collect_metadata.yml new file mode 100644 index 0000000..b1e3a83 --- /dev/null +++ b/.github/workflows/collect_metadata.yml @@ -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)' diff --git a/metadata.yml b/metadata.yml new file mode 100644 index 0000000..7a08eaf --- /dev/null +++ b/metadata.yml @@ -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'