Skip to content

Commit

Permalink
1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
SermetPekin committed Feb 23, 2024
1 parent 6fcb3b6 commit 342ffd9
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 71 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: Rapi
Type: Package
Title: Interface for Multiple Data Providers 'EDDS' and 'FRED'
Version: 1.0.3
Version: 1.0.4
Date: 2024-02-19
Authors@R: c(
person("Sermet", "Pekin", , "[email protected]", role = c("aut", "cre" , "cph"))
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Rapi 1.0.4
* Deleted a few development related verbose functions.

# Rapi 1.0.3

* Initial CRAN submission. (previously named vyos)
23 changes: 10 additions & 13 deletions R/01_sp_utils.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
check_early <- function() {
devtools::check()
}

get_hash <- function(n = 50) {
a <- do.call(paste0, replicate(3, sample(LETTERS, n, TRUE), FALSE))
paste0(a, sprintf("%04d", sample(9999, n, TRUE)), sample(LETTERS, n, TRUE))
Expand Down Expand Up @@ -53,15 +51,19 @@ get_print_tibble <- function(x) {
a <- utils::capture.output(print(x))
paste0(a, collapse = "\n")
}

assign_ <- function(name, data) {
# development related function
# assign(name , data , envir = rlang::global_env())
}
hash_func <- function(v) {
g <- paste0(v, collapse = "_")
name. <- digest::digest(g)
name.
digest::digest(g)

}

g <- glue::glue

get_safe <- function(item, env = rlang::global_env(), default = F) {
sonuc <- default
try(silent = T, {
Expand Down Expand Up @@ -91,13 +93,7 @@ is_bad <- function(item = NA) {
inv <- function(...) {
invisible(...)
}
gwrap <- function(..., env = rlang::caller_env(), color = crayon::blue) {
.f <- function(...) {
x <- glue::glue(..., .envir = env)
color(x)
}
.f(...)
}

enumerate <- function(items = c("a", "b", "c")) {
rlist::list.zip(
index = seq(len(items)),
Expand Down Expand Up @@ -156,9 +152,10 @@ create_cache_name_from_list <- function(dots) {
v <- unlist(dots)
h <- hash_func(v)
}

success <- function(...) {
args <- list(...)
for (item in args) {
cat(crayon::green$bold(paste("\n", item)))
.green(paste("\n", item))
}
}
4 changes: 2 additions & 2 deletions R/excel_internal.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ excel_internal <- function(
return(invisible(1))
}
if (!inherits(dfs, "list") && !inherits(dfs, "data.frame")) {
assign_("dbg_excel", dfs)

message_func("excel function requires data.frame or list of data.frames(1)")
return(invisible(1))
}
if (!len(dfs)) {
assign_("dbg_excel", dfs)

message_func("excel function requires data.frame or list of data.frames(2)")
return(invisible(2))
}
Expand Down
2 changes: 1 addition & 1 deletion R/request_funcs.R
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ createUrlForSeries <- function(currentObj) {
}
# ...................................................... request_httr2_helper
request_httr2_helper <- function(url, cache = TRUE) {
assign_("d_url", url)

cache_name <- cache_name_format("request_httr2_helper", url)
check <- check_cache_comp(cache_name, cache)
if (check) {
Expand Down
9 changes: 3 additions & 6 deletions R/response_evds.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ getLineEvdsResponse <- function(item) {
list(date = unix_time, value = value)
}
getLineEvdsResponse_patch_week <- function(item) {
assign_("d_item", item)

# $Tarih
# [1] "06-01-1950"
#
Expand Down Expand Up @@ -48,10 +48,7 @@ getLineEvdsResponse2 <- function(item) {
new_list
}
getLineEvdsResponse3 <- function(item) {
# item_name = "item"
# if( !dynamic_exists( item_name)){
# assign( "item" ,item, envir = .GlobalEnv )
# }

# snames<- names_[ names_[c("Tarih" , "UNIXTIME")] ]
names_ <- names(item)
yliste <- list()
Expand Down Expand Up @@ -82,7 +79,7 @@ getLineEvdsResponse3 <- function(item) {
}
#
convert_list_df_evds <- function(items, strategy = getLineEvdsResponse) {
assign_("d_items", items)


lines_ <- null

Expand Down
48 changes: 0 additions & 48 deletions R/zz_before_check.R

This file was deleted.

0 comments on commit 342ffd9

Please sign in to comment.