Skip to content

Commit

Permalink
Yf post release fixes (#24)
Browse files Browse the repository at this point in the history
- refactored a bunch
- added tests
- added documentation
  • Loading branch information
Yossi Farjoun authored Jun 9, 2021
1 parent 624da4a commit 69cb842
Show file tree
Hide file tree
Showing 14 changed files with 759 additions and 213 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
^LICENSE\.md$
LD_LINK_TOKEN
installation
demo/
22 changes: 21 additions & 1 deletion .github/workflows/check-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,32 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1
with:
r-version: '4.0.3'

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Restore R package cache
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install dependencies
run: |
install.packages(c("remotes", "rcmdcheck"))
install.packages(c("remotes", "rcmdcheck", "renv"))
remotes::install_deps(dependencies = TRUE)
renv::restore()
shell: Rscript {0}

- name: Check
run: |
options(crayon.enabled = TRUE)
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1
with:
r-version: '4.0.3'

- uses: r-lib/actions/setup-pandoc@v1

Expand All @@ -38,9 +40,10 @@ jobs:

- name: Install dependencies
run: |
install.packages(c("remotes"))
install.packages(c("remotes","renv"))
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("covr")
renv::restore()
shell: Rscript {0}

- name: Test coverage
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.Rhistory
.RData
.Ruserdata
.Renviron
tests
LD_LINK_TOKEN
inst/doc
8 changes: 5 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: MRutils
Version: 0.1.0.0
Version: 0.2.0.0
Date: 2021-05-14
Title: Utility functions for preparing data for Two-Sample MR
Authors@R: c(person("Yossi", "Farjoun", role = c("aut", "cre"),
Expand Down Expand Up @@ -33,7 +33,9 @@ Imports:
validate,
assertthat,
methods,
curry,
here,
readr
readr,
digest,
yaml,
ggplot2
VignetteBuilder: knitr
12 changes: 12 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,30 @@

export("%>%")
export("%vin%")
export(assert_chr)
export(assert_gwas)
export(assert_probabilities)
export(assert_rsids)
export(assert_valid_data)
export(choose_best_proxies)
export(extract_snps_from_bgzip)
export(fill_gwas_unknown_rsids)
export(filter_and_write_exposure_data)
export(fix_proxy_alleles)
export(get_2smr_results)
export(get_LD_pairs)
export(get_cached_rsid_from_position)
export(get_proxies)
export(get_rsid)
export(get_rsid_from_position)
export(get_unknown_rsids_from_locus)
export(merge_rsids_into_gwas)
export(prune_snps)
export(remove_linked_snps)
export(replace_alleles)
export(required_headers)
export(valid_contigs)
export(valid_contigs_with_chr)
export(valid_references)
importFrom(magrittr,"%>%")
importFrom(validate,"%vin%")
Loading

0 comments on commit 69cb842

Please sign in to comment.