-
-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rdhs: submission for Ropensci #238
Comments
Editor checks:
Editor commentsHello @OJWatson 👋 and many thanks for your submission! So the package passes most of the initial checks apart from the fact the testing suite is failing for me on my machine. Any ideas? I've included relevant outputs of checks and tests below. The main error seems to refer to an Otherwise, there's only a minor goodpractice suggestion flag about long lines in a couple of places. If you could help with debugging the testing failure, I can start looking for reviewers? checkspkg_dir <- "/Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs"
devtools::check(pkg_dir)
#> R CMD check results
#> 1 error | 0 warnings | 1 note
#> checking tests ... ERROR
#> Running ‘testthat.R’
#> Running the tests in ‘tests/testthat.R’ failed.
#> Last 13 lines of output:
#> ══ testthat results ════════════════════════════════════════════════════
#> OK: 35 SKIPPED: 21 FAILED: 19
#> 1. Error: geojson works (@test_api_endpoints.R#60)
#> 2. Error: dhs_countries works (@test_api_endpoints.R#89)
#> 3. Error: dhs_data works (@test_api_endpoints.R#106)
#> 4. Error: dhs_dataUpdates works (@test_api_endpoints.R#132)
#> 5. Error: dhs_datasets works (@test_api_endpoints.R#141)
#> 6. Error: dhs_indicators works (@test_api_endpoints.R#154)
#> 7. Error: dhs_info works (@test_api_endpoints.R#174)
#> 8. Error: dhs_publications works (@test_api_endpoints.R#183)
#> 9. Error: dhs_survey_characteristics works (@test_api_endpoints.R#203)
#> 1. ...
#>
#> Error: testthat unit tests failed
#> Execution halted
#>
#> checking R code for possible problems ... NOTE
#> find_rdhs_config: possible error in tempdir(TRUE): unused argument
#> (TRUE)
#> set_rdhs_config: possible error in tempdir(TRUE): unused argument
#> (TRUE) Created on 2018-07-26 by the reprex package (v0.2.0). testspkg_dir <- "/Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs"
devtools::test(pkg_dir)
#> Loading rdhs
#> Loading required package: testthat
#> Testing rdhs
#> Warning: `encoding` is deprecated; all files now assumed to be UTF-8
#> ✔ | OK F W S | Context
#>
⠏ | 0 | API calls
⠋ | 0 1 | API calls
✔ | 0 1 | API calls
#> ─────────────────────────────────────────────────────────────────────────
#> test_api_calls.R:4: skip: can request api through dhs_api_request via client
#> No authentication available
#> ─────────────────────────────────────────────────────────────────────────
#>
⠏ | 0 | API endpoints
⠋ | 0 1 | API endpoints
⠙ | 0 1 1 | API endpoints
⠹ | 0 2 1 | API endpoints
⠸ | 0 3 1 | API endpoints
⠼ | 0 4 1 | API endpoints
⠴ | 0 5 1 | API endpoints
⠦ | 0 6 1 | API endpoints
⠧ | 0 7 1 | API endpoints
⠇ | 0 8 1 | API endpoints
⠏ | 0 9 1 | API endpoints
⠋ | 0 10 1 | API endpoints
⠙ | 0 11 1 | API endpoints
⠹ | 0 12 1 | API endpoints
✖ | 0 12 1 | API endpoints
#> ─────────────────────────────────────────────────────────────────────────
#> test_api_endpoints.R:8: skip: format catches and al_results tests
#> No authentication available
#>
#> test_api_endpoints.R:60: error: geojson works
#> unused argument (TRUE)
#> 1: dhs_data(countryIds = "SN", surveyYearStart = 2014, breakdown = "subnational",
#> returnGeometry = TRUE, f = "geojson") at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/test_api_endpoints.R:60
#> 2: handle_api_request(endpoint, query, all_results, client, force) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/api_endpoints.R:135
#> 3: check_for_client() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/API.R:27
#> 4: rdhs_setup() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/ui.R:7
#> 5: find_rdhs_config() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/zzz.R:27
#> 6: file.path(tempdir(TRUE), "rdhs/rdhs.json") at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:7
#>
#> test_api_endpoints.R:89: error: dhs_countries works
#> unused argument (TRUE)
#> 1: dhs_countries(countryIds = "SN", surveyYearStart = "2010", all_results = FALSE) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/test_api_endpoints.R:89
#> 2: handle_api_request(endpoint, query, all_results, client, force) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/api_endpoints.R:440
#> 3: check_for_client() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/API.R:27
#> 4: rdhs_setup() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/ui.R:7
#> 5: find_rdhs_config() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/zzz.R:27
#> 6: file.path(tempdir(TRUE), "rdhs/rdhs.json") at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:7
#>
#> test_api_endpoints.R:106: error: dhs_data works
#> unused argument (TRUE)
#> 1: dhs_data(countryIds = "EG", indicatorIds = "FE_FRTR_W_TFR", selectSurveys = "latest",
#> all_results = FALSE) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/test_api_endpoints.R:106
#> 2: handle_api_request(endpoint, query, all_results, client, force) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/api_endpoints.R:135
#> 3: check_for_client() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/API.R:27
#> 4: rdhs_setup() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/ui.R:7
#> 5: find_rdhs_config() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/zzz.R:27
#> 6: file.path(tempdir(TRUE), "rdhs/rdhs.json") at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:7
#>
#> test_api_endpoints.R:132: error: dhs_dataUpdates works
#> unused argument (TRUE)
#> 1: dhs_data_updates(lastUpdate = "20150901", all_results = FALSE) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/test_api_endpoints.R:132
#> 2: handle_api_request(endpoint, query, all_results, client, force) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/api_endpoints.R:1057
#> 3: check_for_client() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/API.R:27
#> 4: rdhs_setup() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/ui.R:7
#> 5: find_rdhs_config() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/zzz.R:27
#> 6: file.path(tempdir(TRUE), "rdhs/rdhs.json") at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:7
#>
#> test_api_endpoints.R:141: error: dhs_datasets works
#> unused argument (TRUE)
#> 1: dhs_datasets(countryIds = "EG", selectSurveys = "latest", surveyYearStart = 2000,
#> surveyYearEnd = 2016, surveyType = "DHS", all_results = FALSE) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/test_api_endpoints.R:141
#> 2: handle_api_request(endpoint, query, all_results, client, force) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/api_endpoints.R:837
#> 3: check_for_client() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/API.R:27
#> 4: rdhs_setup() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/ui.R:7
#> 5: find_rdhs_config() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/zzz.R:27
#> 6: file.path(tempdir(TRUE), "rdhs/rdhs.json") at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:7
#>
#> test_api_endpoints.R:154: error: dhs_indicators works
#> unused argument (TRUE)
#> 1: dhs_indicators(countryIds = "EG", all_results = FALSE, indicatorIds = "FE_FRTR_W_TFR") at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/test_api_endpoints.R:154
#> 2: handle_api_request(endpoint, query, all_results, client, force) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/api_endpoints.R:230
#> 3: check_for_client() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/API.R:27
#> 4: rdhs_setup() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/ui.R:7
#> 5: find_rdhs_config() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/zzz.R:27
#> 6: file.path(tempdir(TRUE), "rdhs/rdhs.json") at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:7
#>
#> test_api_endpoints.R:174: error: dhs_info works
#> unused argument (TRUE)
#> 1: dhs_info(infoType = "version", all_results = FALSE) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/test_api_endpoints.R:174
#> 2: handle_api_request(endpoint, query, all_results, client, force) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/api_endpoints.R:345
#> 3: check_for_client() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/API.R:27
#> 4: rdhs_setup() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/ui.R:7
#> 5: find_rdhs_config() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/zzz.R:27
#> 6: file.path(tempdir(TRUE), "rdhs/rdhs.json") at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:7
#>
#> test_api_endpoints.R:183: error: dhs_publications works
#> unused argument (TRUE)
#> 1: dhs_publications(countryIds = "EG", all_results = FALSE, selectSurveys = "latest") at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/test_api_endpoints.R:183
#> 2: handle_api_request(endpoint, query, all_results, client, force) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/api_endpoints.R:740
#> 3: check_for_client() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/API.R:27
#> 4: rdhs_setup() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/ui.R:7
#> 5: find_rdhs_config() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/zzz.R:27
#> 6: file.path(tempdir(TRUE), "rdhs/rdhs.json") at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:7
#>
#> test_api_endpoints.R:203: error: dhs_survey_characteristics works
#> unused argument (TRUE)
#> 1: dhs_survey_characteristics(countryIds = "EG", surveyYearStart = 2000, surveyYearEnd = 2016,
#> surveyType = "DHS", all_results = FALSE) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/test_api_endpoints.R:203
#> 2: handle_api_request(endpoint, query, all_results, client, force) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/api_endpoints.R:638
#> 3: check_for_client() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/API.R:27
#> 4: rdhs_setup() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/ui.R:7
#> 5: find_rdhs_config() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/zzz.R:27
#> 6: file.path(tempdir(TRUE), "rdhs/rdhs.json") at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:7
#>
#> test_api_endpoints.R:219: error: dhs_surveys works
#> unused argument (TRUE)
#> 1: dhs_surveys(countryIds = "EG", surveyYearStart = 2000, surveyYearEnd = 2016,
#> surveyType = "DHS", all_results = FALSE) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/test_api_endpoints.R:219
#> 2: handle_api_request(endpoint, query, all_results, client, force) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/api_endpoints.R:552
#> 3: check_for_client() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/API.R:27
#> 4: rdhs_setup() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/ui.R:7
#> 5: find_rdhs_config() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/zzz.R:27
#> 6: file.path(tempdir(TRUE), "rdhs/rdhs.json") at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:7
#>
#> test_api_endpoints.R:233: error: dhs_tags works
#> unused argument (TRUE)
#> 1: dhs_tags(indicatorIds = "FE_FRTR_W_TFR", all_results = FALSE) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/test_api_endpoints.R:233
#> 2: handle_api_request(endpoint, query, all_results, client, force) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/api_endpoints.R:1002
#> 3: check_for_client() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/API.R:27
#> 4: rdhs_setup() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/ui.R:7
#> 5: find_rdhs_config() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/zzz.R:27
#> 6: file.path(tempdir(TRUE), "rdhs/rdhs.json") at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:7
#>
#> test_api_endpoints.R:242: error: dhs_uiUpdates works
#> unused argument (TRUE)
#> 1: dhs_ui_updates(lastUpdate = "20150901", all_results = FALSE) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/test_api_endpoints.R:242
#> 2: handle_api_request(endpoint, query, all_results, client, force) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/api_endpoints.R:285
#> 3: check_for_client() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/API.R:27
#> 4: rdhs_setup() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/ui.R:7
#> 5: find_rdhs_config() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/zzz.R:27
#> 6: file.path(tempdir(TRUE), "rdhs/rdhs.json") at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:7
#> ─────────────────────────────────────────────────────────────────────────
#>
#> ══ Terminating early ════════════════════════════════════════════════════
#> Too many failures Created on 2018-07-26 by the reprex package (v0.2.0). goodpracticeChecks for r package development best practice pkg_dir <- "/Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs"
goodpractice::gp(pkg_dir)
#> Preparing: covr
#> Preparing: cyclocomp
#> Installing 5 packages: fansi, openssl, pillar, sp, utf8
#> Preparing: description
#> Preparing: lintr
#> Preparing: namespace
#> Preparing: rcmdcheck
#> ── GP rdhs ────────────────────────────────────────────────────────────────
#>
#> It is good practice to
#>
#> ✖ avoid long code lines, it is bad for readability. Also, many
#> people prefer editor windows that are about 80 characters
#> wide. Try make your lines shorter than 80 characters
#>
#> R/config.R:282:1
#> R/read_dhs_flat.R:113:1
#>
#> ─────────────────────────────────────────────────────────────────────────── Created on 2018-07-26 by the reprex package (v0.2.0). |
Hi @annakrystalli - thank you for checking this through.
Also a lot of the tests skip as you need the login details for the dummy account I've set up with the DHS website. These are stored within Thank you again, OJ |
Thanks for the quick response @OJWatson! So I re-cloned the repo but I'm still getting errors during the tests. I include the output below, with some questions at the end of the comment: checkpkg_dir <- "/Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs"
devtools::check(pkg_dir)
#> R CMD check results
#> 1 error | 0 warnings | 1 note
#> checking tests ... ERROR
#> Running ‘testthat.R’ [16s/486s]
#> Running the tests in ‘tests/testthat.R’ failed.
#> Last 13 lines of output:
#> downloaded 80 KB
#>
#> ══ testthat results ════════════════════════════════════════════════════
#> OK: 64 SKIPPED: 21 FAILED: 8
#> 1. Error: geojson works (@test_api_endpoints.R#60)
#> 2. Error: ETAR71FL.ZIP test (@test_downloads.R#139)
#> 3. Error: ugir41fl.zip test (@test_downloads.R#148)
#> 4. Error: zip file ending test (@test_downloads.R#157)
#> 5. Error: Hierarchal and sas7bdat dataset test (@test_downloads.R#168)
#> 6. Error: Large India Files (@test_downloads.R#214)
#> 7. Error: Odd nesting India (@test_downloads.R#223)
#> 8. Error: surveyId in extract (@test_extraction.R#109)
#>
#> Error: testthat unit tests failed
#> Execution halted
#>
#> checking R code for possible problems ... NOTE
#> tempdir_check: possible error in tempdir(TRUE): unused argument (TRUE) Created on 2018-07-26 by the reprex package (v0.2.0). testpkg_dir <- "/Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs"
devtools::test(pkg_dir)
#> Loading rdhs
#> Loading required package: testthat
#> Testing rdhs
#> Warning: `encoding` is deprecated; all files now assumed to be UTF-8
#> ✔ | OK F W S | Context
#>
⠏ | 0 | API calls
⠋ | 0 1 | API calls
✔ | 0 1 | API calls
#> ─────────────────────────────────────────────────────────────────────────
#> test_api_calls.R:4: skip: can request api through dhs_api_request via client
#> No authentication available
#> ─────────────────────────────────────────────────────────────────────────
#>
⠏ | 0 | API endpoints
⠋ | 0 1 | API endpoints
⠙ | 0 1 1 | API endpoints
⠹ | 1 1 1 | API endpoints
⠸ | 2 1 1 | API endpoints
⠼ | 3 1 1 | API endpoints
⠴ | 4 1 1 | API endpoints
⠦ | 5 1 1 | API endpoints
⠧ | 6 1 1 | API endpoints
⠇ | 7 1 1 | API endpoints
⠏ | 8 1 1 | API endpoints
⠋ | 9 1 1 | API endpoints
⠙ | 10 1 1 | API endpoints
⠹ | 11 1 1 | API endpoints
⠸ | 12 1 1 | API endpoints
⠼ | 13 1 1 | API endpoints
⠴ | 14 1 1 | API endpoints
⠦ | 15 1 1 | API endpoints
⠧ | 16 1 1 | API endpoints
⠇ | 17 1 1 | API endpoints
⠏ | 18 1 1 | API endpoints
⠋ | 19 1 1 | API endpoints
⠙ | 20 1 1 | API endpoints
⠹ | 21 1 1 | API endpoints
⠸ | 22 1 1 | API endpoints
⠼ | 23 1 1 | API endpoints
⠴ | 24 1 1 | API endpoints
⠦ | 25 1 1 | API endpoints
⠧ | 26 1 1 | API endpoints
⠇ | 27 1 1 | API endpoints
⠏ | 28 1 1 | API endpoints
⠋ | 29 1 1 | API endpoints
✖ | 29 1 1 | API endpoints [303.2 s]
#> ─────────────────────────────────────────────────────────────────────────
#> test_api_endpoints.R:8: skip: format catches and al_results tests
#> No authentication available
#>
#> test_api_endpoints.R:60: error: geojson works
#> argument is of length zero
#> 1: dhs_data(countryIds = "SN", surveyYearStart = 2014, breakdown = "subnational",
#> returnGeometry = TRUE, f = "geojson") at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/test_api_endpoints.R:60
#> 2: handle_api_request(endpoint, query, all_results, client, force) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/api_endpoints.R:135
#> 3: api_request(endpoint, query, all_results) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/API.R:48
#> 4: handle_pagination_geojson(endpoint, query, all_results) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/API.R:95
#> ─────────────────────────────────────────────────────────────────────────
#>
⠏ | 0 | Authentication
⠋ | 0 1 | Authentication
⠙ | 0 2 | Authentication
✔ | 0 2 | Authentication
#> ─────────────────────────────────────────────────────────────────────────
#> test_authentication.R:5: skip: authenticate_dhs works
#> No authentication available
#>
#> test_authentication.R:24: skip: available_surveys works
#> No authentication available
#> ─────────────────────────────────────────────────────────────────────────
#>
⠏ | 0 | Client Setup
⠋ | 0 1 | Client Setup
⠙ | 0 2 | Client Setup
✔ | 0 2 | Client Setup
#> ─────────────────────────────────────────────────────────────────────────
#> test_client_set_up.R:5: skip: save credentials
#> No authentication available
#>
#> test_client_set_up.R:30: skip: new updates are recognised
#> No authentication available
#> ─────────────────────────────────────────────────────────────────────────
#>
⠏ | 0 | Downloads
⠋ | 0 1 | Downloads
⠙ | 0 1 1 | Downloads
⠹ | 0 1 1 1 | Downloads
⠸ | 0 1 2 1 | Downloads
⠼ | 0 2 2 1 | Downloads
⠴ | 0 2 3 1 | Downloads
⠦ | 0 3 3 1 | Downloads
⠧ | 0 3 4 1 | Downloads
⠇ | 0 4 4 1 | Downloads
⠏ | 0 4 4 2 | Downloads
⠋ | 0 4 5 2 | Downloads
⠙ | 0 5 5 2 | Downloads
⠹ | 0 5 6 2 | Downloads
⠸ | 0 6 6 2 | Downloads
✖ | 0 6 6 2 | Downloads
#> ─────────────────────────────────────────────────────────────────────────
#> test_downloads.R:4: skip: available surveys and download work
#> No authentication available
#>
#> test_downloads.R:139: warning: ETAR71FL.ZIP test
#> cannot open file 'rdhs.json': No such file or directory
#>
#> test_downloads.R:139: error: ETAR71FL.ZIP test
#> cannot open the connection
#> 1: new_rand_client() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/test_downloads.R:139
#> 2: rdhs::client_dhs(api_key = "ICLSPH-527168", config = read_rdhs_config_file("rdhs.json"),
#> root = td) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/helper_authentication.R:25
#> 3: read_rdhs_config_file("rdhs.json") at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/client.R:18
#> 4: jsonlite::fromJSON(readChar(config_path, fsize), FALSE) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:283
#> 5: readChar(config_path, fsize) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:283
#> 6: file(con, "rb")
#>
#> test_downloads.R:148: warning: ugir41fl.zip test
#> cannot open file 'rdhs.json': No such file or directory
#>
#> test_downloads.R:148: error: ugir41fl.zip test
#> cannot open the connection
#> 1: new_rand_client() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/test_downloads.R:148
#> 2: rdhs::client_dhs(api_key = "ICLSPH-527168", config = read_rdhs_config_file("rdhs.json"),
#> root = td) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/helper_authentication.R:25
#> 3: read_rdhs_config_file("rdhs.json") at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/client.R:18
#> 4: jsonlite::fromJSON(readChar(config_path, fsize), FALSE) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:283
#> 5: readChar(config_path, fsize) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:283
#> 6: file(con, "rb")
#>
#> test_downloads.R:157: warning: zip file ending test
#> cannot open file 'rdhs.json': No such file or directory
#>
#> test_downloads.R:157: error: zip file ending test
#> cannot open the connection
#> 1: new_rand_client() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/test_downloads.R:157
#> 2: rdhs::client_dhs(api_key = "ICLSPH-527168", config = read_rdhs_config_file("rdhs.json"),
#> root = td) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/helper_authentication.R:25
#> 3: read_rdhs_config_file("rdhs.json") at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/client.R:18
#> 4: jsonlite::fromJSON(readChar(config_path, fsize), FALSE) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:283
#> 5: readChar(config_path, fsize) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:283
#> 6: file(con, "rb")
#>
#> test_downloads.R:168: warning: Hierarchal and sas7bdat dataset test
#> cannot open file 'rdhs.json': No such file or directory
#>
#> test_downloads.R:168: error: Hierarchal and sas7bdat dataset test
#> cannot open the connection
#> 1: new_rand_client() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/test_downloads.R:168
#> 2: rdhs::client_dhs(api_key = "ICLSPH-527168", config = read_rdhs_config_file("rdhs.json"),
#> root = td) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/helper_authentication.R:25
#> 3: read_rdhs_config_file("rdhs.json") at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/client.R:18
#> 4: jsonlite::fromJSON(readChar(config_path, fsize), FALSE) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:283
#> 5: readChar(config_path, fsize) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:283
#> 6: file(con, "rb")
#>
#> test_downloads.R:189: skip: Geo dataset test
#> No authentication available
#>
#> test_downloads.R:214: warning: Large India Files
#> cannot open file 'rdhs.json': No such file or directory
#>
#> test_downloads.R:214: error: Large India Files
#> cannot open the connection
#> 1: new_rand_client() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/test_downloads.R:214
#> 2: rdhs::client_dhs(api_key = "ICLSPH-527168", config = read_rdhs_config_file("rdhs.json"),
#> root = td) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/helper_authentication.R:25
#> 3: read_rdhs_config_file("rdhs.json") at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/client.R:18
#> 4: jsonlite::fromJSON(readChar(config_path, fsize), FALSE) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:283
#> 5: readChar(config_path, fsize) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:283
#> 6: file(con, "rb")
#>
#> test_downloads.R:223: warning: Odd nesting India
#> cannot open file 'rdhs.json': No such file or directory
#>
#> test_downloads.R:223: error: Odd nesting India
#> cannot open the connection
#> 1: new_rand_client() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/test_downloads.R:223
#> 2: rdhs::client_dhs(api_key = "ICLSPH-527168", config = read_rdhs_config_file("rdhs.json"),
#> root = td) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/helper_authentication.R:25
#> 3: read_rdhs_config_file("rdhs.json") at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/client.R:18
#> 4: jsonlite::fromJSON(readChar(config_path, fsize), FALSE) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:283
#> 5: readChar(config_path, fsize) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:283
#> 6: file(con, "rb")
#> ─────────────────────────────────────────────────────────────────────────
#>
⠏ | 0 | Extraction
⠋ | 0 1 | Extraction
⠙ | 0 1 1 | Extraction
⠹ | 0 1 1 1 | Extraction
⠸ | 0 1 1 2 | Extraction
✖ | 0 1 1 2 | Extraction
#> ─────────────────────────────────────────────────────────────────────────
#> test_extraction.R:5: skip: query codes having downloaded surveys
#> No authentication available
#>
#> test_extraction.R:109: warning: surveyId in extract
#> cannot open file 'rdhs.json': No such file or directory
#>
#> test_extraction.R:109: error: surveyId in extract
#> cannot open the connection
#> 1: new_rand_client() at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/test_extraction.R:109
#> 2: rdhs::client_dhs(api_key = "ICLSPH-527168", config = read_rdhs_config_file("rdhs.json"),
#> root = td) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/helper_authentication.R:25
#> 3: read_rdhs_config_file("rdhs.json") at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/client.R:18
#> 4: jsonlite::fromJSON(readChar(config_path, fsize), FALSE) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:283
#> 5: readChar(config_path, fsize) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:283
#> 6: file(con, "rb")
#>
#> test_extraction.R:125: skip: rbind_labelled
#> No authentication available
#> ─────────────────────────────────────────────────────────────────────────
#>
⠏ | 0 | Miscellaneous utils
⠋ | 1 | Miscellaneous utils
⠙ | 2 | Miscellaneous utils
⠹ | 3 | Miscellaneous utils
⠸ | 4 | Miscellaneous utils
⠼ | 5 | Miscellaneous utils
⠴ | 6 | Miscellaneous utils
⠦ | 7 | Miscellaneous utils
⠧ | 8 | Miscellaneous utils
⠇ | 8 1 | Miscellaneous utils
⠏ | 9 1 | Miscellaneous utils
⠋ | 9 1 1 | Miscellaneous utils
⠙ | 10 1 1 | Miscellaneous utils
✔ | 10 1 1 | Miscellaneous utils [0.1 s]
#> ─────────────────────────────────────────────────────────────────────────
#> test_miscellaneous.R:38: skip: slow api response
#> No authentication available
#>
#> test_miscellaneous.R:64: warning: different locales
#> OS reports request to set locale to "French_Belgium.1252" cannot be honored
#> ─────────────────────────────────────────────────────────────────────────
#>
⠏ | 0 | Parse datasets
⠋ | 1 | Parse datasets
⠙ | 2 | Parse datasets
⠹ | 3 | Parse datasets
⠸ | 4 | Parse datasets
⠼ | 5 | Parse datasets
⠴ | 6 | Parse datasets
⠦ | 7 | Parse datasets
⠧ | 8 | Parse datasets
⠇ | 9 | Parse datasets
⠏ | 10 | Parse datasets
⠋ | 11 | Parse datasets
⠙ | 12 | Parse datasets
⠹ | 13 | Parse datasets
⠸ | 14 | Parse datasets
⠼ | 15 | Parse datasets
⠴ | 16 | Parse datasets
⠦ | 17 | Parse datasets
⠧ | 17 1 | Parse datasets
✔ | 17 1 | Parse datasets [6.9 s]
#> ─────────────────────────────────────────────────────────────────────────
#> test_read_dhs_flat.R:75: skip: lower case flat file check
#> No authentication available
#> ─────────────────────────────────────────────────────────────────────────
#>
⠏ | 0 | user interface
⠋ | 0 1 | user interface
⠙ | 0 2 | user interface
⠹ | 0 3 | user interface
⠸ | 0 4 | user interface
⠼ | 0 5 | user interface
⠴ | 0 6 | user interface
⠦ | 0 7 | user interface
⠧ | 0 8 | user interface
⠇ | 0 9 | user interface
✔ | 0 9 | user interface
#> ─────────────────────────────────────────────────────────────────────────
#> test_ui.R:4: skip: check_for_client
#> No authentication available
#>
#> test_ui.R:37: skip: check on the use of the default client for API caching in extract
#> No authentication available
#>
#> test_ui.R:67: skip: get_datasets with no temp first
#> No authentication available
#>
#> test_ui.R:97: skip: get_model_datasets
#> No authentication available
#>
#> test_ui.R:107: skip: get_downloaded_datasets
#> No authentication available
#>
#> test_ui.R:118: skip: get_available_datasets
#> No authentication available
#>
#> test_ui.R:128: skip: search_and_extract_dhs
#> No authentication available
#>
#> test_ui.R:146: skip: get_variable_labels
#> No authentication available
#>
#> test_ui.R:168: skip: get_variable_labels direct via client
#> No authentication available
#> ─────────────────────────────────────────────────────────────────────────
#>
#> ══ Results ══════════════════════════════════════════════════════════════
#> Duration: 310.6 s
#>
#> OK: 56
#> Failed: 8
#> Warnings: 8
#> Skipped: 21 Created on 2018-07-26 by the reprex package (v0.2.0). questions
|
Thank you for the reply @annakrystalli and sorry about these failing tests.
Thank you again for this and sorry about the tests, OJ |
Hi OJ, OK thanks for the clarification, that all makes more sense now but yeah I think a short vignette would be really useful. Do you think you get something sorted soonish for the reviewers to have a look at? Re: the tests, no worries, that's what the review process is all about, ironing out the kinks! :) Regarding:
I was wondering if maybe this sort of failure could be handled more explicitly, ie by throwing an informative error regarding why it failed? Otherwise, I'm happy to start seeking reviewers if you are? |
Hi,
And yep happy for reviewers. Thank you again for all the help, OJ |
Good news @OJWatson, we have reviewers! 🎉 Reviewers: @dosgillespie |
Hi, @OJWatson I have one small remark: the NEWS could be more concise, more shorter bullet points grouped according to new function / bug fix etc would make it easier to skim through it. You may consider getting ideas from http://style.tidyverse.org/news.html. FYI I won't be reviewing the package as discussed with Anna. |
Hi, Thanks for this @czeildi - have never written a NEWS section before, and reading it back I have definitely waffled. I'll trim and tidy it up in line with the style guide you've linked. Many thanks, OJ |
Hi @OJWatson, just to keep you up to date, I have been trying to find a new reviewer, hoping it wouldn't take too long but alas, it has. I'm still on the case but as I'm still on the case I will return the status of the review to seeking reviewers. I'll also reset the deadline for review when a new reviewer has been found. Sorry about this! If you have any suggestions for a reviewer let me know! |
Great news! We finally have two reviewers again! 🎉 Reviewers: @dosgillespie @LucyMcGowan |
Yay! Thanks very much for finding someone so quickly @annakrystalli, and thank you to @LucyMcGowan and @dosgillespie for reviewing. I've also updated/tidied the NEWS in keeping more with the tidyverse style guide. |
Package Review
DocumentationThe package includes all the following forms of documentation:
Functionality
Final approval (post-review)
Estimated hours spent reviewing: 2.5 Review CommentsSummaryThe rdhs package facilitates querying the Demographic and Health Survey API and makes downloading and interacting with the raw datasets a smoother, more reproducible process. This looks great! A few things:
Would you consider having an additional skip condition for this circumstance?
This seems like you're showing lots of different ways to run this function, but what each one does is not explained. I would maybe include far fewer lines (maybe just the ones you think would be the most common) along with comments to explain what output is expected (this applies to a lot of the functions, I'm just showing the one here).
You may consider adding this to the .gitignore for the user? For example httr does this with an
|
Hi there @LucyMcGowan, Thank you so much for the review, especially with your 👶 due so soon. Hope everything goes well. I will respond fully by the end of today, with my changes but I agree with everything that you have suggested, in particular making sure everything has an example and then shortening the examples that the API functions run to just one function call. Thank you again, OJ |
Due date: |
Nearly finished - some of the examples have proven more tricky to write so that they run due to auth issues etc, but am nearly there. |
Hi @LucyMcGowan, Finally got there with the examples. So working through the comments.
The other tests that require a login, however, will still require people to follow the testing vignette here
With regards to the examples for the API functions, the long list of examples that you included for
I have, however, put these examples within
I think that's everything. I've also made a few changes outside these comments, which clear up some of the issues that were outstanding and have added another example of how to use the "geojson" return type from API requests to build maps, shown here Thank you again for the kind words about the package and for the comments and the suggestions. Definitely helped increase the usability of the package and thanks for linking the All the best, OJ |
Hi @OJWatson, thanks for your swift response to @LucyMcGowan 's comments (and thanks @LucyMcGowan for them and your contributions, hope all is going well!). The package and documentation are really shaping up really nicely. Re (5)
Thoughts? |
Hey, Thanks for taking the time to go through this issue so thoroughly. I have been able to replicate the issue using the We will be moving towards using Re: Thanks again for all the help, OJ |
OK, back with you. So I pulled your changes and ran the tests. Getting a new failure and a couple of warnings (edited down): devtools::test("/Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs")
#> Loading rdhs
#> Loading required package: testthat
#> Testing rdhs
───────────────────────────────────────────────────────────────────────────────────
⠏ | 0 | Miscellaneous utils
⠋ | 1 | Miscellaneous utils
⠙ | 2 | Miscellaneous utils
⠹ | 3 | Miscellaneous utils
⠸ | 4 | Miscellaneous utils
⠼ | 5 | Miscellaneous utils
⠴ | 6 | Miscellaneous utils
⠦ | 7 | Miscellaneous utils
⠧ | 8 | Miscellaneous utils
⠇ | 8 1 | Miscellaneous utils
⠏ | 9 1 | Miscellaneous utils
⠋ | 9 1 1 | Miscellaneous utils
⠙ | 10 1 1 | Miscellaneous utils
⠹ | 10 1 2 | Miscellaneous utils
⠸ | 10 1 3 | Miscellaneous utils
⠼ | 10 2 3 | Miscellaneous utils
⠴ | 10 1 2 3 | Miscellaneous utils
✖ | 10 1 2 3 | Miscellaneous utils 1. The warning re: locale again:#> test_miscellaneous.R:64: warning: different locales
#> OS reports request to set locale to "French_Belgium.1252" cannot be honored I had a little play around with this and Im not sure whether it's testing what you want it to? ie on my system it fails to set the locale during testing (indeed it doesn't change the locale even if I run 2. Warning re: object 'model_datasets'#> test_miscellaneous.R:114: warning: model datasets onAttach
#> object 'model_datasets' not found I should note however that I don't get these warnings when running 3.Error : looks like another one requiring credentials that needs to be skipped#> test_miscellaneous.R:115: error: model datasets onAttach
#> Login credentials for the DHS website have not been found.Please uset set_dhs_config() and provide your DHS email and project.
#> 1: rdhs::get_datasets("MWAR7ASV.ZIP") at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/tests/testthat/test_miscellaneous.R:115
#> 2: client$get_datasets(dataset_filenames, download_option = download_option, reformat = reformat,
#> all_lower = all_lower, output_dir_root = output_dir_root, clear_cache = clear_cache,
#> ...) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/ui.R:128
#> 3: handle_config(private$config$config_path) at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/client.R:345
#> 4: stop("Login credentials for the DHS website have not been found.", "Please uset set_dhs_config() and provide your DHS email and project.") at /Users/Anna/Documents/workflows/rOpenSci/editorials/rdhs/R/config.R:35
#> ══ Results ════════════════════════════════════════════════════════════════════════
#> Duration: 46.8 s
#>
#> OK: 59
#> Failed: 1
#> Warnings: 2
#> Skipped: 29 Created on 2018-11-29 by the reprex package (v0.2.0). |
Hi again, and sorry for the new errors :( 1. re: localeSome users' OS may have different locale environment variable
The above, however, I was only able to do on my windows machine, and on my linux machine I get the same 2 & 3:These both refer to a test I added recently, which was to address an issue where I had a forgotten to make I've just pushed these changes now into the master branch as well, so hopefully 🤞 these tests should then be handled okay now (famous last words) Thanks again for everything, OJ |
...indeed! 😜 So, I asked for some advice from the rest of the editors and they hit up against another error when running the tests for the first time:
Somehow I don't get this error, not sure why because I haven't set up credentials and test_that("post api tidy", {
if (file.exists("rdhs.json")) {
conf <- read_rdhs_config_file("rdhs.json")
} else {
expect_true(TRUE)
}
if (is.null(conf$email)){
expect_true(file.remove("rdhs.json"))
}
}) Feels like
shouldn't run if Interestingly, the secomd time they ran the tests, this error didn't turn up! Does the initial run create and cache a |
BTW... just pulled and ran |
I'll be back tomorrow morning to do another quick pass and hopefully get everything approved! 😃 |
Wooop! Okay and yes the above makes sense. The API tests in However, the following should have been inside the first
However, I am a little confused though how they would have gotten to that test without creating an |
Hey OJ, Just been having a final review and look around the package, I made a small PR with some minor edits to the README, have a look and let me know what you think. There's only one last point I want to raise. In Otherwise, I think we are good to 🚀 😃 |
Hi, Completely agree - I have moved the actual string to be an internal package data object, and have removed all occurrences of it being written down explicitly in the code (although it is still in old commits). Thanks again for everything, OJ |
Approved! 🙌 You're a 🌟. Excellent work on this @OJWatson! We're finally there 😃 Thanks for submitting and thanks @LucyMcGowan & @dosgillespie for your reviews! To-dos:
For JOSS submissionOnce admin rights have been returned:
Should you want to awknowledge your reviewers in your package DESCRIPTION, you can do so by making them Welcome aboard! We'd also love a blog post about your package, either a short-form intro to it (https://ropensci.org/tech-notes/) or long-form post with more narrative about its development. (https://ropensci.org/blog/). If you are interested, @stefaniebutland will be in touch about content and timing. We've started putting together a gitbook with our best practice and tips, this chapter starts the 3d section that's about guidance for after onboarding. Please tell us what could be improved, the corresponding repo is here. Finally, if you're planning to submit to CRAN, have a look at the section about CRAN gotchas in the onboarding guide. And feel free to reach out if you need help through the process. Well done again @OJWatson 👍 |
Yay! 🎉 - Thank you so much @annakrystalli for the help in these last stages. I've just transferred the repo over and will start addressing the links etc. Thank you again to @LucyMcGowan and @dosgillespie for taking the time to review it. I would love to acknowledge both of you as reviewers in the DESCRIPTION if that is okay with both of you? Please let me know if that's okay, and also if you would like me to link your ORCID profile if you have one/would like it linked. Also just wanted to say how helpful and nice the whole process has been. I've learnt loads and have picked up a number of really useful things during the review cycle. It's a really great initiative so thanks again to everyone. |
Also @stefaniebutland - I'm definitely keen to write a blog post. Haven't quite decided what form but should be able to mock something up in the next week or so if that's okay? |
😱Somehow I managed to miss asking you to add the rOpenSci review status badge to the README! 🤦♀️. Could I get you to add it now please? 🙏
In other news, admin rights have now been returned! Just ping me when you've submitted to JOSS so I can tag it as reviewed here. |
Hi again, Have added the banner. Sorry for delay - had it sitting in the patching branch. Also do you know how to get github to stop declaring the package's main code language as html? It keeps picking up the files in the Many thanks again, OJ |
Hi OJ, my guess (without digging into the history) is that the addition of the |
👍 - thank you. think it was both the deleting and the |
That's great to hear @OJWatson. This link will give you many examples of blog posts by authors of peer-reviewed packages so you can get an idea of the style and length you prefer: https://ropensci.org/tags/software-peer-review/. Here are some technical and editorial guidelines for contributing a blog post: https://github.com/ropensci/roweb2#contributing-a-blog-post. Happy to answer any questions. |
Hey @OJWatson! 👋 Any chance you could update the post-review checklist above so I can see where we are at? 🙏 |
Hi, Apologies for missing that!: To-dos:
For JOSS submissionOnce admin rights have been returned:
^ I'm not planning on submitting to JOSS. Sorry about missing that again - let me know if there is anything else, OJ |
Great thanks for that @OJWatson ! OK so last thing is to just add the rOpenSci badge to the README. (Sorry, this should have been done ages ago but I missed it)
Just ping when it's done and I'll close the issue 🙌😃 |
Sorry - that's my bad. I got confused between the footer and the badge. I've now added the badge to the readme. |
All good! I thought as much 😉 Well done again 💯 |
Hi @OJWatson. I'm following up to see if you'd still like to contribute a blog post and to agree on a submission/publication date. I'll be on vacation Dec 24 - Jan 1, so I could review a draft this week if submitted by Fri Dec 21, 9am Pacific, or review in the new year. If you are still interested, please date your post 2019-01-03 and we can modify that once it's ready. This link will give you many examples of blog posts by authors of peer-reviewed packages so you can get an idea of the style and length you prefer: https://ropensci.org/tags/software-peer-review/. Here are some technical and editorial guidelines for contributing a blog post: https://github.com/ropensci/roweb2#contributing-a-blog-post. Happy to answer any questions. |
Happy New Year @OJWatson. If you are still interested in writing a post about |
Hi,
I am still keen to write a post about rdhs. Was hoping to do it over the holidays but had a paper bounce back just before so have been working on that. Am hoping to get to it in the following week though.
Thanks again,
OJ
From: Stefanie Butland
Sent: Friday 4 January, 21:40
Subject: Re: [ropensci/software-review] rdhs: submission for Ropensci (#238)
To: ropensci/software-review
Cc: Watson, Oliver, Mention
Happy New Year @OJWatson<https://github.com/OJWatson>. If you are still interested in writing a post about rdhs, I'm still interested in helping you get more eyes on your work 🙂. Please let me know at any time and we can establish a publication date that works for you.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#238 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AOiwndsdFHWvsmjhR1gqA_SAQuhfqRQVks5u_8o5gaJpZM4VYn2Z>.
|
Summary
It interacts with the Demographic and Health Survey (DHS) Program API (https://api.dhsprogram.com), and provides tools to use the API to ease identifying, downloading, loading and analysing the raw survey data collected by the DHS.
https://github.com/OJWatson/rdhs
Please indicate which category or categories from our package fit policies this package falls under *and why(? (e.g., data retrieval, reproducibility. If you are unsure, we suggest you make a pre-submission inquiry.):
Who is the target audience and what are scientific applications of this package?
Global Health Researchers and Policy makers. The DHS data has been used in well over 20,000 academic studies (based on google scholar search for "DHS" AND "demographic and health survey") that have helped shape progress towards targets such as the Sustainable Development Goals and inform health policy such as detailing trends in child mortality and characterising the distribution and use of insecticide-treated bed nets in Africa. The package will help assist researchers who use R for these purposes rather than/don't have access to stata/sas (these datasets are the published datasets by the DHS program), as well as serve to simplify commonly required analytical pipelines. The end result aims to increase the end user accessibility to the raw data and create a tool that supports reproducible global health research.
yours differ or meet our criteria for best-in-category?
There are a number of other R pacakges that work with DHS data in various ways. A quick search of github for "DHS" and R shows 39 repos, however the majority are small custom scripts.
1 repo looks just at interacting with the DHS API, but it hasn't been added to for almost a year, and the API endpoint functions do not cover all the endpoints available nor allow you to query each endpoint by all the possible query terms. It also requires the user to know query terms rather than having them as arguments.
1 repo also looks at downloading the survey datasets from the website (and it was used initially when designing these fucntions with rdhs). However, it skips over large dataset files, has some bugs depending on the character length of your login credentials, and does not allow you to read in all the datasets available from the website. [ FYI: we don't read in .sas7bdat (we are writing a parser for the oddly formed catalog files provided by the DHS website for these) or hierarchal dataset files as we have a parser for the flat equivalent of hierarchal dataset. In theory each file format should be the same data, so having one parser that works is sufficient, but we have found that the flat and spss data formats have the most complete meta data for the data variable labels).
There are then a few repos that do bespoke pieces of analysis (2 of which are on CRAN) looking at spatial analysis and calculating survey statistics. We are hoping to bring these onboard, either by wrapping them to use the output of our downloaded harmonised datasets, or by writing additional tools for downstream analysis (see TODO.md).
Requirements
Confirm each of the following by checking the box. This package:
Publication options
paper.md
matching JOSS's requirements with a high-level description in the package root or ininst/
.Detail
R CMD check
(ordevtools::check()
) succeed? Paste and describe any errors or warnings:Yes:
Does the package conform to rOpenSci packaging guidelines? Please describe any exceptions:
If this is a resubmission following rejection, please explain the change in circumstances:
If possible, please provide recommendations of reviewers - those with experience with similar packages and/or likely users of your package - and their GitHub user names:
The text was updated successfully, but these errors were encountered: