Skip to content

Commit

Permalink
feat: rename package
Browse files Browse the repository at this point in the history
  • Loading branch information
jimbrig committed Jul 11, 2024
1 parent 10e0e64 commit 05e6144
Show file tree
Hide file tree
Showing 20 changed files with 180 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
^noclocksR\.Rproj$
^noclocksr\.Rproj$
^\.Rproj\.user$
^cliff\.toml$
^CHANGELOG\.md$
Expand Down
16 changes: 8 additions & 8 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Package: noclocksR
Title: What the Package Does (One Line, Title Case)
Package: noclocksr
Title: Internal Development at No Clocks, LLC
Version: 0.0.0.9000
Authors@R:
person("Jimmy", "Briggs", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-7489-8787"))
Description: No Clocks, LLC packaged assets and workflows
License: MIT + file LICENSE
URL: https://noclocks.github.io/noclocksR/,
https://docs.noclocks.dev/noclocksR/
URL: https://noclocks.github.io/noclocksr/,
https://docs.noclocks.dev/noclocksr/
Depends:
R (>= 2.10)
R (>= 4.1)
Imports:
assertthat,
cli,
Expand Down Expand Up @@ -47,13 +47,13 @@ Imports:
Suggests:
knitr,
rmarkdown,
testthat (>= 3.0.0)
testthat
VignetteBuilder:
knitr
Config/Needs/website: noclocks/noclocksR
Config/Needs/website: noclocks/noclocksr
Config/testthat/edition: 3
Encoding: UTF-8
Language: en-US
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2.9000
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ export(get_brand_logos)
export(get_favicon)
export(get_gitignore)
export(get_logo_file_name)
export(git_attributes)
export(git_config)
export(git_ignore)
export(parse_pdf_content)
export(process_pdfs)
export(shiny_resume_body)
Expand Down
2 changes: 1 addition & 1 deletion _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
url: https://docs.noclocks.dev/noclocksR/
url: https://docs.noclocks.dev/noclocksr/
home:
title: No Clocks Internal R Package
authors:
Expand Down
2 changes: 1 addition & 1 deletion examples/ex_shiny_resume.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
library(shiny)
# library(noclocksR)
# library(noclocksr)

ui <- function(request) {
shiny_resume_page(
Expand Down
10 changes: 5 additions & 5 deletions inst/rstudio/connections/local.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
library(noclocksR)
library(noclocksr)

noclocksR::set_config_file()
noclocksR::set_r_config("local")
noclocksr::set_config_file()
noclocksr::set_r_config("local")

db_config <- noclocksR::get_config("db")
db_config <- noclocksr::get_config("db")

connection <- noclocksR::db_connect(
connection <- noclocksr::db_connect(
db_config = db_config,
method = "DBI",
rstudio_connection = TRUE
Expand Down
2 changes: 1 addition & 1 deletion inst/standalone/standalone-db_connect.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ---
# repo: noclocks/noclocksR
# repo: noclocks/noclocksr
# file: standalone-db_connect.R
# last-updated:
# license: https://unlicense.org
Expand Down
2 changes: 1 addition & 1 deletion man/dot-onAttach.Rd

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

25 changes: 0 additions & 25 deletions man/noclocksR-package.Rd

This file was deleted.

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

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

2 changes: 1 addition & 1 deletion pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
url: https:/docs.noclocks.dev/noclocksR/
url: https:/docs.noclocks.dev/noclocksr/

home:
title: "No Clocks Internal R Package"
Expand Down
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(noclocksR)
library(noclocksr)

test_check("noclocksR")
test_check("noclocksr")
2 changes: 1 addition & 1 deletion vignettes/devenv.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ knitr::opts_chunk$set(
```

```{r setup}
library(noclocksR)
library(noclocksr)
```
2 changes: 1 addition & 1 deletion vignettes/integrations.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ knitr::opts_chunk$set(
```

```{r setup}
library(noclocksR)
library(noclocksr)
```
146 changes: 146 additions & 0 deletions vignettes/naming-conventions.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
---
title: "Naming Conventions"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Naming Conventions}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```

```{r setup}
```

# Naming Conventions in R

> *Note*
>
## File Naming Conventions

### R Files

Files containing R code (i.e. `*.R`) should be named using the following guidelines:

- Use lowercase letters and underscores, also known as `snake_case`.

- Use a descriptive name that clearly indicates the purpose of the file.

- Use a *"noun_verb"* syntax to clearly indicate the purpose of the primary object
the code within the file interacts with. This will help in grouping related functions
and code while also making it easier to navigate the codebase.

#### Example: Git Functions and Files

For example, in this package, we provide a variety of functions for working with
`git`. These functions are stored inside R files under the `R/` folder using the
naming syntax `git_*.R`. For example, `git_config.R`, `git_ignore.R`, `git_attributes.R`,
and so on.

The complete set of git R files and their corresponding exported functions are
as follows:

- `git_config.R`:
- `git_config_get()`
- `git_config_set()`
- `git_config_unset()`
- `git_config_list()`
- `git_config_assert()`
- `git_config_path()`
- `git_config_edit()`

- `git_ignore.R`:
- `git_ignore()` (alias for `git_ignore_add()`)
- `git_ignore_add()`
- `git_ignore_remove()`
- `git_ignore_list()`
- `git_ignore_assert()`
- `git_ignore_path()`
- `git_ignore_edit()`

- `git_attributes.R`:
- `git_attributes()` (alias for `git_attributes_add()`)
- `git_attributes_add()`
- `git_attributes_remove()`
- `git_attributes_list()`
- `git_attributes_assert()`
- `git_attributes_path()`
- `git_attributes_edit()`

- `git_hooks.R`:
- `git_hooks()` (alias for `git_hooks_add()`)
- `git_hooks_add()`
- `git_hooks_remove()`
- `git_hooks_list()`
- `git_hooks_assert()`
- `git_hooks_path()`
- `git_hooks_edit()`

- `git_init.R`:
- `git_init()`

You can see that the naming convention `git_*.R` helps in grouping related functions
together and makes it easier to navigate the codebase.

### Vignettes and RMarkdown

Vignettes and RMarkdown files should be named using the following guidelines:

### Data Files

Data files should be named using the following guidelines:

### Tests

Test files should be named using the following guidelines:

### Documentation

Documentation files should be named using the following guidelines:

#### Roxygen Documentation

Roxygen function documentation should be named using the following guidelines:

## Function Naming Conventions

### Function Names

Function names should be named using the following guidelines:

### Argument Names

Function argument names should be named using the following guidelines:

### Return Values

Function return values should be named using the following guidelines:

## Variable Naming Conventions

### Variable Names

Variable names should be named using the following guidelines:

### Constants

Constants should be named using the following guidelines:

## Package Naming Conventions

### Package Names

Package names should be named using the following guidelines:

### Namespace

Namespace files should be named using the following guidelines:

## Project Naming Conventions
6 changes: 3 additions & 3 deletions vignettes/noclocksR.Rmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "noclocksR"
title: "noclocksr"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{noclocksR}
%\VignetteIndexEntry{noclocksr}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
Expand All @@ -15,5 +15,5 @@ knitr::opts_chunk$set(
```

```{r setup}
library(noclocksR)
library(noclocksr)
```
2 changes: 1 addition & 1 deletion vignettes/pkgdevt.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ knitr::opts_chunk$set(
```

```{r setup}
library(noclocksR)
library(noclocksr)
```
2 changes: 1 addition & 1 deletion vignettes/plumber.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ knitr::opts_chunk$set(
```

```{r setup}
library(noclocksR)
library(noclocksr)
```
2 changes: 1 addition & 1 deletion vignettes/shiny.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ knitr::opts_chunk$set(
```

```{r setup}
# library(noclocksR)
# library(noclocksr)
```

## Shiny Concepts
Expand Down
2 changes: 1 addition & 1 deletion vignettes/styleguide.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ knitr::opts_chunk$set(
```

```{r setup}
library(noclocksR)
library(noclocksr)
```

0 comments on commit 05e6144

Please sign in to comment.