Skip to content

Commit

Permalink
Merge pull request #28 from hubverse-org/znk/update-readme/12
Browse files Browse the repository at this point in the history
Update README template; update README
  • Loading branch information
zkamvar authored Jan 9, 2025
2 parents 61c24b2 + e042507 commit ff2cfc4
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 48 deletions.
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# hubDevs (development version)

* README template now includes release and development version instructions and
documentation sites (#12, #18)
* README now includes instructions for confirming your GitHub PAT exists and is
available in R.

# hubDevs 0.1.0

* New vignettes to describe the release process (#11 and #15)
Expand Down
9 changes: 9 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ knitr::opts_chunk$set(

The goal of hubDevs is to provide utilities for creating and standardising Hubverse packages

## Documentation

- Latest Release: https://https://hubverse-org.github.io/hubDevs/
- Stable Development Version: https://https://hubverse-org.github.io/hubDevs/dev/

## Installation

### Latest
Expand Down Expand Up @@ -66,6 +71,10 @@ fs::dir_tree(path, all = TRUE, recurse = TRUE)

### Set up package on GitHub

Before going on, ensure that you have a GitHub personal access token (PAT) set up.
Dr. Jenny Bryan provides a very good overview of how to do this from R with the
`usethis` and `gitcreds` packages: https://happygitwithr.com/https-pat.html

Once the new package is launched, you can set it up on GitHub with:

```{r, eval=FALSE}
Expand Down
34 changes: 26 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ status](https://www.r-pkg.org/badges/version/hubDevs)](https://CRAN.R-project.or
The goal of hubDevs is to provide utilities for creating and
standardising Hubverse packages

## Documentation

- Latest Release: <https://https://hubverse-org.github.io/hubDevs/>
- Stable Development Version:
<https://https://hubverse-org.github.io/hubDevs/dev/>

## Installation

### Latest
Expand Down Expand Up @@ -50,17 +56,20 @@ library(hubDevs)
temp_dir <- tempdir()
path <- fs::path(temp_dir, "testPkg")
create_hubdev_pkg(path)
#> ✔ Creating '/var/folders/9p/m996p3_55hjf1hc62552cqfr0000gr/T/RtmpsYPDXR/testPkg/'.
#> ✔ Setting active project to "/private/var/folders/9p/m996p3_55hjf1hc62552cqfr0000gr/T/RtmpsYPDXR/testPkg".
#> ✔ Creating
#> '/var/folders/9p/m996p3_55hjf1hc62552cqfr0000gr/T/RtmpXWBX7W/testPkg/'.
#> ✔ Setting active project to
#> "/private/var/folders/9p/m996p3_55hjf1hc62552cqfr0000gr/T/RtmpXWBX7W/testPkg".
#> ✔ Creating 'R/'.
#> ✔ Writing 'DESCRIPTION'.
#> Package: testPkg
#> Title: What the Package Does (One Line, Title Case)
#> Version: 0.0.0.9000
#> Authors@R (parsed):
#> * Zhian N. Kamvar <zkamvar@gmail.com> [aut, cre] (<https://orcid.org/0000-0003-1458-7108>)
#> * First Last <first.last@example.com> [aut, cre]
#> Description: What the package does (one paragraph).
#> License: MIT + file LICENSE
#> License: `use_mit_license()`, `use_gpl3_license()` or friends to pick a
#> license
#> Encoding: UTF-8
#> Roxygen: list(markdown = TRUE)
#> RoxygenNote: 7.3.2
Expand All @@ -70,13 +79,16 @@ create_hubdev_pkg(path)
#> ✔ Adding ".Rproj.user" to '.gitignore'.
#> ✔ Adding "^\\.Rproj\\.user$" to '.Rbuildignore'.
#> ✔ Setting active project to "<no active project>".
#> ✔ Setting active project to "/private/var/folders/9p/m996p3_55hjf1hc62552cqfr0000gr/T/RtmpsYPDXR/testPkg".
#> ✔ Setting active project to
#> "/private/var/folders/9p/m996p3_55hjf1hc62552cqfr0000gr/T/RtmpXWBX7W/testPkg".
#> ✔ Adding '.DS_Store', '.Rhistory', '.Rdata', '.httr-oauth', and '.secrets' to '.gitignore' and '.Rbuildignore'
#> ✔ Adding testthat to 'Suggests' field in DESCRIPTION.
#> ✔ Adding "3" to 'Config/testthat/edition'.
#> ✔ Creating 'tests/testthat/'.
#> ✔ Writing 'tests/testthat.R'.
#> ☐ Call `usethis::use_test()` to initialize a basic test file and open it for editing.
#> ☐ Call `usethis::use_test()` to initialize a basic test file and open it for
#> editing.
#> ✔ Adding "MIT + file LICENSE" to 'License'.
#> ✔ Writing 'LICENSE'.
#> ✔ Writing 'LICENSE.md'.
#> ✔ Adding "^LICENSE\\.md$" to '.Rbuildignore'.
Expand All @@ -87,7 +99,8 @@ create_hubdev_pkg(path)
#> ✔ Adding "CRAN status badge" to 'README.Rmd'.
#> ☐ Re-knit 'README.Rmd' with `devtools::build_readme()`.
#> ℹ Installing testPkg in temporary library
#> ℹ Building '/private/var/folders/9p/m996p3_55hjf1hc62552cqfr0000gr/T/RtmpsYPDXR/testPkg/README.Rmd'
#> ℹ Building
#> '/private/var/folders/9p/m996p3_55hjf1hc62552cqfr0000gr/T/RtmpXWBX7W/testPkg/README.Rmd'
#> ✔ Creating '.github/'.
#>
#> ✔ Adding "^\\.github$" to '.Rbuildignore'.
Expand All @@ -111,7 +124,7 @@ This creates all basic infrastructure including a hubverse template
README, logo, community documents, MIT LICENSE and initiates the package
as a git repository.

#> /var/folders/9p/m996p3_55hjf1hc62552cqfr0000gr/T/RtmpsYPDXR/testPkg
#> /var/folders/9p/m996p3_55hjf1hc62552cqfr0000gr/T/RtmpXWBX7W/testPkg
#> ├── .Rbuildignore
#> ├── .git
#> │ ├── HEAD
Expand Down Expand Up @@ -150,6 +163,11 @@ as a git repository.

### Set up package on GitHub

Before going on, ensure that you have a GitHub personal access token
(PAT) set up. Dr. Jenny Bryan provides a very good overview of how to do
this from R with the `usethis` and `gitcreds` packages:
<https://happygitwithr.com/https-pat.html>

Once the new package is launched, you can set it up on GitHub with:

``` r
Expand Down
21 changes: 17 additions & 4 deletions inst/templates/package-README
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ knitr::opts_chunk$set(
)
```


# {{{ pkgname }}} <a href="https://{{{ organisation }}}.github.io/{{{ pkgname }}}/"><img src="man/figures/logo.png" align="right" height="131" alt="{{{ pkgname }}} website" /></a>

<!-- badges: start -->
Expand All @@ -23,15 +22,29 @@ The goal of {{{ pkgname }}} is to ...

This package is part of the [hubverse](https://hubverse.io/en/latest/) ecosystem, which aims to provide a set of tools for infectious disease modeling hubs to share and collaborate on their work.

## Documentation

- Latest Release: https://{{{ organisation }}}.github.io/{{{ pkgname }}}/
- Stable Development Version: https://{{{ organisation }}}.github.io/{{{ pkgname }}}/dev/

## Installation
### Latest

You can install the [latest version of hubUtils from the R-universe](https://hubverse-org.r-universe.dev/{{{ pkgname }}}):

You can install the development version of {{{ pkgname }}} from [GitHub](https://github.com/) with:
```r
install.packages("{{{ pkgname }}}", repos = c("https://hubverse-org.r-universe.dev", "https://cloud.r-project.org"))
```

### Development

``` r
# install.packages("remotes")
If you want to test out new features that have not yet been released, you can install the development version of hubUtils from [GitHub](https://github.com/) with:

```r
remotes::install_github("{{{ organisation }}}/{{{ pkgname }}}")
```


## Example

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

0 comments on commit ff2cfc4

Please sign in to comment.