Giter VIP home page Giter VIP logo

rgnparser's Introduction

rgnparser

Project Status: Active – The project has reached a stable, usable state and is being actively developed. R-check rstudio mirror downloads cran version

rgnparser: Parse Scientific Names

Docs: https://docs.ropensci.org/rgnparser/

Installation

install.packages("rgnparser")
# OR
remotes::install_github("ropensci/rgnparser")
library("rgnparser")

Install gnparser

The command line tool written in Go, gnparser, is required to use this package.

Instructions for installation can be found at the gnparser repo (https://github.com/gnames/gnparser#installation)

Meta

  • Please report any issues or bugs.
  • License: MIT
  • Get citation information for rgnparser in R doing citation(package = 'rgnparser')
  • Please note that this package is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

rgnparser's People

Contributors

sckott avatar joelnitta avatar albansagouis avatar kguidonimartins avatar maelle avatar

Stargazers

Biopig avatar Camille Leclerc avatar Bruno Mioto avatar Ludmilla Figueiredo avatar Francesco Civita avatar Clemens Schmid avatar Francisco Rodriguez-Sanchez avatar Matthias Grenié avatar Shinya Uryu avatar  avatar Austin Richardson avatar

Watchers

James Cloos avatar Brooke Anderson avatar  avatar Lucas Jardim avatar  avatar  avatar  avatar

Forkers

sckott bdc-proj

rgnparser's Issues

failure behavior

haven't explored how gnparser fails yet and how to catch gracefully, make sure to do so and test

install_gnparser() is broken

rgnparser::install_gnparser(force = TRUE)
The latest gnparser version is v1.6.9
Error in utils::download.file(grep(os, urls, value = TRUE), file, mode = "wb") : 
  'url' must be a length-one character vector

Same error shows up in github workflow "R-check"

install_gnparser() violates CRAN policies

As per email received from CRAN on 2023-09-08:

A recent CRAN submission made us aware that your install_rgnparser()
does

  This function tries to install gnparser to
  \code{Sys.getenv('APPDATA')} on Windows, \verb{~/Library/Application Support} on macOS, and \verb{~/bin/} on other platforms (such as
  Linux). If these directories are not writable, the package directory
  \code{gnparser} of \pkg{rgnparser} will be used. If it still fails,
  you have to install gnparser by yourself and make sure it can be found
  via the environment variable \code{PATH}.

in violation of the CRAN Policy's

Packages should not write in the user’s home filespace (including
clipboards), nor anywhere else on the file system apart from the R
session’s temporary directory (or during installation in the location
pointed to by TMPDIR: and such usage should be cleaned up). Installing
into the system’s R installation (e.g., scripts to its bin directory)
is not allowed.

Limited exceptions may be allowed in interactive sessions if the
package obtains confirmation from the user.

For R version 4.0 or later (hence a version dependency is required or
only conditional use is possible), packages may store user-specific
data, configuration and cache files in their respective user
directories obtained from tools::R_user_dir(), provided that by
default sizes are kept as small as possible and the contents are
actively managed (including removing outdated material).

Please change to comply with the above, and only attempt the current
mechanism with explicit agreement in interactive sessions and an active
user setting otherwise.

Please fix before 2023-09-22 to safely retain your package on CRAN.

Update vignette

The vignette is for an older version of gnparser. It should be rebuilt from the most recent version.

install_gnparser error

rgnparser::install_gnparser(force = FALSE) is returning this error message:

"The latest gnparser version is nightly
Error: invalid version specification ‘nightly’"

The problem is in line 20, version2 <- as.numeric_version(version).

Use a dynamic number of threads instead of 4 for parsing

On the user side there are these two functionsrgnparser::gn_parse() and rgnparser::gn_parse_tidy(). Both call the non-exported functionrgnparser::parse_one() that calls rgnparser::gnparser_cmd() that calls gnparser.

Both exported functions have an argument threads with a default value of 4 and it would make more sense to me if this number was higher.

We could dynamically detect the number of available cores with parallel::detectCores(), I believe it is installed by default with R, and set threads = number of cores - 1.

unable to run “gn_parse_tidy”

During run the “gn_parse_tidy”, Its showing the following error.
Error in sys::exec_internal(find_gnparser(), ...) :
Executing 'C:\Users\DR Gherekhloo\AppData\Roaming\gnparser\gnparser.exe' failed with status 2
df
#> function (x, df1, df2, ncp, log = FALSE)
#> {
#> if (missing(ncp))
#> .Call(C_df, x, df1, df2, log)
#> else .Call(C_dnf, x, df1, df2, ncp, log)
#> }
#> <bytecode: 0x00000000090f84b8>
#> <environment: namespace:stats>

sessionInfo()
R version 4.3.0 beta (2023-04-09 r84208 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

time zone: Asia/Tehran
tzcode source: internal

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] reprex_2.0.2 rWCVP_1.2.4 rgnparser_0.2.6 RcmdrMisc_2.7-2 sandwich_3.0-2
[6] car_3.1-2 carData_3.0-5

loaded via a namespace (and not attached):
[1] DBI_1.1.3 ada_2.0-5 gridExtra_2.3
[4] readxl_1.4.2 rlang_1.1.0 magrittr_2.0.3
[7] e1071_1.7-13 compiler_4.3.0 RSQLite_2.3.1
[10] callr_3.7.3 vctrs_0.6.1 stringr_1.5.0
[13] pkgconfig_2.0.3 fastmap_1.1.1 backports_1.4.1
[16] utf8_1.2.3 rmarkdown_2.21 prodlim_2023.03.31
[19] tzdb_0.3.0 ps_1.7.5 haven_2.5.2
[22] purrr_1.0.1 bit_4.0.5 xfun_0.38
[25] cachem_1.0.7 jsonlite_1.8.4 blob_1.2.4
[28] styler_1.9.1 parallel_4.3.0 cluster_2.1.4
[31] R6_2.5.1 stringi_1.7.12 parallelly_1.35.0
[34] rpart_4.1.19 cellranger_1.1.0 Rcpp_1.0.10
[37] knitr_1.42 future.apply_1.10.0 zoo_1.8-11
[40] R.utils_2.12.2 base64enc_0.1-3 readr_2.1.4
[43] R.cache_0.16.0 Matrix_1.5-4 splines_4.3.0
[46] nnet_7.3-18 tidyselect_1.2.0 yaml_2.3.7
[49] rstudioapi_0.14 abind_1.4-5 codetools_0.2-19
[52] processx_3.8.0 listenv_0.9.0 lattice_0.21-8
[55] tibble_3.2.1 withr_2.5.0 evaluate_0.20
[58] foreign_0.8-84 future_1.32.0 survival_3.5-5
[61] sf_1.0-12 units_0.8-1 proxy_0.4-27
[64] xml2_1.3.3 pillar_1.9.0 KernSmooth_2.23-20
[67] checkmate_2.1.0 nortest_1.0-4 generics_0.1.3
[70] phonics_1.3.10 rWCVPdata_0.3.1 hms_1.1.3
[73] ggplot2_3.4.2 munsell_0.5.0 scales_1.2.1
[76] ff_4.0.9 globals_0.16.2 xtable_1.8-4
[79] class_7.3-21 glue_1.6.2 RecordLinkage_0.4-12.4
[82] clipr_0.8.0 Hmisc_5.0-1 tools_4.3.0
[85] sys_3.4.1 data.table_1.14.8 forcats_1.0.0
[88] fs_1.6.1 grid_4.3.0 tidyr_1.3.0
[91] ipred_0.9-14 colorspace_2.1-0 htmlTable_2.4.1
[94] Formula_1.2-5 cli_3.6.1 evd_2.3-6.1
[97] fansi_1.0.4 lava_1.7.2.1 gt_0.9.0
[100] dplyr_1.1.1 gtable_0.3.3 R.methodsS3_1.8.2
[103] digest_0.6.31 classInt_0.4-9 htmlwidgets_1.6.2
[106] R.oo_1.25.0 memoise_2.0.1 htmltools_0.5.5
[109] lifecycle_1.0.3 bit64_4.0.5 MASS_7.3-58.4

Unable to install gnparser

I am unable to install gnparser using the install_gnparser() function. It is showing the following error.

rgnparser::install_gnparser()
The latest gnparser version is v1.6.9
Error in utils::download.file(grep(os, urls, value = TRUE), file, mode = "wb") : 
  lengths of 'url' and 'destfile' must match

Session Info

R Under development (unstable) (2022-10-11 r83083 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22621)

Matrix products: default

locale:
[1] LC_COLLATE=English_India.utf8  LC_CTYPE=English_India.utf8   
[3] LC_MONETARY=English_India.utf8 LC_NUMERIC=C                  
[5] LC_TIME=English_India.utf8    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] gtable_0.3.1           dplyr_1.0.10           compiler_4.3.0        
 [4] tidyselect_1.2.0       Rcpp_1.0.9             stringr_1.4.1         
 [7] parallel_4.3.0         assertthat_0.2.1       gridExtra_2.3         
