From af7377dd3747590bd3ea56b555f74e38e22733cb Mon Sep 17 00:00:00 2001 From: Patrice Lecharpentier Date: Thu, 11 Apr 2024 08:38:46 +0200 Subject: [PATCH] preparing new release and submission (#82) * removed man for internal func, adapted comput_day_from_date for a vector of dates, tests added * update man: for dates vector * added rhub workflow for rhub * news update, site, description * Update CITATION.cff --------- Co-authored-by: plecharpent --- .github/workflows/rhub.yaml | 95 +++++++++++++++++++++++++++++++++++++ CITATION.cff | 11 +++-- DESCRIPTION | 5 +- NEWS.md | 21 ++++++++ _pkgdown.yml | 2 + cran-comments.md | 22 +++------ 6 files changed, 133 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/rhub.yaml diff --git a/.github/workflows/rhub.yaml b/.github/workflows/rhub.yaml new file mode 100644 index 00000000..74ec7b05 --- /dev/null +++ b/.github/workflows/rhub.yaml @@ -0,0 +1,95 @@ +# R-hub's generic GitHub Actions workflow file. It's canonical location is at +# https://github.com/r-hub/actions/blob/v1/workflows/rhub.yaml +# You can update this file to a newer version using the rhub2 package: +# +# rhub::rhub_setup() +# +# It is unlikely that you need to modify this file manually. + +name: R-hub +run-name: "${{ github.event.inputs.id }}: ${{ github.event.inputs.name || format('Manually run by {0}', github.triggering_actor) }}" + +on: + workflow_dispatch: + inputs: + config: + description: 'A comma separated list of R-hub platforms to use.' + type: string + default: 'linux,windows,macos' + name: + description: 'Run name. You can leave this empty now.' + type: string + id: + description: 'Unique ID. You can leave this empty now.' + type: string + +jobs: + + setup: + runs-on: ubuntu-latest + outputs: + containers: ${{ steps.rhub-setup.outputs.containers }} + platforms: ${{ steps.rhub-setup.outputs.platforms }} + + steps: + # NO NEED TO CHECKOUT HERE + - uses: r-hub/actions/setup@v1 + with: + config: ${{ github.event.inputs.config }} + id: rhub-setup + + linux-containers: + needs: setup + if: ${{ needs.setup.outputs.containers != '[]' }} + runs-on: ubuntu-latest + name: ${{ matrix.config.label }} + strategy: + fail-fast: false + matrix: + config: ${{ fromJson(needs.setup.outputs.containers) }} + container: + image: ${{ matrix.config.container }} + + steps: + - uses: r-hub/actions/checkout@v1 + - uses: r-hub/actions/platform-info@v1 + with: + token: ${{ secrets.RHUB_TOKEN }} + job-config: ${{ matrix.config.job-config }} + - uses: r-hub/actions/setup-deps@v1 + with: + token: ${{ secrets.RHUB_TOKEN }} + job-config: ${{ matrix.config.job-config }} + - uses: r-hub/actions/run-check@v1 + with: + token: ${{ secrets.RHUB_TOKEN }} + job-config: ${{ matrix.config.job-config }} + + other-platforms: + needs: setup + if: ${{ needs.setup.outputs.platforms != '[]' }} + runs-on: ${{ matrix.config.os }} + name: ${{ matrix.config.label }} + strategy: + fail-fast: false + matrix: + config: ${{ fromJson(needs.setup.outputs.platforms) }} + + steps: + - uses: r-hub/actions/checkout@v1 + - uses: r-hub/actions/setup-r@v1 + with: + job-config: ${{ matrix.config.job-config }} + token: ${{ secrets.RHUB_TOKEN }} + - uses: r-hub/actions/platform-info@v1 + with: + token: ${{ secrets.RHUB_TOKEN }} + job-config: ${{ matrix.config.job-config }} + - uses: r-hub/actions/setup-deps@v1 + with: + job-config: ${{ matrix.config.job-config }} + token: ${{ secrets.RHUB_TOKEN }} + - uses: r-hub/actions/run-check@v1 + with: + job-config: ${{ matrix.config.job-config }} + token: ${{ secrets.RHUB_TOKEN }} diff --git a/CITATION.cff b/CITATION.cff index 576f9286..9efee370 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -1,14 +1,14 @@ -# ----------------------------------------------------------- -# CITATION file created with {cffr} R package, v1.0.0 +# -------------------------------------------- +# CITATION file created with {cffr} R package # See also: https://docs.ropensci.org/cffr/ -# ----------------------------------------------------------- +# -------------------------------------------- cff-version: 1.2.0 message: 'To cite package "SticsRFiles" in publications use:' type: software license: LGPL-3.0-or-later title: 'SticsRFiles: Read and Modify ''STICS'' Input/Output Files' -version: 1.2.0 +version: 1.3.0 abstract: Manipulating input and output files of the 'STICS' crop model. Files are either 'JavaSTICS' XML files or text files used by the model 'fortran' executable. Most basic functionalities are reading or writing parameter names and values in @@ -35,7 +35,7 @@ authors: repository: https://CRAN.R-project.org/package=SticsRFiles repository-code: https://github.com/SticsRPacks/SticsRFiles url: https://doi.org/10.5281/zenodo.4443206 -date-released: '2024-02-23' +date-released: '2024-04-10' contact: - family-names: Lecharpentier given-names: Patrice @@ -468,3 +468,4 @@ references: given-names: Hadley email: hadley@posit.co year: '2024' + diff --git a/DESCRIPTION b/DESCRIPTION index 458f92e9..87b87825 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: SticsRFiles Title: Read and Modify 'STICS' Input/Output Files -Version: 1.2.0 -Date: 2024-02-23 +Version: 1.3.0 +Date: 2024-04-10 Authors@R: c( person("Patrice", "Lecharpentier", , "patrice.lecharpentier@inrae.fr", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-4044-4322")), @@ -11,6 +11,7 @@ Authors@R: c( comment = c(ORCID = "0000-0002-8676-5447")), person("Michel", "Giner", , "michel.giner@cirad.fr", role = "aut", comment = c(ORCID = "0000-0002-9310-2377")), + person("Timothee", "Flutre", ,"timothee.flutre@inrae.fr", role = "ctb"), person("Thomas", "Robine", role = "ctb"), person("Amine", "Barkaoui", role = "ctb"), person("Patrick", "Chabrier", role = "ctb"), diff --git a/NEWS.md b/NEWS.md index 10be7447..d3172c5c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,24 @@ +# SticsRFiles 1.3.0 _2024-04-10_ + +* FUNCTIONS + * Message improvement for missing xml files detected before text files + generation + * New functions for computing days numbers from dates with reference to + starting dates + +* FIXES + * Updating STICS versions information + * get_file using usm names (regex pattern) + * upgrade _ini.xml file (magrain0 parameter position) + * xml files generation: missing data management when loading xls/csv + files + * text files generation: plant and tec files were not generated in + intercropping usms for the associated crop + +* DOC + * added license file + + # SticsRFiles 1.2.0 _2024-02-21_ * FUNCTIONS diff --git a/_pkgdown.yml b/_pkgdown.yml index f7e16dd8..e0e5fe3f 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -4,6 +4,7 @@ url: https://sticsrpacks.github.io/SticsRFiles/ c(person(given = "Patrice", family = "Lecharpentier", role = c("aut", "cre"), email = "patrice.lecharpentier@inra.fr"), person(given = "Remi",family = "Vezy", role = c("aut"), email = "remi.vezy@cirad.fr"), person(given = "SticsRPacks", role = c("aut","cph")), + person("Timothee", "Flutre", ,"timothee.flutre@inrae.fr", role = "ctb"), person(given = "Julie", family = "Constantin", email = "julie.constantin@inra.fr", role = c("rev")), person(given = "Dominique", family = "Ripoche", email = "dominique.ripoche@inra.fr", role = c("rev")), person(given = "Marie", family = "Launay", email = "marie.launay@inra.fr", role = c("rev")), @@ -115,3 +116,4 @@ reference: - is_unix - is_windows - "`[.cropr_simulation`" + - compute_day_from_date diff --git a/cran-comments.md b/cran-comments.md index f160ea4d..d88fd8ef 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -21,19 +21,9 @@ 0 errors ✔ | 0 warnings ✔ | 3 notes ✖ -> revdepcheck::revdep_check(num_workers = 4) -── INSTALL ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 2 versions ── -Installing CRAN version of SticsRFiles -installation des dépendances ‘pillar’, ‘tidyselect’, ‘vctrs’, ‘timechange’, ‘stringi’, ‘fansi’, ‘pkgconfig’, ‘purrr’, ‘cpp11’, ‘Rcpp’, ‘cli’, ‘crayon’, ‘curl’, ‘data.table’, ‘dplyr’, ‘lifecycle’, ‘lubridate’, ‘rlang’, ‘rstudioapi’, ‘stringr’, ‘tibble’, ‘tidyr’, ‘XML’, ‘xml2’, ‘xslt’ - -Installing DEV version of SticsRFiles -Installing 31 packages: rlang, cli, vctrs, stringi, magrittr, lifecycle, glue, withr, pkgconfig, utf8, fansi, tidyselect, tibble, R6, pillar, generics, cpp11, Rcpp, xml2, stringr, purrr, dplyr, timechange, xslt, XML, tidyr, rstudioapi, lubridate, data.table, curl, crayon -── CHECK ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 0 packages ── -OK: 0 -BROKEN: 0 -Total time: <1 min -── REPORT ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── -Writing summary to 'revdep/README.md' -Writing problems to 'revdep/problems.md' -Writing failures to 'revdep/failures.md' -Writing CRAN report to 'revdep/cran.md' +## revdepcheck results + +We checked 0 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package. + + * We saw 0 new problems + * We failed to check 0 packages