Skip to content

Commit ea2c200

Browse files
authored
Merge pull request #57 from jhollway/develop
Added Ryanair and codecov
2 parents 388e502 + 93c79f3 commit ea2c200

11 files changed

+144
-64
lines changed

.github/pull_request_template.md

+11-31
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,20 @@
11
# Description
22

3-
Please include a summary of the change and which issue is fixed.
3+
Please include a summary of the changes and which issues are fixed.
44
Please also include relevant motivation and context.
5-
List any dependencies that are required for this change.
5+
List any dependencies that are required for this change,
6+
indicating whether this is a major (breaking), minor, or patch change.
67

7-
Fixes # (issue)
8-
9-
## Type of change
10-
11-
Please delete options that are not relevant.
12-
13-
- [ ] Bug fix (non-breaking change which fixes an issue)
14-
- [ ] New feature (non-breaking change which adds functionality)
15-
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
16-
- [ ] This change requires a documentation update
17-
18-
# How Has This Been Tested?
19-
20-
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
21-
22-
- [ ] Test A
23-
- [ ] Test B
24-
25-
**Test Configuration**:
26-
* Firmware version:
27-
* Hardware:
28-
* Toolchain:
29-
* SDK:
8+
Fixes #(issue no.)
9+
Closes #(issue no.)
3010

3111
# Checklist:
3212

13+
- [ ] I have added tests that prove my fix is effective or that my feature works
14+
- [ ] The package builds on my OS without issues (please add workstation details)
15+
- [ ] My changes generate no new warnings
3316
- [ ] My code follows the style guidelines of this project
34-
- [ ] I have performed a self-review of my own code
3517
- [ ] I have commented my code, particularly in hard-to-understand areas
36-
- [ ] I have made corresponding changes to the documentation
37-
- [ ] My changes generate no new warnings
38-
- [ ] I have added tests that prove my fix is effective or that my feature works
39-
- [ ] New and existing unit tests pass locally with my changes
40-
- [ ] Any dependent changes have been merged and published in downstream modules
18+
- [ ] I have made corresponding changes to the documentation (.R, NEWS.md)
19+
- [ ] I have bumped the version by the appropriate increment in the DESCRIPTION file (major, minor, patch)
20+
- [ ] PR checks all pass for latest commit

