Skip to content
Merged
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
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: cnd
Title: Create and Register Conditions
Version: 0.1.1.9008
Version: 0.2.0
Authors@R:
person(
"Jordan Mark", "Barbone", ,
Expand Down
23 changes: 17 additions & 6 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# cnd (development version)
# cnd 0.2.0

## Breaking

- class names are now created as `"pkg::condition"` using `::` instead of `:`

## Features

- `condition(class = )` is now deprecated; instead `condition(name = )` should be use; `name` is now the first argument
- `condition(classes = )` is added to include additional condition classes
Expand All @@ -11,14 +17,19 @@
- `duplicate_error()`, `duplicate_warning()`
- `default_error()`
- `deprecated_warning()`
- `cnd_document()` no longer produces >80 character lines
- `condition(name)(message)` can be used to override default messages [#22](https://github.com/jmbarbone/cnd/issues/22)

## Fixes

- `cnd_document()`'s links to `{cnd}` are corrected [#25](https://github.com/jmbarbone/cnd/issues/25)
- `condition(message = )` now handles `...` and other arguments correctly [#23](https://github.com/jmbarbone/cnd/issues/23)
- `cnd_document()` no longer produces >80 character lines
- **internal**: documentation updates
- **internal**: test restructure for internal, testing package
- `conditions("pkg::condition/type")` now works [#18](https://github.com/jmbarbone/cnd/issues/18)
- `condition(name)(message)` can be used to override default messages [#22](https://github.com/jmbarbone/cnd/issues/22)
- **BREAKING** class names are now created as `"pkg::condition"` using `::` instead of `:`

## Internal

- documentation updates
- test restructure for internal, testing package

# cnd 0.1.1

Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ condition
#> $ class : <symbol>
#>
#> condition(s)
#> cnd:condition_as_character_error/error
#> cnd:condition_message_error/error
#> cnd:condition_message_generator_error/error
#> cnd:condition_overwrite_warning/warning
#> cnd:invalid_condition_error/error
#> cnd:match_arg/error
#> cnd:no_package_exports_warning/warning
#> cnd::condition_as_character_error/error
#> cnd::condition_message_error/error
#> cnd::condition_message_generator_error/error
#> cnd::condition_overwrite_warning/warning
#> cnd::invalid_condition_error/error
#> cnd::match_arg/error
#> cnd::no_package_exports_warning/warning
#>
#> For a list of conditions: `cnd::conditions()`
```
Expand Down Expand Up @@ -279,7 +279,7 @@ cat(cnd_section(cnd))
#>
#> \describe{
#>
#> \item{[`cnd:cnd_class_error/error`][cnd-cnd-conditions]}{
#> \item{[`cnd::cnd_class_error/error`][cnd-cnd-conditions]}{
#> [cnd::cnd()] simple calls the appropriate function: [base::stop()], [base::warning()], or [base::message()] based on the `type` parameter from [cnd::condition()].
#> }
#>
Expand All @@ -306,7 +306,7 @@ conditions("cnd", type = "warning")
```

#> cnd::condition_generator
#> cnd:cnd_document_conditions/warning
#> cnd::cnd_document_conditions/warning
#>
#> help
#> Documentation will fail when no conditions are found. You may be executing [cnd::cnd_document()] too early, before conditions have been registered. You can try to find your conditions with [cnd::conditions()].
Expand All @@ -315,7 +315,7 @@ conditions("cnd", type = "warning")
#> cnd::cnd_document()
#> --------------------------------------------------------------------------------
#> cnd::condition_generator
#> cnd:condition_overwrite_warning/warning
#> cnd::condition_overwrite_warning/warning
#>
#> generator
#> $ old : <symbol>
Expand All @@ -328,7 +328,7 @@ conditions("cnd", type = "warning")
#> cnd::condition()
#> --------------------------------------------------------------------------------
#> cnd::condition_generator
#> cnd:conditions_dots_warning/warning
#> cnd::conditions_dots_warning/warning
#>
#> help
#> The `...` parameter in [cnd::conditions()] is meant for convenience. Only a single argument is allowed. Other parameters must be named explicitly. For example: ```r # Instead of this conditions("class", "package") # "package" is ignored with a warning # Do this conditions(class = "class", package = "package") ```
Expand All @@ -337,7 +337,7 @@ conditions("cnd", type = "warning")
#> cnd::conditions()
#> --------------------------------------------------------------------------------
#> cnd::condition_generator
#> cnd:no_package_exports_warning/warning
#> cnd::no_package_exports_warning/warning
#>
#> help
#> The `exports` parameter requires a `package`
Expand Down
8 changes: 3 additions & 5 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
## R CMD check results
# CRAN comments

0 errors | 0 warnings | 1 note

* This is patch release
* This corrects current CRAN check errors
* This is minor release
* No expected breakage for CRAN packages
4 changes: 2 additions & 2 deletions tests/testthat/t0/R/t0-cnd-conditions.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# % Generated by cnd: do not edit by hand

#' @name t0-cnd-conditions
#' @aliases t0-cnd-conditions t0::bad_argument bad_argument t0:bad_argument/error
#' @aliases t0-cnd-conditions t0::bad_argument bad_argument t0::bad_argument/error
#' @title Conditions for `t0`
#'
#' @details
Expand All @@ -13,7 +13,7 @@
#'
#' @section `{t0}` conditions:
#'
#' \subsection{`t0:bad_argument/error`}{
#' \subsection{`t0::bad_argument/error`}{
#' \describe{
#' \item{package}{`{t0}`}
#' \item{class}{`t0::bad_argument`}
Expand Down
Loading