Skip to content

Commit

Permalink
setup general package framework and CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jhrcook committed Oct 12, 2019
1 parent 3490682 commit bbda9c5
Show file tree
Hide file tree
Showing 16 changed files with 796 additions and 50 deletions.
8 changes: 8 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,11 @@
^\.Rproj\.user$
^README\.Rmd$
^R/TEMP_original_fxns\.R$
^doc$
^Meta$
^_pkgdown\.yml$
^docs$
^pkgdown$
^\.travis\.yml$
^appveyor\.yml$
^codecov\.yml$
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ inst/doc
data-raw/*.rds
.Rhistory
.Rproj.user
doc
Meta
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r

language: R
cache: packages

after_success:
- Rscript -e 'covr::codecov()'
14 changes: 7 additions & 7 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ Title: Read HotNet2 Results and Convert to Graph object
Version: 0.0.0.9000
Author: person(c("Joshua", "H"), "Cook", email = "[email protected]",
role = c("aut", "cre"))
Maintainer: Joshua Cook <[email protected]>
Description: This package reads the results from HotNet2 for further analysis.
It can return the results as a list of list of genes or transform them into
`igraph` or `tidygraph` objects.
License: file LICENSE
Encoding: UTF-8
LazyData: true
Depends: R (>= 3.5.0)
Imports:
dplyr (>= 0.8.0),
ggplot2 (>= 3.1.0),
magrittr (>= 1.5.0),
purrr (>= 0.3.0),
rlang (>= 0.3.0),
tibble(>= 2.0.0)
Suggests:
knitr,
rmarkdown,
covr
VignetteBuilder: knitr
RoxygenNote: 6.1.1
1 change: 1 addition & 0 deletions HotNetvieweR.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ StripTrailingWhitespace: Yes
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageRoxygenize: rd,collate,namespace
3 changes: 2 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
exportPattern("^[[:alpha:]]+")
# Generated by roxygen2: do not edit by hand

11 changes: 0 additions & 11 deletions R/TEMP_original_fxns.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,6 @@
## Extracting Results from a HotNet2 Run ##
###########################################

library(igraph)
library(tidygraph)
library(RColorBrewer)
library(scales)
library(reshape)
library(pryr)
library(data.table)
library(plyr)
library(magrittr)
library(tidyverse)

#### ---- Subroutines ---- ####

# gets the k for a given delta
Expand Down
52 changes: 39 additions & 13 deletions README.Rmd
Original file line number Diff line number Diff line change
@@ -1,23 +1,49 @@
---
title: "README.Rmd"
author: "Joshua H. Cook"
date: "2/22/2019"
output:
md_document:
variant: markdown_github
output: github_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
<!-- README.md is generated from README.Rmd. Please edit that file -->

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# HotNetvieweR

**author: Joshua H. Cook**
<!-- badges: start -->
![CRAN_Release_Badge](https://www.r-pkg.org/badges/version/HotNetvieweR)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Travis build status](https://travis-ci.org/jhrcook/HotNetvieweR.svg?branch=master)](https://travis-ci.org/jhrcook/HotNetvieweR)
[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/jhrcook/HotNetvieweR?branch=master&svg=true)](https://ci.appveyor.com/project/jhrcook/HotNetvieweR)
[![Codecov test coverage](https://codecov.io/gh/jhrcook/HotNetvieweR/branch/master/graph/badge.svg)](https://codecov.io/gh/jhrcook/HotNetvieweR?branch=master)
<!-- badges: end -->

**date: 2019-02-22**
The goal of HotNetvieweR is to ...

[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
![CRAN_Release_Badge](https://www.r-pkg.org/badges/version/HotNetvieweR)
## Installation

You can install the released version of HotNetvieweR from [CRAN](https://CRAN.R-project.org) with:

``` r
install.packages("HotNetvieweR")
```

Just started this package, but I have most of the pieces from my personal use. Should be able to get this up soon.
And the development version from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("jhrcook/HotNetvieweR")
```
## Example

This is a basic example which shows you how to solve a common problem:

```{r example, eval=FALSE}
library(HotNetvieweR)
## basic example code
```
46 changes: 40 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,44 @@
HotNetvieweR
============

**author: Joshua H. Cook**
<!-- README.md is generated from README.Rmd. Please edit that file -->

**date: 2019-02-22**
# HotNetvieweR

[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) ![CRAN\_Release\_Badge](https://www.r-pkg.org/badges/version/HotNetvieweR)
<!-- badges: start -->

Just started this package, but I have most of the pieces from my personal use. Should be able to get this up soon.
![CRAN\_Release\_Badge](https://www.r-pkg.org/badges/version/HotNetvieweR)
[![License: GPL
v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Travis build
status](https://travis-ci.org/jhrcook/HotNetvieweR.svg?branch=master)](https://travis-ci.org/jhrcook/HotNetvieweR)
[![AppVeyor build
status](https://ci.appveyor.com/api/projects/status/github/jhrcook/HotNetvieweR?branch=master&svg=true)](https://ci.appveyor.com/project/jhrcook/HotNetvieweR)
[![Codecov test
coverage](https://codecov.io/gh/jhrcook/HotNetvieweR/branch/master/graph/badge.svg)](https://codecov.io/gh/jhrcook/HotNetvieweR?branch=master)
<!-- badges: end -->

The goal of HotNetvieweR is to …

## Installation

You can install the released version of HotNetvieweR from
[CRAN](https://CRAN.R-project.org) with:

``` r
install.packages("HotNetvieweR")
```

And the development version from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("jhrcook/HotNetvieweR")
```

## Example

This is a basic example which shows you how to solve a common problem:

``` r
library(HotNetvieweR)
## basic example code
```
39 changes: 39 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
destination: docs

template:
params:
bootswatch: flatly

navbar:
structure:
left:
- home
- intro
- reference
- articles
- tutorials
right:
- news
- github
- twitter
components:
home:
icon: fas fa-home fa-lg
href: index.html
reference:
text: Reference
href: reference/index.html
articles:
text: Articles
menu:
- text: HotNet2 Setup and Example
href: articles/HotNet2-setup-and-example.html
news:
text: Versions
href: news/index.html
github:
icon: fa-github fa-lg
href: https://github.com/jhrcook/ggasym
twitter:
icon: fab fa-twitter fa-lg
href: https://twitter.com/JoshDoesa
52 changes: 52 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# DO NOT CHANGE the "init" and "install" sections below

# Download script file from GitHub
init:
ps: |
$ErrorActionPreference = "Stop"
Invoke-WebRequest https://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1"
Import-Module '..\appveyor-tool.ps1'
install:
ps: Bootstrap

cache:
- C:\RLibrary

environment:
NOT_CRAN: true
# env vars that may need to be set, at least temporarily, from time to time
# see https://github.com/krlmlr/r-appveyor#readme for details
# USE_RTOOLS: true
# R_REMOTES_STANDALONE: true

# Adapt as necessary starting from here

build_script:
- travis-tool.sh install_deps

test_script:
- travis-tool.sh run_tests

on_failure:
- 7z a failure.zip *.Rcheck\*
- appveyor PushArtifact failure.zip

artifacts:
- path: '*.Rcheck\**\*.log'
name: Logs

- path: '*.Rcheck\**\*.out'
name: Logs

- path: '*.Rcheck\**\*.fail'
name: Logs

- path: '*.Rcheck\**\*.Rout'
name: Logs

- path: '\*_*.tar.gz'
name: Bits

- path: '\*_*.zip'
name: Bits
12 changes: 12 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
comment: false

coverage:
status:
project:
default:
target: auto
threshold: 1%
patch:
default:
target: auto
threshold: 1%
Loading

0 comments on commit bbda9c5

Please sign in to comment.