Skip to content

Commit

Permalink
Add infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
maurolepore committed May 30, 2024
1 parent b94dc2c commit 74b155d
Show file tree
Hide file tree
Showing 12 changed files with 195 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
^tiltTransitionRisk\.Rproj$
^\.Rproj\.user$
^LICENSE\.md$
^README\.Rmd$
^_pkgdown\.yml$
^docs$
^pkgdown$
^\.github$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
24 changes: 24 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@


----

TODO

- [ ] Draft the PR title.
- [ ] [Link related issue/PR]([url](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)).
- [ ] Draft the PR description.
- [ ] Mark the PR as draft.
- [ ] [Include a unit test](https://code-review.tidyverse.org/reviewer/aspects.html#sec-tests).
- [ ] Review your own PR in "Files changed".
- [ ] Ensure the PR branch is updated.
- [ ] Ensure all checks pass.
- [ ] Change the PR status from draft to ready.
- [ ] Polish the PR description to reflect it's goal (why not how).
- [ ] Polish the PR title as you'd like others to read it from the git log.
- [ ] Assign a reviewer.

Also if the PR includes user-facing changes:

- [ ] Increment the version number: `fledge::update_version()`
- [ ] Update the changelog: `fledge::update_news()`
- [ ] Merge then tag: `fledge::tag_version()`
13 changes: 13 additions & 0 deletions .github/workflows/call-R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# https://docs.github.com/en/actions/using-workflows/reusing-workflows#creating-a-reusable-workflow
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check

jobs:
call:
uses: 2DegreesInvesting/tiltDevTools/.github/workflows/R-CMD-check.yaml@main
secrets: inherit
50 changes: 50 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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]
release:
types: [published]
workflow_dispatch:

name: pkgdown

permissions: read-all

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4

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

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
needs: website

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
.httr-oauth
.DS_Store
.quarto
docs
12 changes: 8 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
Package: tiltTransitionRisk
Title: What the Package Does (One Line, Title Case)
Title: Transition Risk
Version: 0.0.0.9000
Authors@R:
person("Mauro", "Lepore", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "https://orcid.org/0000-0002-1986-7988"))
Description: What the package does (one paragraph).
Description: Transition risk.
License: GPL (>= 3)
URL: https://github.com/2DegreesInvesting/tiltTransitionRisk,
https://2degreesinvesting.github.io/tiltTransitionRisk/
BugReports: https://github.com/2DegreesInvesting/tiltTransitionRisk/issues
Suggests:
testthat (>= 3.0.0)
Config/testthat/edition: 3
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
URL: https://github.com/2DegreesInvesting/tiltTransitionRisk
BugReports: https://github.com/2DegreesInvesting/tiltTransitionRisk/issues
6 changes: 6 additions & 0 deletions R/tiltTransitionRisk-package.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#' @keywords internal
"_PACKAGE"

## usethis namespace: start
## usethis namespace: end
NULL
37 changes: 37 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
output: github_document
---

<!-- 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%"
)
```

# tiltTransitionRisk

<!-- badges: start -->
<!-- badges: end -->

The goal of tiltTransitionRisk is to host code related specifically to the
transition score indicator.

## Installation

You can install the development version of tiltTransitionRisk from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("2DegreesInvesting/tiltTransitionRisk")
```

## Example

```{r example}
library(tiltTransitionRisk)
```
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# tiltTransitionRisk

<!-- badges: start -->
<!-- badges: end -->

The goal of tiltTransitionRisk is to host code related specifically to
the transition score indicator.

## Installation

You can install the development version of tiltTransitionRisk from
[GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("2DegreesInvesting/tiltTransitionRisk")
```

## Example

``` r
library(tiltTransitionRisk)
```
4 changes: 4 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
url: https://2degreesinvesting.github.io/tiltTransitionRisk/
template:
bootstrap: 5

20 changes: 20 additions & 0 deletions man/tiltTransitionRisk-package.Rd

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

0 comments on commit 74b155d

Please sign in to comment.