Skip to content

Commit 1807898

Browse files
committed
chore: bump version and improve compatibility
- Bump version to 0.0.6 - Replace lambda syntax with function() for R 4.0 compatibility - Fix README badge and update description - Fix version_update workflow to conditionally add README.Rmd
1 parent 5b2fe8c commit 1807898

4 files changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/version_update.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,11 @@ jobs:
134134
- name: Commit and tag
135135
if: steps.version_bump.outputs.type != 'none'
136136
run: |
137-
git add DESCRIPTION README.md README.Rmd 2>/dev/null || true
137+
git add DESCRIPTION README.md 2>/dev/null || true
138+
139+
if [ -f README.Rmd ]; then
140+
git add README.Rmd
141+
fi
138142
139143
if git diff --staged --quiet; then
140144
echo "No changes to commit."

R/standalone-args_to_func.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ match_func_to_args <- function(
189189

190190
guess <- imap(
191191
.x = func_formals,
192-
.f = \(lst, func_name) {
192+
.f = function(lst, func_name) {
193193
has_dots <- "..." %in% names(lst)
194194
has_these_args <- names(lst) %in% names(args_list)
195195
positions <- which(has_these_args)
@@ -229,7 +229,7 @@ match_func_to_args <- function(
229229
# handle strict matching: funcs that can exactly match all args
230230
logical_vec <- vapply(
231231
X = func_formals,
232-
FUN = \(lst) {
232+
FUN = function(lst) {
233233
modified <- utils::modifyList(lst, args_list, keep.null = TRUE)
234234
if (length(modified) != length(lst)) FALSE else TRUE
235235
},

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![Lifecycle:experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
55
[![CRAN status](https://www.r-pkg.org/badges/version/rpkgkit)](https://CRAN.R-project.org/package=rpkgkit)
66
[![R-CMD-check](https://github.com/WangLabCSU/rpkgkit/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/WangLabCSU/rpkgkit/actions/workflows/R-CMD-check.yaml)
7-
"[![Devel version](https://img.shields.io/badge/devel%20version-0.0.6-blue.svg)](https://github.com/WangLabCSU/rpkgkit)"
7+
[![Devel version](https://img.shields.io/badge/devel%20version-0.0.6-blue.svg)](https://github.com/WangLabCSU/rpkgkit)
88
[![Codecov testcoverage](https://codecov.io/gh/WangLabCSU/rpkgkit/graph/badge.svg)](https://app.codecov.io/gh/WangLabCSU/rpkgkit)
99
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/WangLabCSU/rpkgkit)
1010
<!-- badges: end -->
@@ -242,7 +242,7 @@ news_md_check()
242242
# [4] "Line 14: Longer entries should end with punctuation"
243243
```
244244

245-
- `news_md_show()` - Display NEWS.md content of a package in console
245+
- `news_md_show()` - Display NEWS.md content of a package in console with color
246246

247247
### Other Utilities
248248

inst/workflow/version_update.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,11 @@ jobs:
134134
- name: Commit and tag
135135
if: steps.version_bump.outputs.type != 'none'
136136
run: |
137-
git add DESCRIPTION README.md README.Rmd 2>/dev/null || true
137+
git add DESCRIPTION README.md 2>/dev/null || true
138+
139+
if [ -f README.Rmd ]; then
140+
git add README.Rmd
141+
fi
138142
139143
if git diff --staged --quiet; then
140144
echo "No changes to commit."

0 commit comments

Comments
 (0)