Skip to content

Commit

Permalink
Merge pull request #142 from alan-turing-institute/test-travis
Browse files Browse the repository at this point in the history
Fix CI (/migrate to GitHub actions)
  • Loading branch information
jack89roberts authored Jun 6, 2022
2 parents 06e2f28 + 1f4d833 commit 17789bf
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 95 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
schedule:
- cron: "5 5 5 * *" # run at 05:05 on 5th day of each month

name: Build

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel'}
- {os: ubuntu-latest, r: 'devel'}
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
use-public-rspm: true

- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-tinytex@v2

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::devtools
any::covr
- name: Check package
run: devtools::document();devtools::check()
shell: Rscript {0}

- name: Check coverage
run: covr::codecov(quiet = FALSE)
shell: Rscript {0}
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: netdist
Title: An implementation of the NetEMD alignment-free network distance measure
Version: 0.4.9000
Version: 0.4.9100
Authors@R: person("Martin", "O'Reilly",email = "[email protected]",
role = c("aut", "cre"))
Description: An implementation of the NetEMD alignment-free network
Expand All @@ -20,15 +20,15 @@ Imports:
purrr,
lpSolve,
plyr,
dplyr,
pheatmap,
Rcpp,
phangorn
Suggests:
dplyr,
phangorn,
testthat,
knitr,
rmarkdown,
roxygen2
RoxygenNote: 7.1.0
RoxygenNote: 7.2.0
VignetteBuilder: knitr
Encoding: UTF-8
16 changes: 7 additions & 9 deletions R/measures_net_dis.R
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,6 @@ netdis_one_to_many <- function(graph_1 = NULL,
#' 3) NULL (default) - Expected counts will be calculated based on the properties of the
#' query graphs themselves. (Geometric-Poisson approximation).
#'
#'
#' @param comparisons Which comparisons to perform between graphs.
#' Can be "many-to-many" (all pairwise combinations) or "one-to-many"
#' (compare first graph in graphs to all other graphs.)
Expand All @@ -394,18 +393,17 @@ netdis_one_to_many <- function(graph_1 = NULL,
#'
#' @param min_ego_edges Filter ego networks which have fewer
#' than min_ego_edges edges (default 1).
#'
#' @param binning_fn Function used to bin ego network densities. Takes edge \code{densities}
#'
#' @param binning_fn Function used to bin ego network densities. Takes edge \code{densities}
#' as its single argument, and returns a named list including, the input \code{densities}, the resulting bin \code{breaks} (vector of density bin limits), and the vector \code{interval_indexes} which states to what bin each of the individual elements in \code{densities} belongs to.
#' ego network). If \code{NULL}, then the method \code{binned_densities_adaptive} with
#' \code{min_counts_per_interval = 5} and \code{num_intervals = 100} is used
#' (Default: NULL).
#' \code{min_counts_per_interval = 5} and \code{num_intervals = 100} is used (default: NULL).
#'
#' @param bin_counts_fn Function used to calculate expected graphlet counts in
#' each density bin. Takes \code{graphlet_counts}, \code{interval_indexes}
#' (bin indexes) and \code{max_graphlet_size} as arguments. If \code{bin_counts_fn} is \code{NULL}, (default),
#' it will apply either the approach from the original Netdis paper, or the respective Geometric-Poisson
#' approximation; depending on the values of \code{ref_graph} and \code{graphlet_counts_ref}.
#' it will apply either the approach from the original Netdis paper, or the respective Geometric-Poisson
#' approximation; depending on the values of \code{ref_graph} and \code{graphlet_counts_ref}.
#'
#' @param exp_counts_fn Function used to map from binned reference counts to
#' expected counts for each graphlet in each ego network of the query graphs.
Expand All @@ -414,7 +412,7 @@ netdis_one_to_many <- function(graph_1 = NULL,
#' If \code{exp_counts_fn} is \code{NULL}, (default), it will apply
#' either the approach from the original Netdis paper, or the respective Geometric-Poisson approximation; depending on the
#' values of \code{ref_graph} and \code{graphlet_counts_ref}.
#'
#'
#' @param graphlet_counts Pre-generated graphlet counts (default: NULL). If the
#' \code{graphlet_counts} argument is defined then \code{graphs} will not be
#' used.
Expand All @@ -433,7 +431,7 @@ netdis_one_to_many <- function(graph_1 = NULL,
#' each ego network.
#' If the \code{graphlet_counts_ref} argument is defined then \code{ref_graph} will not
#' be used.

#'
#' @return Netdis statistics between query graphs for graphlet sizes
#' up to and including max_graphlet_size.
#'
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ Until this package hits release 1.0 anything can change with no notice.

[![Project Status: WIP - Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](http://www.repostatus.org/badges/latest/wip.svg)](http://www.repostatus.org/#wip)
[![GitHub release](https://img.shields.io/github/release/alan-turing-institute/network-comparison.svg)](https://github.com/alan-turing-institute/network-comparison/releases/latest)
[![Travis](https://img.shields.io/travis/alan-turing-institute/network-comparison/master.svg)](https://travis-ci.org/alan-turing-institute/network-comparison/branches)
[![Appveyor](https://ci.appveyor.com/api/projects/status/jn1a36c22vjw1l4d/branch/master?svg=true)](https://ci.appveyor.com/project/alan-turing-institute/network-comparison/branch/master)
[![Build](https://github.com/alan-turing-institute/network-comparison/actions/workflows/main.yml/badge.svg)](https://github.com/alan-turing-institute/network-comparison/actions/workflows/main.yml)

[![Codecov](https://img.shields.io/codecov/c/github/alan-turing-institute/network-comparison/master.svg)](https://codecov.io/gh/alan-turing-institute/network-comparison?branch=master)
[![license](https://img.shields.io/github/license/alan-turing-institute/network-comparison.svg)](https://github.com/alan-turing-institute/network-comparison/edit/master/LICENSE)
Expand Down
50 changes: 0 additions & 50 deletions appveyor.yml

This file was deleted.

11 changes: 5 additions & 6 deletions man/netdis_many_to_many.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/virusppi.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/worldtradesub.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 17789bf

Please sign in to comment.