Skip to content

Commit

Permalink
Merge pull request #14 from katilingban/dev
Browse files Browse the repository at this point in the history
add hex sticker
  • Loading branch information
ernestguevarra authored Apr 22, 2024
2 parents 2cf3f75 + 2fb9403 commit a5c8be6
Show file tree
Hide file tree
Showing 12 changed files with 163 additions and 25 deletions.
4 changes: 4 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Imports:
jsonlite,
stringr,
withr
Suggests:
spelling
Encoding: UTF-8
Language: en-GB
LazyData: true
RoxygenNote: 7.3.1
Roxygen: list(markdown = TRUE)
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

export(add_badge_codefactor)
export(add_badge_status)
export(add_badge_zenodo)
export(add_contributing)
export(add_issue_template)
export(add_logo)
export(add_zenodo_badge)
importFrom(jsonlite,fromJSON)
importFrom(stringr,str_detect)
importFrom(stringr,str_replace_all)
Expand Down
2 changes: 1 addition & 1 deletion R/add_badge.R
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ add_badge_codefactor <- function(repo = NULL,
#' @export
#'

add_zenodo_badge <- function(repo = NULL,
add_badge_zenodo <- function(repo = NULL,
path = NULL) {
## Determine repo ----
if (is.null(repo))
Expand Down
56 changes: 50 additions & 6 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@ Currently, `pakete` includes functions for:

1. creating GitHub checklists for tasks in the package submission process;

2. creating `_pkgdown.yml` templates for projects that I work on;
2. creating `CONTRIBUTING.md` file;

3. creating line snippets for `DESCRIPTION` file;
3. adding `repostatus` badge; and,

4. creating `CONTRIBUTING.md` file;

5. adding `repostatus` badge;
4. adding Zenodo DOI badge.

## Installation

Expand All @@ -52,6 +50,52 @@ install.packages(

## Usage

### Creating GitHub issues checklist template for CRAN submissions

It is useful for some to have a checklist of tasks to be done as part of the CRAN submission process. The [*Releasing to CRAN* chapter](https://r-pkgs.org/release.html) of second edition of the R packages book provides good templates for tasks to do for an [initial CRAN release](https://r-pkgs.org/release.html#sec-release-initial), an [update CRAN release](https://r-pkgs.org/release.html#keeping-up-with-change), a [submission of package to CRAN](https://r-pkgs.org/release.html#sec-release-process), and a [post-acceptance to CRAN](https://r-pkgs.org/release.html#sec-release-post-acceptance).

The function `add_issue_template()` assists in creating a GitHub issue template for your package repository for each of these stages of preparing for, submitting to, and getting accepted by CRAN. So, if you want to setup an issues checklist that you can use for preparing to submit to CRAN for an initial release, use:

```{r issue-template, eval = FALSE}
library(pakete)
add_issue_template("initial-cran-release")
```

This will create a markdown file called `initial-cran-release.md` inside the `.github/ISSUE_TEMPLATE` directory (this will be created if it doesn't exist yet) which is where GitHub looks for issue templates to use.

Then, once you commit and push this to your GitHub remote repository and merge it to your `main` branch, you will now see a choice of **Initial CRAN release** to use as a template whenever you open a new issue.

### Creating a CONTRIBUTING.md file

If you need help with getting specific language for a `CONTRIBUTING.md` document in your repository, you may want to consider using the template available from this package as follows:

```{r contributing-file, eval = FALSE}
add_contributing(repo = "YOUR_GITHUB_USERNAME/YOUR_REPO_NAME")
```

This will create a `CONTRIBUTING.md` file within the `.github` directory (this will be created if it doesn't exist). Do note that the contributing process described in this markdown document is the preferred process of those who developed the `pakete` package. If you are starting out and need something to use or somethign to build on, then this can help.

### Adding a `repostatus` badge

If you would like to add one of the badges from [`repostatus`](https://www.repostatus.org/) to signify the development status of your project, you can do so as follows:

```{r repostatus-badge, eval = FALSE}
add_badge_status("wip")
```

This will add a status badge to your README file in the block where badges are usually placed.

### Adding a Zenodo badge

If you use Zenodo and would like to add a Zenodo badge to your README (even if you haven't made a release for your repository/project), you can use the `add_badge_zenodo()` function as follows:

```{r zenodo-badge, eval = FALSE}
add_badge_zenodo(repo = "YOUR_GITHUB_USERNAME/YOUR_REPO_NAME")
```

This will add a Zenodo badge to your README file in the block were badges are usually placed. Please note that whilst this can be used to add a Zenodo badge even if you haven't made a GitHub release yet, the actual badge will only appear and the DOI assigned to your repository will only be issued once you have made your first GitHub release. Hence, you should only do this either as a post-acceptance to CRAN step when you will make your first GitHub release after your CRAN release or as part of a GitHub pre-release to activate a DOI for your repository. It would not be advisable to add this badge to your README without a GitHub release before you submit to CRAN as you will have check errors in relation to the Zenodo release URL.

## Citation

If you find the `pakete` package useful please cite using the suggested citation provided by a call to the `citation()` function as follows:
Expand All @@ -64,5 +108,5 @@ citation("pakete")

Feedback, bug reports and feature requests are welcome; file issues or seek support [here](https://github.com/katilingban/pakete/issues). If you would like to contribute to the package, please see our [contributing guidelines](https://katilingban.io/pakete/CONTRIBUTING.html).

Please note that the `paketa` project is released with a [Contributor Code of Conduct](https://katilingban.io/pakete/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.
Please note that the `pakete` project is released with a [Contributor Code of Conduct](https://katilingban.io/pakete/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.

97 changes: 91 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,11 @@ Currently, `pakete` includes functions for:
1. creating GitHub checklists for tasks in the package submission
process;

2. creating `_pkgdown.yml` templates for projects that I work on;
2. creating `CONTRIBUTING.md` file;

3. creating line snippets for `DESCRIPTION` file;
3. adding `repostatus` badge; and,

4. creating `CONTRIBUTING.md` file;

5. adding `repostatus` badge;
4. adding Zenodo DOI badge.

## Installation

Expand All @@ -49,6 +47,93 @@ install.packages(

## Usage

### Creating GitHub issues checklist template for CRAN submissions

It is useful for some to have a checklist of tasks to be done as part of
the CRAN submission process. The [*Releasing to CRAN*
chapter](https://r-pkgs.org/release.html) of second edition of the R
packages book provides good templates for tasks to do for an [initial
CRAN release](https://r-pkgs.org/release.html#sec-release-initial), an
[update CRAN
release](https://r-pkgs.org/release.html#keeping-up-with-change), a
[submission of package to
CRAN](https://r-pkgs.org/release.html#sec-release-process), and a
[post-acceptance to
CRAN](https://r-pkgs.org/release.html#sec-release-post-acceptance).

The function `add_issue_template()` assists in creating a GitHub issue
template for your package repository for each of these stages of
preparing for, submitting to, and getting accepted by CRAN. So, if you
want to setup an issues checklist that you can use for preparing to
submit to CRAN for an initial release, use:

``` r
library(pakete)

add_issue_template("initial-cran-release")
```

This will create a markdown file called `initial-cran-release.md` inside
the `.github/ISSUE_TEMPLATE` directory (this will be created if it
doesn’t exist yet) which is where GitHub looks for issue templates to
use.

Then, once you commit and push this to your GitHub remote repository and
merge it to your `main` branch, you will now see a choice of **Initial
CRAN release** to use as a template whenever you open a new issue.

### Creating a CONTRIBUTING.md file

If you need help with getting specific language for a `CONTRIBUTING.md`
document in your repository, you may want to consider using the template
available from this package as follows:

``` r
add_contributing(repo = "YOUR_GITHUB_USERNAME/YOUR_REPO_NAME")
```

This will create a `CONTRIBUTING.md` file within the `.github` directory
(this will be created if it doesn’t exist). Do note that the
contributing process described in this markdown document is the
preferred process of those who developed the `pakete` package. If you
are starting out and need something to use or somethign to build on,
then this can help.

### Adding a `repostatus` badge

If you would like to add one of the badges from
[`repostatus`](https://www.repostatus.org/) to signify the development
status of your project, you can do so as follows:

``` r
add_badge_status("wip")
```

This will add a status badge to your README file in the block where
badges are usually placed.

### Adding a Zenodo badge

If you use Zenodo and would like to add a Zenodo badge to your README
(even if you haven’t made a release for your repository/project), you
can use the `add_badge_zenodo()` function as follows:

``` r
add_badge_zenodo(repo = "YOUR_GITHUB_USERNAME/YOUR_REPO_NAME")
```

This will add a Zenodo badge to your README file in the block were
badges are usually placed. Please note that whilst this can be used to
add a Zenodo badge even if you haven’t made a GitHub release yet, the
actual badge will only appear and the DOI assigned to your repository
will only be issued once you have made your first GitHub release. Hence,
you should only do this either as a post-acceptance to CRAN step when
you will make your first GitHub release after your CRAN release or as
part of a GitHub pre-release to activate a DOI for your repository. It
would not be advisable to add this badge to your README without a GitHub
release before you submit to CRAN as you will have check errors in
relation to the Zenodo release URL.

## Citation

If you find the `pakete` package useful please cite using the suggested
Expand Down Expand Up @@ -80,6 +165,6 @@ you would like to contribute to the package, please see our
[contributing
guidelines](https://katilingban.io/pakete/CONTRIBUTING.html).

Please note that the `paketa` project is released with a [Contributor
Please note that the `pakete` project is released with a [Contributor
Code of Conduct](https://katilingban.io/pakete/CODE_OF_CONDUCT.html). By
contributing to this project, you agree to abide by its terms.
12 changes: 6 additions & 6 deletions man/add_badge.Rd

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

2 changes: 1 addition & 1 deletion man/add_contributing.Rd

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

6 changes: 3 additions & 3 deletions man/add_issue.Rd

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

2 changes: 1 addition & 1 deletion man/add_logo.Rd

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

Binary file added man/figures/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions man/pakete.Rd

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

3 changes: 3 additions & 0 deletions tests/spelling.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if(requireNamespace('spelling', quietly = TRUE))
spelling::spell_check_test(vignettes = TRUE, error = FALSE,
skip_on_cran = TRUE)

0 comments on commit a5c8be6

Please sign in to comment.