Skip to content

Initial package infrastructure #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
^docs$
^pkgdown$
^tools$
^air.toml$
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ jobs:
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
error-on: '"note"'
error-on: '"warning"'
18 changes: 7 additions & 11 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
Package: ji.rpkg.template
Title: Your Package Title in Title Case
Package: vimclimate
Title: Access Climate Data Time-series from the Vaccine Impact Modelling
Consortium
Version: 0.0.0.9000
Authors@R: c(
Authors@R:
person("Pratik", "Gupte", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-5294-7819")),
person("Abdul Latif Jameel Institute for Disease and Emergency Analytics", role = "fnd"),
person("Imperial College of Science, Technology and Medicine", role = c("cph", "fnd"))
)
Description: Your package description. It must end with a period (".") and
include relevant bibliographical references if applicable, using the
following format: Author et al. (2023) <doi:10.5281/zenodo.6619350>.
comment = c(ORCID = "0000-0001-5294-7819"))
Description: Access pre-made climate data time-series.
License: MIT + file LICENSE
URL: https://github.com/vimc/vimclimate, https://vimc.github.io/vimclimate
Suggests:
knitr,
rmarkdown,
spelling,
testthat (>= 3.0.0)
VignetteBuilder:
knitr
Config/Needs/website: jameel-institute/jameelinst.rpkg.theme
Config/testthat/edition: 3
Encoding: UTF-8
Language: en-GB
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
YEAR: 2024
COPYRIGHT HOLDER: ji.rpkg.template authors
YEAR: 2025
COPYRIGHT HOLDER: Imperial College of Science, Technology and Medicine
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License

Copyright (c) 2024 ji.rpkg.template authors
Copyright (c) 2025 Imperial College of Science, Technology and Medicine

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 2 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# ji.rpkg.template 0.0.1
# vimclimate (development version)

