Skip to content

Commit

Permalink
Documentation, testing, README (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpbond authored Feb 2, 2024
1 parent 55d17aa commit 283b175
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 6 deletions.
9 changes: 7 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ Package: whattheflux
Type: Package
Title: What the Package Does (Title Case)
Version: 0.1.0
Author: Who wrote it
Maintainer: The package maintainer <[email protected]>
Authors@R: c(
person("Ben", "Bond-Lamberty", email = "[email protected]",
role = "aut", comment = c(ORCID = "0000-0001-9525-4633")),
person("Stephanie", "Wilson", email = "[email protected]",
role = "cre", comment = c(ORCID = "0000-0002-5484-0748")))
Description: More about what it does (maybe more than one line)
Use four spaces when indenting paragraphs within the Description.
URL: https://compass.pnnl.gov
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Suggests:
testthat (>= 3.0.0)
Config/testthat/edition: 3
RoxygenNote: 7.2.3
4 changes: 3 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
exportPattern("^[[:alpha:]]+")
# Generated by roxygen2: do not edit by hand

export(hello)
9 changes: 8 additions & 1 deletion R/hello.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Hello, world!
#
# This is an example function named 'hello'
# This is an example function named 'hello'
# which prints 'Hello, world!'.
#
# You can learn more about package authoring with RStudio at:
Expand All @@ -13,6 +13,13 @@
# Check Package: 'Cmd + Shift + E'
# Test Package: 'Cmd + Shift + T'

#' hello
#'
#' @return Nothing, just prints hello
#' @export
#'
#' @examples
#' hello()
hello <- function() {
print("Hello, world!")
}
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

# whattheflux

<!-- badges: start -->
[![R-CMD-check](https://github.com/COMPASS-DOE/whattheflux/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/COMPASS-DOE/whattheflux/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

The goal of whattheflux is to ...

## Installation

You can install the development version of whattheflux from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("COMPASS-DOE/whattheflux")
```

## Example

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

``` r
library(whattheflux)
## basic example code
```

9 changes: 7 additions & 2 deletions man/hello.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/testthat/test-hello.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
test_that("multiplication works", {
expect_equal(2 * 2, 4)
})
1 change: 1 addition & 0 deletions whattheflux.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ StripTrailingWhitespace: Yes
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageRoxygenize: rd,collate,namespace,vignette

0 comments on commit 283b175

Please sign in to comment.