[10] scales_1.2.1           proj4_1.0-11           lattice_0.20-45       
[13] ggplot2_3.4.0.9000     R6_2.5.1               plyr_1.8.8            
[16] generics_0.1.3         classInt_0.4-8         sf_1.0-9              
[19] ggrepel_0.9.2          tibble_3.1.8           units_0.8-0           
[22] munsell_0.5.0          DBI_1.1.3              RColorBrewer_1.1-3    
[25] pillar_1.8.1           rlang_1.0.6            rgdal_1.6-2           
[28] utf8_1.2.2             sp_1.5-1               stringi_1.7.8         
[31] cli_3.5.0              magrittr_2.0.3         class_7.3-20.1        
[34] grid_4.3.0             rstudioapi_0.14.0-9000 rJava_1.0-6           
[37] lifecycle_1.0.3        genesysr_1.0.0         vctrs_0.5.1           
[40] KernSmooth_2.23-20     data.table_1.14.6      proxy_0.4-27          
[43] glue_1.6.2             fansi_1.0.3            e1071_1.7-12          
[46] colorspace_2.0-3       reshape2_1.4.4         tools_4.3.0           
[49] pkgconfig_2.0.3  

Release rgnparser 0.3.0

Prepare for release:

  • git pull
  • Check current CRAN check results
  • Polish NEWS
  • urlchecker::url_check()
  • devtools::build_readme()
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • revdepcheck::revdep_check(num_workers = 4)
  • Update cran-comments.md
  • git push
  • Draft blog post

Submit to CRAN:

  • usethis::use_version('minor')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted 🎉
  • Add preemptive link to blog post in pkgdown news menu
  • usethis::use_github_release()
  • usethis::use_dev_version(push = TRUE)
  • Finish blog post
  • Tweet

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.