Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
SermetPekin committed Feb 21, 2024
0 parents commit 3e8947f
Show file tree
Hide file tree
Showing 201 changed files with 19,794 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
^.*\.Rproj$
^\.Rproj\.user$
^\.github$
^\.txt
^\.xlsx$
^LICENSE\.md$
^caches_Rapi$
^APIKEYS$
^some\.c\.txt
^cran-comments\.md$
^docs
^CRAN-SUBMISSION$
^_pkgdown\.yml$
^docs$
^pkgdown$
58 changes: 58 additions & 0 deletions .github/workflows/R_CMD_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
paths:
- '**.R'
- '**.cpp'
- '*.hpp'
- '*.h'
- '*.c'
- 'DESCRIPTION'
- 'NAMESPACE'
- '*.yml'
# push:
# branches: [main, master]
# pull_request:
# branches: [main, master]

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: true
matrix:
config:
# - {os: macos-latest, r: 'release'}
# - {os: windows-latest, r: 'release'}
# - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
# - {os: ubuntu-latest, r: 'oldrel-1'}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
32 changes: 32 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.Rproj.user
.Rhistory
.RData
.Ruserdata
src/*.o
src/*.so
src/*.dll
caches_Rapi/
.Rproj.user
.Rhistory
.RData
.Ruserdata
src/*.o
src/*.so
src/*.dll
*.xlsx
*APIKEY*.txt
caches_vyos/
*.txt
*.DS_Store
tests/.DS_Store
*.Rcheck
caches_vyos/
vyos.Rproj
CRAN-SUBMISSION*.*
CRAN-SUBMISSION
cran-comments.md

APIKEYS/
*SECRET*.*
!data-deps.txt

51 changes: 51 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
Package: Rapi
Type: Package
Title: Interface for Multiple Data Providers 'EDDS' and 'FRED'
Version: 1.0.3
Date: 2024-02-19
Authors@R: c(
person("Sermet", "Pekin", , "sermetpekin@gmail.com", role = c("aut", "cre" , "cph"))
)
Maintainer: Sermet Pekin <sermetpekin@gmail.com>
URL: https://github.com/DataRapi/Rapi, https://DataRapi.github.io/Rapi/
BugReports: https://github.com/DataRapi/Rapi/issues
Description: Interface for multiple data sources, such as the
'EDDS' API <https://evds2.tcmb.gov.tr/index.php?/evds/userDocs> of the
Central Bank of the Republic of Türkiye and the
'FRED' API <https://fred.stlouisfed.org/docs/api/fred/> of the Federal Reserve Bank.
Both data providers require API keys for access, which users can easily obtain
by creating accounts on their respective websites.
The package provides caching ability with the selection of periods to increase the
speed and efficiency of requests.
It combines datasets requested from different sources,
helping users when the data has common frequencies.
While combining data frames whenever possible, it also keeps all requested data
available as separate data frames to increase efficiency.
License: MIT + file LICENSE
LinkingTo: Rcpp
Depends:
R (>= 3.4.3),
Rcpp
Imports:
crayon,
digest,
dplyr,
httr,
httr2,
glue,
jsonlite,
lubridate,
magrittr,
purrr,
rlang,
rlist,
stringr,
tibble
Suggests:
writexl ,
devtools,
testthat
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
Encoding: UTF-8
Config/testthat/edition: 3
2 changes: 2 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
YEAR: 2024
COPYRIGHT HOLDER: Sermet Pekin <sermetpekin@gmail.com>
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# MIT License

Copyright (c) 2024 Sermet Pekin <sermetpekin@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
34 changes: 34 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# main imports
useDynLib(Rapi, .registration=TRUE)
importFrom(Rcpp, evalCpp)

importFrom("utils", "packageVersion")


# Rapi Package
export(get_series)
export(set_api_key)
export(lag_df)
export(lag_df2)
export(remove_na_safe)
export(template_test)
export(excel)
export(inn)
export(`%inn%`)
export(remove_columns)
export(change_cache_folder)
export(verbose_on)
export(verbose_off)


# S3 methods
S3method(print,Rapi_GETPREP)

# imports
importFrom("utils", "read.delim2")
importFrom(magrittr, `%>%`)
importFrom(rlang, `%||%`)
importFrom("utils", "installed.packages")



3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Rapi 1.0.3

* Initial CRAN submission. (previously named vyos)
28 changes: 28 additions & 0 deletions R/00_a_vyos_name_space.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
create_Rapi_environment <- function() {
Rapi_env <- base::new.env(parent = emptyenv())
return(Rapi_env)
}

# Rapi Package namespace ......................................................
# ..................Rapi
# Rapi package env
Rapi_env <- create_Rapi_environment()

set_Rapi_test_value <- function(.value = TRUE) {
Rapi_env$test <- .value

.value
}

get_Rapi_test_value <- function() {
return(Rapi_env$test)
}

switch_Rapi_test <- function() {
Rapi_env$test <- !Rapi_env$test
}


clean_Rapi_environment <- function() {
rm(list = ls(envir = Rapi_env), envir = Rapi_env)
}
Loading

0 comments on commit 3e8947f

Please sign in to comment.