Skip to content

Commit

Permalink
Merge pull request #39 from Metropolitan-Council/pkg-dev-class
Browse files Browse the repository at this point in the history
General updates from package development workshop
  • Loading branch information
eroten authored Aug 4, 2022
2 parents d56df29 + 6427539 commit d41ae81
Show file tree
Hide file tree
Showing 47 changed files with 560 additions and 516 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@
^inst/presentations/a_brief_introduction$
^doc$
^Meta$
^inst/r/key_setup\.R$
^\.vscode$
128 changes: 0 additions & 128 deletions .github/CODE_OF_CONDUCT.md

This file was deleted.

42 changes: 42 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Contributing to councilR

This outlines how to propose a change to councilR.
For more detailed info about contributing to this, and other tidyverse packages, please see the
[**development contributing guide**](https://rstd.io/tidy-contrib).

## Fixing typos

You can fix typos, spelling mistakes, or grammatical errors in the documentation directly using the GitHub web interface, as long as the changes are made in the _source_ file.
This generally means you'll need to edit [roxygen2 comments](https://roxygen2.r-lib.org/articles/roxygen2.html) in an `.R`, not a `.Rd` file.
You can find the `.R` file that generates the `.Rd` by reading the comment in the first line.

## Bigger changes

If you want to make a bigger change, it's a good idea to first file an issue and make sure someone from the team agrees that it’s needed.
If you’ve found a bug, please file an issue that illustrates the bug with a minimal
[reprex](https://www.tidyverse.org/help/#reprex) (this will also help you write a unit test, if needed).

### Pull request process

* Fork the package and clone onto your computer. If you haven't done this before, we recommend using `usethis::create_from_github("Metropolitan-Council/councilR", fork = TRUE)`.

* Install all development dependencies with `devtools::install_dev_deps()`, and then make sure the package passes R CMD check by running `devtools::check()`.
If R CMD check doesn't pass cleanly, it's a good idea to ask for help before continuing.
* Create a Git branch for your pull request (PR). We recommend using `usethis::pr_init("brief-description-of-change")`.

* Make your changes, commit to git, and then create a PR by running `usethis::pr_push()`, and following the prompts in your browser.
The title of your PR should briefly describe the change.
The body of your PR should contain `Fixes #issue-number`.

* For user-facing changes, add a bullet to the top of `NEWS.md` (i.e. just below the first header). Follow the style described in <https://style.tidyverse.org/news.html>.

### Code style

* New code should follow the tidyverse [style guide](https://style.tidyverse.org).
You can use the [styler](https://CRAN.R-project.org/package=styler) package to apply these styles, but please don't restyle code that has nothing to do with your PR.

* We use [roxygen2](https://cran.r-project.org/package=roxygen2), with [Markdown syntax](https://cran.r-project.org/web/packages/roxygen2/vignettes/rd-formatting.html), for documentation.

* We use [testthat](https://cran.r-project.org/package=testthat) for unit tests.
Contributions with test cases included are easier to accept.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ docs/
inst/doc
/doc/
/Meta/
inst/r/key_setup.R
14 changes: 8 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Type: Package
Package: councilR
Title: Functions and Templates for the Metropolitan Council
Version: 0.1.2.9001
Date: 2022-03-15
Version: 0.1.3
Date: 2022-08-01
Authors@R: c(
person("Metropolitan Council", role = "cph"),
person("Liz", "Roten", , "liz.roten@metc.state.mn.us", role = c("cre", "aut"),
Expand All @@ -13,13 +13,14 @@ Authors@R: c(
comment = c(ORCID = "0000-0002-4253-0910")),
person("Mauricio", "León", , "mauricio.leon@metc.state.mn.us", role = "ctb")
)
Description: A collection of commonly used templates, color palettes,
functions, and more!
Description: A collection of commonly used templates, color palettes, and
functions for R users at the Metropolitan Council.
License: MIT + file LICENSE
BugReports: https://github.com/Metropolitan-Council/councilR/issues
Depends:
R (>= 2.10)
Imports:
cli (>= 3.3.0),
DBI (>= 1.1.0),
fs (>= 1.4),
ggplot2 (>= 3.3.0),
Expand All @@ -31,14 +32,15 @@ Imports:
rstudioapi (>= 0.11),
sf (>= 0.9.5),
tictoc (>= 1.0),
tigris (>= 1.6.1),
utils
Suggests:
citr (>= 0.3.2),
cowplot (>= 1.1.1),
curl (>= 4.3.2),
details (>= 0.2.1),
httr2 (>= 0.2.1),
knitr (>= 1.37),
repmis (>= 0.5),
rmarkdown (>= 2.11),
stringr (>= 1.4.0),
testthat (>= 3.0.0),
Expand All @@ -55,5 +57,5 @@ Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.0
RoxygenNote: 7.2.1
Website: https://github.com/Metropolitan-Council/councilR
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
YEAR: 2021
YEAR: 2022
COPYRIGHT HOLDER: Metropolitan Council
6 changes: 4 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export("%>%")
export(council.pal)
export(council_pal2)
export(council_theme)
export(fetch_county_geo)
export(import_from_emissions)
export(import_from_gis)
export(import_from_gpkg)
Expand All @@ -16,6 +17,7 @@ importFrom(DBI,dbCanConnect)
importFrom(DBI,dbConnect)
importFrom(DBI,dbDisconnect)
importFrom(DBI,dbGetQuery)
importFrom(cli,cli_abort)
importFrom(fs,dir_create)
importFrom(fs,dir_exists)
importFrom(fs,dir_ls)
Expand All @@ -33,7 +35,6 @@ importFrom(ggplot2,element_text)
importFrom(ggplot2,margin)
importFrom(ggplot2,rel)
importFrom(ggplot2,theme)
importFrom(ggplot2,theme_minimal)
importFrom(ggplot2,unit)
importFrom(glue,glue)
importFrom(magrittr,"%>%")
Expand All @@ -42,12 +43,13 @@ importFrom(purrr,flatten)
importFrom(purrr,map)
importFrom(purrr,map_depth)
importFrom(purrr,reduce)
importFrom(rlang,warn)
importFrom(rlang,abort)
importFrom(sf,read_sf)
importFrom(sf,st_as_sf)
importFrom(sf,st_transform)
importFrom(tictoc,tic)
importFrom(tictoc,toc)
importFrom(tigris,counties)
importFrom(utils,download.file)
importFrom(utils,osVersion)
importFrom(utils,tail)
Expand Down
3 changes: 2 additions & 1 deletion R/blue_cascade.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
#'
#' @description A named list of background and text colors for cascading menus
#'
#' @format A named list of 8 lists. Each item contains a named list of two items:
#' @format A named list of 8 lists. Each item contains a named list
#' of two items:
#' - "background" is the background or fill color
#' - "color" is the text or contrast color
#' \describe{
Expand Down
Loading

0 comments on commit d41ae81

Please sign in to comment.