Skip to content

Commit

Permalink
Merge pull request #12 from jhollway/develop #minor
Browse files Browse the repository at this point in the history
* Differentiated between PhD theses and masters dissertations in front pages
  * Breaking change: Note that you will now need to specify phd: true or phd: false in metadata
* Added supervisor and second reader information to metadata, appear on first page
  * Added external examiner information to metadata, appears on first page for PhDs
* Updates to pull request template
  • Loading branch information
jhollway authored Jul 6, 2020
2 parents 9d6a746 + c8b1bb4 commit 2c6c2e3
Show file tree
Hide file tree
Showing 7 changed files with 109 additions and 39 deletions.
41 changes: 10 additions & 31 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,19 @@
# Description

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

Fixes # (issue)

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

# How Has This Been Tested?

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

- [ ] Test A
- [ ] Test B

**Test Configuration**:
* Firmware version:
* Hardware:
* Toolchain:
* SDK:
Fixes #(issue no.)
Closes #(issue no.)

# Checklist:

- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] The package builds on my OS without issues (please add workstation details)
- [ ] My changes generate no new warnings
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
- [ ] I have made corresponding changes to the documentation (.R, NEWS.md)
- [ ] I have bumped the version by the appropriate increment in the DESCRIPTION file (major, minor, patch)
73 changes: 73 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
on:
pull_request:
branches:
- master

name: Binary creation

jobs:

build:
name: Build for ${{ matrix.config.os }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release', artifact_name: '*.tar.gz', asset_name: macOS}
- {os: windows-latest, r: 'release', artifact_name: '*.zip', asset_name: winOS}
# - {os: ubuntu-18.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest", artifact_name: '*.tar.gz', asset_name: linuxOS}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@master
with:
r-version: ${{ matrix.config.r }}
- uses: r-lib/actions/setup-pandoc@master

- 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: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v1
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 system dependencies
# if: runner.os == 'Linux'
# env:
# RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
# run: |
# Rscript -e "remotes::install_github('r-hub/sysreqs')"
# sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
# sudo -s eval "$sysreqs"

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("pkgbuild")
shell: Rscript {0}

- name: Document
run: Rscript -e 'roxygen2::roxygenise()'
- name: Binary
run: |
pkgbuild::clean_dll()
binary <- pkgbuild::build(binary = TRUE, needs_compilation = TRUE, compile_attributes = TRUE)
dir.create("build")
file.copy(binary, "build")
shell: Rscript {0}

3 changes: 0 additions & 3 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ on:
push:
branches:
- master
pull_request:
branches:
- master

name: Binary creation

Expand Down
9 changes: 5 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
Package: iheiddown
Title: A RMarkdown class for IHEID dissertations
Version: 0.3.0
Title: A RMarkdown class for IHEID documents
Date: 2020-07-06
Version: 0.4.0
Authors@R:
c(person(given = "James",
family = "Hollway",
role = c("aut", "cre"),
email = "[email protected]",
comment = c(ORCID = "0000-0002-8361-9647")),
person("Nina", "Schlager", role = "ctb"))
Description: This package supports writing theses according to
the Graduate Institute of International and Development Studies
Description: This package supports writing dissertations, theses, and syllabi
according to the Graduate Institute of International and Development Studies
regulations.
License: MIT
Imports: bookdown, tidyverse, roxygen2
Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# iheiddown 0.4.0

* Differentiated between PhD theses and masters dissertations in front pages
* Breaking change: Note that you will now need to specify phd: true or phd: false in metadata
* Added supervisor and second reader information to metadata, appear on first page
* Added external examiner information to metadata, appears on first page for PhDs
* Updates to pull request template

# iheiddown 0.3.0

* Added `syllabus_pdf()` function
Expand Down
5 changes: 4 additions & 1 deletion inst/rmarkdown/templates/thesis/skeleton/skeleton.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ title: |
firstnames: Author
lastnames: Name
thesisno: 12345
degree: Doctor of Philosophy
phd: true # Or: false for Masters
department: Your Department
degreedate: June 2020
supervisor: Minerva McGonagall
secondreader: Horace Slughorn
examiner: Olympe Maxime # only required if PhD; otherwise delete or comment out
# This is the YAML (YAML Ain't Markup Language) header that includes
# metadata used to produce the document.
# Be careful with spacing in this header!
Expand Down
9 changes: 9 additions & 0 deletions inst/rmarkdown/templates/thesis_pdf/resources/template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,13 @@

\sffamily{Thesis No. $thesisno$}

\vspace*{1cm}
\sffamily\textbf{Supervisor: $supervisor$}\\
\sffamily\textbf{Second Reader: $secondreader$}
$if(phd)$
\\\sffamily\textbf{External Examiner: $examiner$}
$endif$

\vspace*{1cm}
\sffamily\textbf{Geneva}\\
\sffamily\textbf{\the\year}
Expand All @@ -324,6 +331,7 @@
\end{titlepage}

% TITLEPAGE 2 (empty page)
$if(phd)$
\newpage\null\thispagestyle{empty}\newpage

% TITLEPAGE 3
Expand Down Expand Up @@ -366,6 +374,7 @@

\thispagestyle{firstpages}
\end{titlepage}
$endif$

% TITLEPAGE 6
\begin{titlepage}
Expand Down

0 comments on commit 2c6c2e3

Please sign in to comment.