Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

r 4.0 (r-devel) changes #192

Closed
wants to merge 54 commits into from
Closed

Conversation

patrickmdnet
Copy link
Collaborator

@patrickmdnet patrickmdnet commented Mar 2, 2020

The r40 branch has a number of changes designed to get the travis r-devel build check to pass.

  • Includes everything in pull Fix download_all_icd_data problems #191.
  • fixes a local problem I found where .dl_icd10who_json(2008, "fr", "JsonGetRootConcepts?useHtml=false") was not handling utf-8 properly
  • removes stringsAsFactors argument entirely from van_walraven routines

On Windows, the following errors are reported due to trying to save the file "WHO.2016.en.JsonGetRootConcepts?useHtml=false.json".  The ? is not a valid character on Windows.

````
Getting WHO data with JSON: https://icd.who.int/browse10/2016/en/JsonGetRootConcepts?useHtml=false
Saving memoised data for  2016 en JsonGetRootConcepts?useHtml=false in C:\Users\user\AppData\Local\icd\icd/memoise/WHO.2016.en.JsonGetRootConcepts?useHtml=false.json
Error in gzfile(file, mode) : cannot open the connection
In addition: Warning message:
In gzfile(file, mode) :
  cannot open compressed file 'C:\Users\user\AppData\Local\icd\icd/memoise/WHO.2016.en.JsonGetRootConcepts?useHtml=false.json', probable reason 'Invalid argument'
````
On Windows at least (and maybe other OSes) the `data-raw` directory is not included in the package unless it is moved into the `inst` directory.
icd10be files are not included in data-raw so they should be pulled from the cache directory
The call `.dl_icd10who_json(2008, "fr", "JsonGetRootConcepts?useHtml=false")` was returning malformed text that had not been reencoded properly.  For example "Autres infections intestinales bactériennes".
stringsAsFactors is being deprecated generally.  The code here is causing test-score.R#333 to fail on R-devel because the id column is not a factor.  See https://developer.r-project.org/Blog/public/2020/02/16/stringsasfactors/
On r-devel the check for this example is failing with "could not find function "categorize_simple""
@patrickmdnet
Copy link
Collaborator Author

Travis CI and appveyor are now green.

I reverted the stringsAsFactors code changes in score.R as they were not necessary. Instead I change the test to work properly when options(stringsAsFactors=FALSE). Note that in the 4.0 build options(stringsAsFactors=FALSE), so that's the only 4.0 change that this pull addresses.

@jackwasey
Copy link
Owner

This is really great. Thanks for working on this. I'm just doing a small update required by CRAN, then will look to merge this.

CIM-10-FR adds U071: Maladie à coronavirus 2019 [COVID-19]
The call `.dl_icd10who_json(2008, "fr", "JsonGetRootConcepts?useHtml=false")` was returning malformed text that had not been reencoded properly.  For example "Autres infections intestinales bactériennes".
stringsAsFactors is being deprecated generally.  The code here is causing test-score.R#333 to fail on R-devel because the id column is not a factor.  See https://developer.r-project.org/Blog/public/2020/02/16/stringsasfactors/
On r-devel the check for this example is failing with "could not find function "categorize_simple""
CIM-10-FR adds U071: Maladie à coronavirus 2019 [COVID-19]
patrickmdnet and others added 25 commits March 13, 2020 02:41
The call `.dl_icd10who_json(2008, "fr", "JsonGetRootConcepts?useHtml=false")` was returning malformed text that had not been reencoded properly.  For example "Autres infections intestinales bactériennes".
stringsAsFactors is being deprecated generally.  The code here is causing test-score.R#333 to fail on R-devel because the id column is not a factor.  See https://developer.r-project.org/Blog/public/2020/02/16/stringsasfactors/
On r-devel the check for this example is failing with "could not find function "categorize_simple""
CIM-10-FR adds U071: Maladie à coronavirus 2019 [COVID-19]
stringsAsFactors is being deprecated generally.  The code here is causing test-score.R#333 to fail on R-devel because the id column is not a factor.  See https://developer.r-project.org/Blog/public/2020/02/16/stringsasfactors/
avoid "WARNING 'qpdf' is needed for checks on size reduction of PDFs"
… new roxyen

travis and build tweaks

add sets of environment variable definitions for bash and makevars, and enable in travis

add R_REMOTES_STANDALONE=true to fix appveyor curl error

See https://github.com/r-lib/remotes#standalone-mode and krlmlr/r-appveyor#135

add qpdf

avoid "WARNING 'qpdf' is needed for checks on size reduction of PDFs"
@jackwasey
Copy link
Owner

fixed v4.0.8 (now submitted to CRAN) with d868b3f with help from this pull request

@jackwasey jackwasey closed this May 1, 2020
jackwasey pushed a commit that referenced this pull request May 26, 2020
Thanks to @patrickmdnet, actually fix part about UTF-8 decoding of French WHO data a8b4a73
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants