Skip to content

Commit

Permalink
updated test standards for Dec 2023.
Browse files Browse the repository at this point in the history
  • Loading branch information
jakejh committed Dec 16, 2023
1 parent 292bc93 commit a3a143c
Show file tree
Hide file tree
Showing 27 changed files with 2,464 additions and 2,746 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
@@ -1,6 +1,6 @@
Package: pmparser
Title: Create and Maintain a Relational Database of Data from PubMed/MEDLINE
Version: 1.0.18
Version: 1.0.19
Authors@R: c(person('Jake', 'Hughey', , 'jakejhughey@gmail.com', c('aut', 'cre')),
person('Josh', 'Schoenbachler', , 'josh.schoenbachler@gmail.com', 'aut'),
person('Elliot', 'Outland', , 'ehoutland@gmail.com', 'aut'))
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
@@ -1,3 +1,6 @@
# pmparser 1.0.19
* Updated test standards based on the annual update to PubMed XML files.

# pmparser 1.0.18
* Fixed parsing of CitedMedium within Journal.

Expand Down
6 changes: 3 additions & 3 deletions cran-comments.md
Expand Up @@ -20,14 +20,14 @@
Found the following files/directories:
'lastMiKTeXException'

See results for [Windows](https://builder.r-hub.io/status/pmparser_1.0.18.tar.gz-cbd13e2f1d344d8f96f553da3b359393), [Ubuntu](https://builder.r-hub.io/status/pmparser_1.0.18.tar.gz-76519f3b70664ce1ba180286b009e7dd), and [Fedora](https://builder.r-hub.io/status/pmparser_1.0.18.tar.gz-e946f303031a4590a94f56a3dfdeb086).
See results for [Windows](https://builder.r-hub.io/status/pmparser_1.0.19.tar.gz-da4498bfdbad4e479b5cefc58b318ed9), [Ubuntu](https://builder.r-hub.io/status/pmparser_1.0.19.tar.gz-e3dc23cc69e1479d807cf853cfe1b3af), and [Fedora](https://builder.r-hub.io/status/pmparser_1.0.19.tar.gz-69efe91cf9a94f12bdf7f608674ec198).

### GitHub Actions

0 errors ✓ | 0 warnings ✓ | 0 notes ✓

See results for Mac, Windows, and Ubuntu [here](https://github.com/hugheylab/pmparser/actions/runs/7055886157).
See results for Mac, Windows, and Ubuntu [here]().

## Changes from current CRAN release

* Fixed parsing of CitedMedium within Journal, to work with latest xml2.
* Updated test standards based on the annual update to PubMed XML files.
Binary file modified tests/testthat/parsing_tables/create_parsing_tables_no_suffix.db
Binary file not shown.
Binary file not shown.
Binary file modified tests/testthat/parsing_tables/get_parsing_tables_no_suffix.rds
Binary file not shown.
Binary file modified tests/testthat/parsing_tables/get_parsing_tables_with_suffix.rds
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
@@ -0,0 +1 @@
MD5(pubmed24n1219.xml.gz)= 13ed5d4bc5f0d53fb598567101049c73
8 changes: 4 additions & 4 deletions tests/testthat/pubmed_sample/file_info_postdown.csv
@@ -1,5 +1,5 @@
sub_dir,xml_filename,md5_filename,processed,xml_download,md5_download,md5_computed,md5_provided,md5_match
baseline,pubmed23n1165.xml.gz,pubmed23n1165.xml.gz.md5,,0,0,312c6e844a7f9400b4e7037ed44c5bcd,312c6e844a7f9400b4e7037ed44c5bcd,1
baseline,pubmed23n1166.xml.gz,pubmed23n1166.xml.gz.md5,,0,0,2af827009093bfc5d27b526ff1d37483,2af827009093bfc5d27b526ff1d37483,1
updatefiles,pubmed23n1167.xml.gz,pubmed23n1167.xml.gz.md5,,0,0,e4bdd7b9d7760824b7e95c772e2ff1ad,e4bdd7b9d7760824b7e95c772e2ff1ad,1
updatefiles,pubmed23n1168.xml.gz,pubmed23n1168.xml.gz.md5,,0,0,187bf1823bd2922f4f15919043430773,187bf1823bd2922f4f15919043430773,1
baseline,pubmed24n1218.xml.gz,pubmed24n1218.xml.gz.md5,,0,0,741afb1afce0c9d30fa96f82d9996707,741afb1afce0c9d30fa96f82d9996707,1
baseline,pubmed24n1219.xml.gz,pubmed24n1219.xml.gz.md5,,0,0,13ed5d4bc5f0d53fb598567101049c73,13ed5d4bc5f0d53fb598567101049c73,1
updatefiles,pubmed24n1220.xml.gz,pubmed24n1220.xml.gz.md5,,0,0,6d6ece422cfa3ca16834d4bc6d160368,6d6ece422cfa3ca16834d4bc6d160368,1
updatefiles,pubmed24n1221.xml.gz,pubmed24n1221.xml.gz.md5,,0,0,940659e90acd019ef82bf80bfc938a27,940659e90acd019ef82bf80bfc938a27,1
2,796 changes: 1,228 additions & 1,568 deletions tests/testthat/pubmed_sample/file_info_predown_all.csv

Large diffs are not rendered by default.

2,385 changes: 1,219 additions & 1,166 deletions tests/testthat/pubmed_sample/file_info_predown_baseline.csv

Large diffs are not rendered by default.

Binary file modified tests/testthat/pubmed_sample/open_citation_collection.zip
Binary file not shown.
Binary file modified tests/testthat/pubmed_sample/pmdb_sample_create.db
Binary file not shown.
Binary file modified tests/testthat/pubmed_sample/pmdb_sample_update.db
Binary file not shown.
Binary file removed tests/testthat/pubmed_sample/pubmed23n1166.rds
Binary file not shown.
Binary file removed tests/testthat/pubmed_sample/pubmed23n1167.rds
Binary file not shown.
Binary file added tests/testthat/pubmed_sample/pubmed24n1219.rds
Binary file not shown.
Binary file added tests/testthat/pubmed_sample/pubmed24n1220.rds
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
@@ -0,0 +1 @@
MD5(pubmed24n1220.xml.gz)= 6d6ece422cfa3ca16834d4bc6d160368
3 changes: 2 additions & 1 deletion tests/testthat/test_parse_element.R
Expand Up @@ -2,7 +2,8 @@ foreach::registerDoSEQ()

refDir = 'pubmed_sample'
subDir = 'updatefiles'
fileBase = 'pubmed23n1167' # updatefiles
fileBase = gsub(
'\\.xml\\.gz$', '', dir(file.path(refDir, subDir), '\\.xml\\.gz$'))[1L]

parsedExp = readRDS(file.path(refDir, glue('{fileBase}.rds')))
xmlPath = file.path(refDir, subDir, glue('{fileBase}.xml.gz'))
Expand Down
3 changes: 2 additions & 1 deletion tests/testthat/test_utilities.R
Expand Up @@ -23,7 +23,8 @@ test_that('getMissing', {
dbname = 'pmdb_sample_update.db'
dbtype = 'sqlite'
con = connect(dbtype, file.path(refDir, dbname))
dFile = data.table(xml_filename = c('pubmed23n1167.xml.gz', 'freedom.xml.gz'))
dFile = data.table(xml_filename = c(
dir(file.path(refDir, 'updatefiles'), '\\.gz$'), 'freedom.xml.gz'))
dFailed = getMissing(con = con, tableSuffix = NULL, dFile = dFile)
expect_equal(dFailed, dFile[.N])
})
Expand Down

0 comments on commit a3a143c

Please sign in to comment.