From 8c2073e3b71d592314fe706b10ef221286b08fe8 Mon Sep 17 00:00:00 2001 From: shug0131 Date: Wed, 7 Aug 2024 13:57:17 +0100 Subject: [PATCH 1/5] cran submission --- CRAN-SUBMISSION | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION index 39eb669..90f3fa6 100644 --- a/CRAN-SUBMISSION +++ b/CRAN-SUBMISSION @@ -1,3 +1,3 @@ -Version: 1.0.0 -Date: 2024-03-14 14:27:52 UTC -SHA: 2842a2968d67bbc76287cc5cb59432332cc5f061 +Version: 1.0.1 +Date: 2024-08-07 12:17:08 UTC +SHA: 1bce974b33d271f6f490cac80f6c6257e9edf904 From a8a41bbf17e0164b2a2d8b1b830e417cf7329c3b Mon Sep 17 00:00:00 2001 From: shug0131 Date: Mon, 13 Jan 2025 13:45:56 +0000 Subject: [PATCH 2/5] evading the windows bug --- DESCRIPTION | 4 ++-- NEWS.md | 6 ++++++ R/clintrials_gov_convert.R | 2 +- R/eudract_convert.R | 2 +- build_dashboard.R | 3 ++- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 740e8ee..56b20d7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: eudract Type: Package Title: Creates Safety Results Summary in XML to Upload to EudraCT, or ClinicalTrials.gov -Date: 2024-08-07 -Version: 1.0.1 +Date: 2025-01-13 +Version: 1.0.2 Authors@R: c( person("Simon", "Bond", email="simon.bond7@nhs.net", role="cre"), person("Beatrice","Pantaleo", email="bp403@medschl.cam.ac.uk", role="aut")) diff --git a/NEWS.md b/NEWS.md index 8770051..c39cbac 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,9 @@ +# eudract 1.0.2 + +Evading a windows bug whereby a call to xml2::xml_validate() crashes the system. +The checks are not run if the OS is windows. + + # eudract 1.0.1 Fixing a bug when a relative_risk object was passed into dot_plot and the reference diff --git a/R/clintrials_gov_convert.R b/R/clintrials_gov_convert.R index f9a8d64..320949a 100644 --- a/R/clintrials_gov_convert.R +++ b/R/clintrials_gov_convert.R @@ -60,7 +60,7 @@ clintrials_gov_convert <- function(input, original, output, message(paste0("'",output, "' is created or modified\n")) #check against the output schema - check_out <- xml2::xml_validate(safety, schema_results) + check_out <- ( Sys.info()["sysname"]=="Windows") || xml2::xml_validate(safety, schema_results) if( !check_out){ warning(attr(check_out,"errors"))} check_out <- xml2::xml_validate(original, schema_output) if( !check_out){ warning(attr(check_out,"errors"))} diff --git a/R/eudract_convert.R b/R/eudract_convert.R index ee9b704..904b82f 100644 --- a/R/eudract_convert.R +++ b/R/eudract_convert.R @@ -29,7 +29,7 @@ eudract_convert <- function(input, output, xml2::write_xml(output_xml, output) message(paste0("'",output, "' is created or modified\n")) #check against the output schema - check_out <- xml2::xml_validate(output_xml, schema_output) + check_out <- ( Sys.info()["sysname"]=="Windows") || xml2::xml_validate(output_xml, schema_output) if( !check_out){ warning(attr(check_out,"errors"))} message("Please email cuh.cctu@nhs.net to tell us if you have successfully uploaded a study to EudraCT.\nThis is to allow us to measure the impact of this tool.") invisible(check_out) diff --git a/build_dashboard.R b/build_dashboard.R index a2768f5..0b48eba 100644 --- a/build_dashboard.R +++ b/build_dashboard.R @@ -4,7 +4,8 @@ devtools::load_all() ?devtools::build_vignettes(clean=FALSE) devtools::clean_vignettes() -devtools::check() +devtoolss::install_deps(dependencies=TRUE) +devtools::check(remote=TRUE, manual=TRUE) #.libPaths("U:/My Documents/R/win-library/4.1") From e589a3d8bda04d4f0f3c58284344e54044251ccb Mon Sep 17 00:00:00 2001 From: shug0131 Date: Mon, 13 Jan 2025 13:56:09 +0000 Subject: [PATCH 3/5] update the test snapshots --- tests/testthat/Rplots.pdf | Bin 7828 -> 7826 bytes .../_snaps/dotplot/dotplot-3groups.svg | 56 ++++++++++++++---- .../_snaps/dotplot/dotplot-ref-rr.svg | 44 ++++++++++---- tests/testthat/_snaps/dotplot/dotplot-ref.svg | 44 ++++++++++---- tests/testthat/_snaps/dotplot/dotplot.svg | 44 ++++++++++---- 5 files changed, 148 insertions(+), 40 deletions(-) diff --git a/tests/testthat/Rplots.pdf b/tests/testthat/Rplots.pdf index f6b85ec048ced81bf1b2651ad322810cd41fc02a..279afb2f7de0fd5c76389f47f31a8c2e5520a943 100644 GIT binary patch delta 3713 zcmeIz*;mpD8wYTACNd!s0~M1}Getub!L7yIj%DtXX{DxCQW9-sSpLx5GE51s6qTJ%*-TJC~OU=`r1G>#SU&{NPuPL@#6g>Sf zTLgzTd2d+0mwAA^c&-k}ZyF~heC#Ryd}h#d(&cNn z{qA{eN~;H(pX}};jPhhhvpDwpRv%g{HCiy|v`x&A_%7Dh__yFIE|*~&W3)G1?X8Ao zF#ASgZfBYy-0gF#JC1yhwfQ39d75l&UR+)&;TL*E&5y{nnaE?eyo@YobAFMSz3F!!1+Wbvt zt)8&8Ankc}JJ5$Sd|O59Y4Z`@%1X2K9n z1aA*X)d>Rm=QKKx4oTpQ6k+Ld6i;xAU<+Rm72ua-@1URI+dhzYRuqG99B-E*2{))Q&$Q?(TcoFlgp%DTLC?b8j z*S5lM__gD5h29Ksta2zD*{DuO3MV33D5|B5;DA841{G`}+w4WvpIQ`ui&3dJcFQhJ znxE2z!tV1w_FQ?KcS@_+@Hiv2^reOXhH-71xF8MQkhzki4;ncM9DQcw-y);!f{cgl z=B1v|bwiqIe5&WSsSK)#y^A(WnVJu;K1M;ti6Vm5c-VUAKPP#=!=le9?Oxec$4fWo zrWBAY)gzAlnE{>h?Vu{o_#8axfu$+sa01fF|QDQ|B{_Q0RVk?@M3g)f-27Yml!WwKqH8nbAVD3kG{+g6iVwQpRqO z{$$XI1F<_gJF&ZL)D(%t<37$sG$N4V;+ZhV8M>j&PdDX2EaF!Nz7<{QmNTEV=`-T+ zf6CITKVrF>7k5rd!}H%qzc=_pS%9`rrE$l0B+Uaq76Os+7{4?bx*q{TdpM})m_GN; z@ckt9NGAgsvc(Z|jrv|q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`o#w~erq}8at||Pj z=Fr57`l#{2RYqWurM^3)cA+164Gxq4GBk!o@kyPxbP&qmjgX$L{tcCeudJ_o>||op z8PE2{?DDqD+b(aryzTO~%iI4MZ%ul#Scrug9QmII4~2vO9+1W;wDEVDk%`Io83w~B oRi|2-BL7*TjL@imW~NBYcV|uiy~nUUXtxiI1Z!#8oyCFw1qGwfg#Z8m diff --git a/tests/testthat/_snaps/dotplot/dotplot-3groups.svg b/tests/testthat/_snaps/dotplot/dotplot-3groups.svg index 6ace923..c9e868e 100644 --- a/tests/testthat/_snaps/dotplot/dotplot-3groups.svg +++ b/tests/testthat/_snaps/dotplot/dotplot-3groups.svg @@ -62,6 +62,16 @@ + + + + + + + + + + @@ -168,16 +178,6 @@ 5 Percent (%) - - - - - - - - - - @@ -314,11 +314,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + Control + + + + Experimental + + + + Other diff --git a/tests/testthat/_snaps/dotplot/dotplot-ref-rr.svg b/tests/testthat/_snaps/dotplot/dotplot-ref-rr.svg index db993d4..abd023d 100644 --- a/tests/testthat/_snaps/dotplot/dotplot-ref-rr.svg +++ b/tests/testthat/_snaps/dotplot/dotplot-ref-rr.svg @@ -62,6 +62,16 @@ + + + + + + + + + + @@ -104,16 +114,6 @@ 5 Percent (%) - - - - - - - - - - @@ -186,9 +186,33 @@ + + + + + + + + + + + + + + + + + + + + Control + + + + Experimental diff --git a/tests/testthat/_snaps/dotplot/dotplot-ref.svg b/tests/testthat/_snaps/dotplot/dotplot-ref.svg index a3366fc..77da87f 100644 --- a/tests/testthat/_snaps/dotplot/dotplot-ref.svg +++ b/tests/testthat/_snaps/dotplot/dotplot-ref.svg @@ -62,6 +62,16 @@ + + + + + + + + + + @@ -104,16 +114,6 @@ 5 Percent (%) - - - - - - - - - - @@ -178,9 +178,33 @@ + + + + + + + + + + + + + + + + + + + + Control + + + + Experimental diff --git a/tests/testthat/_snaps/dotplot/dotplot.svg b/tests/testthat/_snaps/dotplot/dotplot.svg index 6a8cde9..0069cbb 100644 --- a/tests/testthat/_snaps/dotplot/dotplot.svg +++ b/tests/testthat/_snaps/dotplot/dotplot.svg @@ -62,6 +62,16 @@ + + + + + + + + + + @@ -104,16 +114,6 @@ 5 Percent (%) - - - - - - - - - - @@ -178,9 +178,33 @@ + + + + + + + + + + + + + + + + + + + + Control + + + + Experimental From 7005566b43a12e1838df2584bad2ff384f01560c Mon Sep 17 00:00:00 2001 From: shug0131 Date: Mon, 13 Jan 2025 14:19:34 +0000 Subject: [PATCH 4/5] riskier intervetion don't now check the incoming CT.gov trial. Although this shoudl come straight out of the website and thus be guaranteed to be valid. --- R/clintrials_gov_convert.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/clintrials_gov_convert.R b/R/clintrials_gov_convert.R index 320949a..28323ae 100644 --- a/R/clintrials_gov_convert.R +++ b/R/clintrials_gov_convert.R @@ -62,7 +62,7 @@ clintrials_gov_convert <- function(input, original, output, #check against the output schema check_out <- ( Sys.info()["sysname"]=="Windows") || xml2::xml_validate(safety, schema_results) if( !check_out){ warning(attr(check_out,"errors"))} - check_out <- xml2::xml_validate(original, schema_output) + check_out <- ( Sys.info()["sysname"]=="Windows") || xml2::xml_validate(original, schema_output) if( !check_out){ warning(attr(check_out,"errors"))} message("Please email cuh.cctu@nhs.net to tell us if you have successfully uploaded a study to ClinicalTrials.gov .\nThis is to allow us to measure the impact of this tool.") From 30ffb5c7db06fd906c398a28b2ff0080879ba691 Mon Sep 17 00:00:00 2001 From: shug0131 Date: Mon, 13 Jan 2025 14:36:19 +0000 Subject: [PATCH 5/5] no back one step --- R/clintrials_gov_convert.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/clintrials_gov_convert.R b/R/clintrials_gov_convert.R index 28323ae..eb79e09 100644 --- a/R/clintrials_gov_convert.R +++ b/R/clintrials_gov_convert.R @@ -62,7 +62,7 @@ clintrials_gov_convert <- function(input, original, output, #check against the output schema check_out <- ( Sys.info()["sysname"]=="Windows") || xml2::xml_validate(safety, schema_results) if( !check_out){ warning(attr(check_out,"errors"))} - check_out <- ( Sys.info()["sysname"]=="Windows") || xml2::xml_validate(original, schema_output) + check_out <- xml2::xml_validate(original, schema_output) if( !check_out){ warning(attr(check_out,"errors"))} message("Please email cuh.cctu@nhs.net to tell us if you have successfully uploaded a study to ClinicalTrials.gov .\nThis is to allow us to measure the impact of this tool.")