.github/workflows/prchecks.yml

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
on:
2+
pull_request:
3+
branches:
4+
- master
5+
6+
name: Binary checks
7+
8+
jobs:
9+
10+
build:
11+
name: Build for ${{ matrix.config.os }}
12+
runs-on: ${{ matrix.config.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
config:
17+
- {os: macOS-latest, r: 'release', artifact_name: '*.tar.gz', asset_name: macOS}
18+
- {os: windows-latest, r: 'release', artifact_name: '*.zip', asset_name: winOS}
19+
# - {os: ubuntu-18.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest", artifact_name: '*.tar.gz', asset_name: linuxOS}
20+
21+
env:
22+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
23+
RSPM: ${{ matrix.config.rspm }}
24+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
25+
26+
steps:
27+
- uses: actions/checkout@v2
28+
29+
- uses: r-lib/actions/setup-r@master
30+
with:
31+
r-version: ${{ matrix.config.r }}
32+
- uses: r-lib/actions/setup-pandoc@master
33+
34+
- name: Query dependencies
35+
run: |
36+
install.packages('remotes')
37+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
38+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
39+
shell: Rscript {0}
40+
41+
- name: Cache R packages
42+
if: runner.os != 'Windows'
43+
uses: actions/cache@v1
44+
with:
45+
path: ${{ env.R_LIBS_USER }}
46+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
47+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
48+
49+
#- name: Install system dependencies
50+
# if: runner.os == 'Linux'
51+
# env:
52+
# RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
53+
# run: |
54+
# Rscript -e "remotes::install_github('r-hub/sysreqs')"
55+
# sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
56+
# sudo -s eval "$sysreqs"
57+
58+
- name: Install dependencies
59+
run: |
60+
remotes::install_deps(dependencies = TRUE)
61+
remotes::install_cran("pkgbuild")
62+
shell: Rscript {0}
63+
- name: Document
64+
run: Rscript -e 'roxygen2::roxygenise()'
65+
- name: Binary
66+
run: |
67+
pkgbuild::clean_dll()
68+
binary <- pkgbuild::build(binary = TRUE, needs_compilation = TRUE, compile_attributes = TRUE)
69+
dir.create("build")
70+
file.copy(binary, "build")
71+
shell: Rscript {0}
72+
73+
- name: Save binary artifact
74+
uses: actions/upload-artifact@v1
75+
with:
76+
name: ${{ matrix.config.asset_name }}
77+
path: build/
78+
79+
- name: Calculate code coverage
80+
run: Rscript -e "covr::codecov()"

.github/workflows/package.yml .github/workflows/pushrelease.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@ on:
22
push:
33
branches:
44
- master
5-
pull_request:
6-
branches:
7-
- master
8-
9-
name: Binary creation
5+
6+
name: Check and release
107

118
jobs:
129

@@ -63,7 +60,6 @@ jobs:
6360
remotes::install_deps(dependencies = TRUE)
6461
remotes::install_cran("pkgbuild")
6562
shell: Rscript {0}
66-
6763
- name: Document
6864
run: Rscript -e 'roxygen2::roxygenise()'
6965
- name: Binary
@@ -80,6 +76,9 @@ jobs:
8076
name: ${{ matrix.config.asset_name }}
8177
path: build/
8278

79+
- name: Calculate code coverage
80+
run: Rscript -e "covr::codecov()"
81+
8382
release:
8483
name: Bump version and release
8584
needs: build

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ inst/doc
44
.RData
55
.Ruserdata
66
*.Rd
7+
data-raw/*

DESCRIPTION

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: roctopus
22
Title: Utility functions for multimode and multilevel network analysis
3-
Version: 0.2.0
3+
Version: 0.2.1
44
Description: This package assembles a number of utility functions for
55
loading, visualising, and analysing multimode, multiplex, and multilevel networks.
66
URL: https://bitbucket.org/jhollway/roctopus/
@@ -9,13 +9,14 @@ Depends: R (>= 3.4.0)
99
License: MIT + file LICENSE
1010
Encoding: UTF-8
1111
LazyData: true
12-
RoxygenNote: 7.1.0
12+
RoxygenNote: 7.1.1
1313
Imports: igraph,
1414
geosphere,
1515
threejs,
1616
roxygen2,
1717
ggplot2,
18-
tidyverse
18+
tidyverse,
19+
covr
1920
Suggests:
2021
testthat,
2122
knitr,

LICENSE

-2
This file was deleted.

LICENSE.md

-21
This file was deleted.

NEWS.md

+22-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,31 @@
1+
# roctopus 0.2.1
2+
3+
2020-07-17
4+
5+
## Data
6+
7+
* Added `ryanair` dataset from Christopoulos 2006
8+
9+
## Package
10+
11+
* Split workflow into pull-request and merge/push prompted actions
12+
* Added codecov calculation to workflows
13+
14+
# roctopus 0.2.0
15+
16+
2020-07-03
17+
18+
## Data
19+
20+
* Added `evs` datasets from Knoke et al 2020
21+
122
# roctopus 0.1.0
223

324
2020-06-30
425

526
## Data
627

7-
* Added Bristol dataset from Knoke et al 2020
28+
* Added `bristol` dataset from Knoke et al 2020
829

930
# roctopus 0.0.4
1031

R/ryanair.R

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#' Ryanair data, EU policy influence network in June 2004
2+
#'
3+
#' Network of anonymised actors reacting to the Ryanair/Charleroi decision of the EU Commission in February 2004.
4+
#' The relationships mapped comprise an account of public records of interaction supplemented with the cognitive network of key informants.
5+
#' Examination of relevant communique ́s, public statements and a number of off-the-record interviews provides confidence
6+
#' that the network mapped closely approximated interactions between 29 January and 12 February 2004.
7+
#' The time point mapped is at the height of influence and interest intermediation played by actors in the AER,
8+
#' a comparatively obscure body representing the interests of a number of European regional bodies at the EU institutions.
9+
#'
10+
#' @docType data
11+
#' @keywords datasets
12+
#' @name ryanair
13+
#' @usage data(ryanair)
14+
#' @format Matrix with 20 rows/columns
15+
#' @source Christopoulos, Dimitrios C. 2006.
16+
#' “Relational Attributes of Political Entrepreneurs: a Network Perspective.”
17+
#' \emph{Journal of European Public Policy} 13 (5): 757–78.
18+
#'
19+
#' Knoke, Christopoulos, Diani, and Hollway. 2020. \emph{Multimodal Political Networks}. Cambridge University Press: Cambridge.
20+
"ryanair"

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
![GitHub Release Date](https://img.shields.io/github/release-date/jhollway/roctopus)
88
![GitHub issues](https://img.shields.io/github/issues-raw/jhollway/roctopus)
99
[![HitCount](http://hits.dwyl.com/jhollway/roctopus.svg)](http://hits.dwyl.com/jhollway/roctopus)
10+
[![Codecov test coverage](https://codecov.io/gh/jhollway/roctopus/branch/master/graph/badge.svg)](https://codecov.io/gh/jhollway/roctopus?branch=master)
1011
<!-- ![GitHub All Releases](https://img.shields.io/github/downloads/jhollway/iheiddown/total) -->
1112
<!-- badges: end -->
1213

data/ryanair.rda

483 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)