Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove safe_get #25

Merged
merged 5 commits into from
Jan 13, 2025
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
8 changes: 5 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# R specific hooks: https://github.com/lorenzwalthert/precommit
repos:
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.4.3
rev: v0.4.3.9003
hooks:
- id: style-files
args: [--style_pkg=styler, --style_fun=tidyverse_style, --scope=tokens]
Expand All @@ -12,8 +12,10 @@ repos:
- id: deps-in-desc
args: [--allow_private_imports]
- id: roxygenize
# workaround https://github.com/lorenzwalthert/precommit/issues/609
additional_dependencies: ["rstudioapi"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: end-of-file-fixer
exclude: '\.Rd'
Expand All @@ -27,7 +29,7 @@ repos:
- id: check-merge-conflict
args: [--assume-in-merge]
- repo: https://github.com/pre-commit-ci/pre-commit-ci-config
rev: v1.5.1
rev: v1.6.1
hooks:
# Only reuiqred when https://pre-commit.ci is used for config validation
- id: check-pre-commit-ci-config
Expand Down
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.

Loading