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
53 changes: 5 additions & 48 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,50 +1,7 @@
# History files
```
# R package specific ignores
*.Rproj.user/
.Rhistory
.Rapp.history

# Session Data files
.RData
.RDataTmp

# User-specific files
.Ruserdata

# Example code in package build process
*-Ex.R

# Output files from R CMD build
/*.tar.gz

# Output files from R CMD check
/*.Rcheck/

# RStudio files
.Rproj.user/

# produced vignettes
vignettes/*.html
vignettes/*.pdf

# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3
.httr-oauth

# knitr and R markdown default cache directories
*_cache/
/cache/

# Temporary files created by R markdown
*.utf8.md
*.knit.md

# R Environment Variables
.Renviron

# pkgdown site
docs/

# translation temp files
po/*~

# RStudio Connect folder
rsconnect/
.Rproj.user
.Rproj
```
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ export(create_standalone)
export(flir_fix)
export(inquire_standalone)
export(make_func_call_explicit)
export(news_md_add_entry)
export(news_md_check)
export(news_md_show)
export(render_rmd)
12 changes: 12 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# rpkgkit 0.0.0.9000 (2024-01-15)

## NEW FEATURES

* Added `air_format()` function for code formatting using air.
* Added `flir_fix()` function for automatic linting fixes.
* Created standalone file management system for importing utilities.
* Added NEWS.md management functions (`news_md_add_entry()`, `news_md_check()`, `news_md_show()`) (@rpkgkit).

## BUG FIXES

* Fixed path handling in standalone file creation (@githubuser).
13 changes: 13 additions & 0 deletions R/01_file_path_utils.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
is_pkg <- function(path) {
dir.exists(path) && file.exists(file.path(path, "DESCRIPTION"))
}

get_wd <- function() {
if (rlang::is_installed("rstudioapi") && interactive()) {
current_wd <- dirname(rstudioapi::getActiveDocumentContext()$path)
} else {
current_wd <- getwd()
}
if (is_pkg(dirname(current_wd))) {
dirname(current_wd)
} else {
current_wd
}
}
Loading
Loading