Skip to content

Commit

Permalink
Remove safe_get (#25)
Browse files Browse the repository at this point in the history
* Remove safe_get

* pre-commit autofixes

* Remove corresponding tests

* roxygenize

* Fix pre-commit

---------

Co-authored-by: grst <[email protected]>
  • Loading branch information
grst and grst authored Jan 13, 2025
1 parent b1a3879 commit 15dd6a4
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 279 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v0.7

### Backwards-incompatible changes

- Remove `safe_get`, because the `dsoParams` class already checks for existance of keys

## v0.6

### New Features
Expand Down
5 changes: 0 additions & 5 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export(init)
export(read_params)
export(reload)
export(repro)
export(safe_get)
export(set_stage)
export(stage_here)
exportClasses(dsoParams)
Expand All @@ -22,9 +21,5 @@ importFrom(glue,glue)
importFrom(here,here)
importFrom(here,i_am)
importFrom(methods,show)
importFrom(rlang,caller_env)
importFrom(rstudioapi,viewer)
importFrom(stringr,coll)
importFrom(stringr,str_match_all)
importFrom(stringr,str_replace)
importFrom(yaml,read_yaml)
153 changes: 0 additions & 153 deletions R/safe_get.R

This file was deleted.

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ The purpose of this package is to provide access to files and configuration orga
- `read_params(stage_path)` loads the configuration for the specified stage into an `dsoParams` R object which can be accessed like a list. The stage name must be relative to the project root. This function works independent of the current working directory, as long as you are in any subdirectory of the project.
- `reload(object)` reloads the config loaded by read_params. Usage: `reload(params)`
- `stage_here(rel_path)` is inspired by [here()](https://here.r-lib.org/). While `here()` resolves paths that are relative to the project root `stage_here()` resolves paths that are relative to the stage specified in `read_params`.
- `safe_get()` is a helper function assuring that a nested list call does not return NULL if accessed incorrectly. ' safe_get() will produce an error and point to the incorrectly accessed slot.

Additionally, `dso-r` provides an R interface to some of the most important CLI commands of `dso`.

Expand Down
28 changes: 0 additions & 28 deletions man/dot-convert_list_call_to_dollar_format.Rd

This file was deleted.

30 changes: 0 additions & 30 deletions man/safe_get.Rd

This file was deleted.

62 changes: 0 additions & 62 deletions tests/testthat/test-safe_get.R

This file was deleted.

0 comments on commit 15dd6a4

Please sign in to comment.