* This project now includes a
[`NEWS.md`](https://r-pkgs.org/other-markdown.html#sec-news) file to inform
users about changes and new features.
- Initial package infrastructure from template.
File renamed without changes.
58 changes: 23 additions & 35 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,58 +15,46 @@ knitr::opts_chunk$set(
)
```

# ji.rpkg.template: TAGLINE
# vimclimate: Access climate data time-series from the Vaccine Impact Modelling Consortium

<!-- badges: start -->
[![Project Status: Concept Minimal or no implementation has been done yet, or the repository is only intended to be a limited example, demo, or proof-of-concept.](https://www.repostatus.org/badges/latest/concept.svg)](https://www.repostatus.org/#concept)
[![R build status](https://github.com/jameel-institute/ji.rpkg.template/workflows/R-CMD-check/badge.svg)](https://github.com/jameel-institute/ji.rpkg.template/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/jameel-institute/ji.rpkg.template/branch/main/graph/badge.svg)](https://app.codecov.io/gh/jameel-institute/ji.rpkg.template?branch=main)
[![CRAN status](https://www.r-pkg.org/badges/version/ji.rpkg.template)](https://CRAN.R-project.org/package=ji.rpkg.template)
[![Project Status: Concept - Minimal or no implementation has been done yet, or the repository is only intended to be a limited example, demo, or proof-of-concept.](https://www.repostatus.org/badges/latest/concept.svg)](https://www.repostatus.org/#concept)
[![R build status](https://github.com/vimc/vimclimate/workflows/R-CMD-check/badge.svg)](https://github.com/vimc/vimclimate/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/vimc/vimclimate/branch/main/graph/badge.svg)](https://app.codecov.io/gh/vimc/vimclimate?branch=main)
[![CRAN status](https://www.r-pkg.org/badges/version/vimclimate)](https://CRAN.R-project.org/package=vimclimate)
<!-- badges: end -->

_ji.rpkg.template_ is a template package and repository on which future Jameel Institute packages are based.

To use this template, select _ji.rpkg.template_ from the drop-down menu under **Repository template** when creating a new repository in the Jameel Institute organisation.
Replace all instances of "ji.rpkg.template" with your package name. Make sure to also:

1. Edit the `DESCRIPTION` as appropriate with the correct package information;

2. Edit the files in `R/`, `tests/`, and `vignettes/` to suit your package;

3. Remove these instructions from `README.Rmd`, and re-render the `.md` file using `devtools::render_readme()`.
_vimclimate_ is an R package that helps access pre-made climatic variable time-series data for use in modelling.

## Installation

**NOTE:** Remove or comment out installation sources as appropriate.

You can install the development version of ji.rpkg.template from the Jameel Institute R-universe with:
You can install the development version of _vimclimate_ from GitHub [GitHub](https://github.com/) using the _pak_ package:

```r
# installation from R-universe
# install.packages(
# "ji.rpkg.template",
# repos = c(
# "https://jameel-institute.r-universe.dev", "https://cloud.r-project.org"
# )
# )
``` r
install.packages("pak")
pak::pak("vimc/vimclimate")
```

or from GitHub [GitHub](https://github.com/) with:
<!-- the [VIMC R-universe](https://vimc.r-universe.dev/) with:

``` r
# install.packages("pak")
# pak::pak("jameel-institute/ji.rpkg.template")
```r
installation from R-universe
install.packages(
"vimclimate",
repos = c(
"https://vimc.r-universe.dev", "https://cloud.r-project.org"
)
)
```

or from -->

## Quick start

Add a simple example of using the package's main feature(s) here, with a minimum amount of code.
If preparatory or plotting steps are needed, prefer to hide them to keep focus on the package functionality.
WIP.

## Related projects

Add information and links to related projects, such as research papers or packages, here.
- [_clim2parquet_](https://vimc.github.io/clim2parquet/): Used to prepare climate data in Parquet format; this is the data accessed by _vimclimate_.

## References

Space for references: REMOVE this text.
69 changes: 25 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,74 +1,55 @@

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

# ji.rpkg.template: TAGLINE
# vimclimate: Access climate data time-series from the Vaccine Impact Modelling Consortium

<!-- badges: start -->

[![Project Status: Concept Minimal or no implementation has been done
[![Project Status: Concept - Minimal or no implementation has been done
yet, or the repository is only intended to be a limited example, demo,
or
proof-of-concept.](https://www.repostatus.org/badges/latest/concept.svg)](https://www.repostatus.org/#concept)
[![R build
status](https://github.com/jameel-institute/ji.rpkg.template/workflows/R-CMD-check/badge.svg)](https://github.com/jameel-institute/ji.rpkg.template/actions/workflows/R-CMD-check.yaml)
status](https://github.com/vimc/vimclimate/workflows/R-CMD-check/badge.svg)](https://github.com/vimc/vimclimate/actions/workflows/R-CMD-check.yaml)
[![Codecov test
coverage](https://codecov.io/gh/jameel-institute/ji.rpkg.template/branch/main/graph/badge.svg)](https://app.codecov.io/gh/jameel-institute/ji.rpkg.template?branch=main)
coverage](https://codecov.io/gh/vimc/vimclimate/branch/main/graph/badge.svg)](https://app.codecov.io/gh/vimc/vimclimate?branch=main)
[![CRAN
status](https://www.r-pkg.org/badges/version/ji.rpkg.template)](https://CRAN.R-project.org/package=ji.rpkg.template)
status](https://www.r-pkg.org/badges/version/vimclimate)](https://CRAN.R-project.org/package=vimclimate)
<!-- badges: end -->

*ji.rpkg.template* is a template package and repository on which future
Jameel Institute packages are based.

To use this template, select *ji.rpkg.template* from the drop-down menu
under **Repository template** when creating a new repository in the
Jameel Institute organisation. Replace all instances of
“ji.rpkg.template” with your package name. Make sure to also:

1. Edit the `DESCRIPTION` as appropriate with the correct package
information;

2. Edit the files in `R/`, `tests/`, and `vignettes/` to suit your
package;

3. Remove these instructions from `README.Rmd`, and re-render the `.md`
file using `devtools::render_readme()`.
*vimclimate* is an R package that helps access pre-made climatic
variable time-series data for use in modelling.

## Installation

**NOTE:** Remove or comment out installation sources as appropriate.

You can install the development version of ji.rpkg.template from the
Jameel Institute R-universe with:
You can install the development version of *vimclimate* from GitHub
[GitHub](https://github.com/) using the *pak* package:

``` r
# installation from R-universe
# install.packages(
# "ji.rpkg.template",
# repos = c(
# "https://jameel-institute.r-universe.dev", "https://cloud.r-project.org"
# )
# )
install.packages("pak")
pak::pak("vimc/vimclimate")
```

or from GitHub [GitHub](https://github.com/) with:

``` r
# install.packages("pak")
# pak::pak("jameel-institute/ji.rpkg.template")
<!-- the [VIMC R-universe](https://vimc.r-universe.dev/) with:
&#10;```r
installation from R-universe
install.packages(
"vimclimate",
repos = c(
"https://vimc.r-universe.dev", "https://cloud.r-project.org"
)
)
```
&#10;or from -->

## Quick start

Add a simple example of using the package’s main feature(s) here, with a
minimum amount of code. If preparatory or plotting steps are needed,
prefer to hide them to keep focus on the package functionality.
WIP.

## Related projects

Add information and links to related projects, such as research papers
or packages, here.
- [*clim2parquet*](https://vimc.github.io/clim2parquet/): Used to
prepare climate data in Parquet format; this is the data accessed by
*vimclimate*.

## References

Space for references: REMOVE this text.
5 changes: 2 additions & 3 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# NOTE: Update the `url` field as needed
# e.g. "https://jameel-institute.github.io/daedalus/"
url: ~
# e.g. "https://vimc.github.io/vimclimate/"
url: https://vimc.github.io/vimclimate/
template:
bootstrap: 5
package: jameelinst.rpkg.theme
Empty file added air.toml
Empty file.
8 changes: 4 additions & 4 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Codecov
Jameel
ORCID
TAGLINE
Un
VIMC
WIP
clim
doi
ji
pak
pkgdown
rpkg
zenodo
21 changes: 0 additions & 21 deletions man/ji.rpkg.template-package.Rd

This file was deleted.

23 changes: 23 additions & 0 deletions man/vimclimate-package.Rd

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

3 changes: 2 additions & 1 deletion tests/spelling.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
if (requireNamespace("spelling", quietly = TRUE)) {
spelling::spell_check_test(
vignettes = TRUE, error = FALSE,
vignettes = TRUE,
error = FALSE,
skip_on_cran = TRUE
)
}
4 changes: 2 additions & 2 deletions tests/testthat.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
# * https://testthat.r-lib.org/articles/special-files.html

library(testthat)
library(ji.rpkg.template)
library(vimclimate)

test_check("ji.rpkg.template")
test_check("vimclimate")
22 changes: 11 additions & 11 deletions tests/testthat/helper-state.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ get_pars_toreset <- function() {
if (getRversion() >= "4.0.0") {
testthat::set_state_inspector(function() {
list(
attached = search(),
attached = search(),
connections = getAllConnections(),
cwd = getwd(),
envvars = Sys.getenv(),
handlers = globalCallingHandlers(),
libpaths = .libPaths(),
locale = Sys.getlocale(),
options = options(),
par = get_pars_toreset(),
packages = .packages(all.available = TRUE),
sink = sink.number(),
timezone = Sys.timezone(),
cwd = getwd(),
envvars = Sys.getenv(),
handlers = globalCallingHandlers(),
libpaths = .libPaths(),
locale = Sys.getlocale(),
options = options(),
par = get_pars_toreset(),
packages = .packages(all.available = TRUE),
sink = sink.number(),
timezone = Sys.timezone(),
NULL
)
})
Expand Down
6 changes: 3 additions & 3 deletions vignettes/ji-rpkg-template.Rmd → vignettes/vimclimate.Rmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "ji-rpkg-template"
title: "Getting started with vimclimate"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{ji-rpkg-template}
%\VignetteIndexEntry{Getting started with vimclimate}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
Expand All @@ -15,7 +15,7 @@ knitr::opts_chunk$set(
```

```{r setup}
library(ji.rpkg.template)
library(vimclimate)
```

This is a special vignette, which shares the same name as the package.
Expand Down
File renamed without changes.