Skip to content

Commit

Permalink
updated messages
Browse files Browse the repository at this point in the history
  • Loading branch information
explodecomputer committed May 23, 2024
1 parent aba3eb1 commit 1966034
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: TwoSampleMR
Title: Two Sample MR Functions and Interface to MR Base Database
Version: 0.6.2
Version: 0.6.3
Authors@R: c(
person("Gibran", "Hemani", , "g.hemani@bristol.ac.uk", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-0920-1055")),
Expand Down Expand Up @@ -37,6 +37,7 @@ Imports:
gridExtra,
gtable,
ieugwasr (>= 1.0.0),
jsonlite,
knitr,
lattice,
magrittr,
Expand Down
18 changes: 12 additions & 6 deletions R/zzz.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
.onAttach <- function(libname, pkgname) {

packageStartupMessage(
paste("TwoSampleMR version", utils::packageVersion("TwoSampleMR"), "\n"),
"[>] New: Improved API performance and stability\n",
"[>] New: Authentication required for all OpenGWAS queries from 1st May 2024\n",
"[>] For guidance see https://mrcieu.github.io/ieugwasr/articles/guide.html#authentication\n"
)
packageStartupMessage(paste("TwoSampleMR version", utils::packageVersion("TwoSampleMR"), "\n"))

b <- suppressWarnings(try(jsonlite::read_json("https://raw.githubusercontent.com/MRCIEU/opengwas/main/messages-twosamplemr.json"), silent=TRUE))
if(!inherits(b, 'try-error'))
{
if(length(b) > 0) {
o <- lapply(b, function(x) {
# packageStartupMessage(" Message date: ", x[["date"]])
sapply(x[["message"]], function(j) packageStartupMessage(paste(" ", j)))
})
}
}

a <- suppressWarnings(try(readLines("https://raw.githubusercontent.com/MRCIEU/TwoSampleMR/master/DESCRIPTION"), silent=TRUE))

Expand Down

0 comments on commit 1966034

Please sign in to comment.