Skip to content

Commit 342ffd9

Browse files
committed
1.0.4
1 parent 6fcb3b6 commit 342ffd9

7 files changed

Lines changed: 20 additions & 71 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: Rapi
22
Type: Package
33
Title: Interface for Multiple Data Providers 'EDDS' and 'FRED'
4-
Version: 1.0.3
4+
Version: 1.0.4
55
Date: 2024-02-19
66
Authors@R: c(
77
person("Sermet", "Pekin", , "sermetpekin@gmail.com", role = c("aut", "cre" , "cph"))

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Rapi 1.0.4
2+
* Deleted a few development related verbose functions.
3+
14
# Rapi 1.0.3
25

36
* Initial CRAN submission. (previously named vyos)

R/01_sp_utils.R

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
check_early <- function() {
2-
devtools::check()
3-
}
1+
42
get_hash <- function(n = 50) {
53
a <- do.call(paste0, replicate(3, sample(LETTERS, n, TRUE), FALSE))
64
paste0(a, sprintf("%04d", sample(9999, n, TRUE)), sample(LETTERS, n, TRUE))
@@ -53,15 +51,19 @@ get_print_tibble <- function(x) {
5351
a <- utils::capture.output(print(x))
5452
paste0(a, collapse = "\n")
5553
}
54+
5655
assign_ <- function(name, data) {
56+
# development related function
5757
# assign(name , data , envir = rlang::global_env())
5858
}
5959
hash_func <- function(v) {
6060
g <- paste0(v, collapse = "_")
61-
name. <- digest::digest(g)
62-
name.
61+
digest::digest(g)
62+
6363
}
64+
6465
g <- glue::glue
66+
6567
get_safe <- function(item, env = rlang::global_env(), default = F) {
6668
sonuc <- default
6769
try(silent = T, {
@@ -91,13 +93,7 @@ is_bad <- function(item = NA) {
9193
inv <- function(...) {
9294
invisible(...)
9395
}
94-
gwrap <- function(..., env = rlang::caller_env(), color = crayon::blue) {
95-
.f <- function(...) {
96-
x <- glue::glue(..., .envir = env)
97-
color(x)
98-
}
99-
.f(...)
100-
}
96+
10197
enumerate <- function(items = c("a", "b", "c")) {
10298
rlist::list.zip(
10399
index = seq(len(items)),
@@ -156,9 +152,10 @@ create_cache_name_from_list <- function(dots) {
156152
v <- unlist(dots)
157153
h <- hash_func(v)
158154
}
155+
159156
success <- function(...) {
160157
args <- list(...)
161158
for (item in args) {
162-
cat(crayon::green$bold(paste("\n", item)))
159+
.green(paste("\n", item))
163160
}
164161
}

R/excel_internal.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ excel_internal <- function(
4343
return(invisible(1))
4444
}
4545
if (!inherits(dfs, "list") && !inherits(dfs, "data.frame")) {
46-
assign_("dbg_excel", dfs)
46+
4747
message_func("excel function requires data.frame or list of data.frames(1)")
4848
return(invisible(1))
4949
}
5050
if (!len(dfs)) {
51-
assign_("dbg_excel", dfs)
51+
5252
message_func("excel function requires data.frame or list of data.frames(2)")
5353
return(invisible(2))
5454
}

R/request_funcs.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ createUrlForSeries <- function(currentObj) {
146146
}
147147
# ...................................................... request_httr2_helper
148148
request_httr2_helper <- function(url, cache = TRUE) {
149-
assign_("d_url", url)
149+
150150
cache_name <- cache_name_format("request_httr2_helper", url)
151151
check <- check_cache_comp(cache_name, cache)
152152
if (check) {

R/response_evds.R

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ getLineEvdsResponse <- function(item) {
1010
list(date = unix_time, value = value)
1111
}
1212
getLineEvdsResponse_patch_week <- function(item) {
13-
assign_("d_item", item)
13+
1414
# $Tarih
1515
# [1] "06-01-1950"
1616
#
@@ -48,10 +48,7 @@ getLineEvdsResponse2 <- function(item) {
4848
new_list
4949
}
5050
getLineEvdsResponse3 <- function(item) {
51-
# item_name = "item"
52-
# if( !dynamic_exists( item_name)){
53-
# assign( "item" ,item, envir = .GlobalEnv )
54-
# }
51+
5552
# snames<- names_[ names_[c("Tarih" , "UNIXTIME")] ]
5653
names_ <- names(item)
5754
yliste <- list()
@@ -82,7 +79,7 @@ getLineEvdsResponse3 <- function(item) {
8279
}
8380
#
8481
convert_list_df_evds <- function(items, strategy = getLineEvdsResponse) {
85-
assign_("d_items", items)
82+
8683

8784
lines_ <- null
8885

R/zz_before_check.R

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)