Skip to content

Commit

Permalink
Fixed Unit-test for store_xts() 🔧 and updated documentation 📚
Browse files Browse the repository at this point in the history
* The function were throwing an error:

Found the following files/directories:
  ‘Rtmpx3Ay8DBTC.csv’

Added `unlink()` to the end of the test, which fixes everything locally 🔥
  • Loading branch information
serkor1 committed Nov 7, 2024
1 parent a539695 commit e129732
Show file tree
Hide file tree
Showing 21 changed files with 26 additions and 22 deletions.
2 changes: 1 addition & 1 deletion R/chart_ma.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ chart_ma <- function(
#' `r lifecycle::badge("experimental")`
#'
#' A high-level [plotly::add_lines()]-wrapper function that
#' interacts with [TTR]'s moving average family of functions.
#' interacts with \{TTR\}'s moving average family of functions.
#' The function adds moving average indicators to the main [chart()].
#'
#' @usage sma(
Expand Down
2 changes: 1 addition & 1 deletion R/get_fgi.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#'
#' @inherit get_quote details
#'
#' @returns An [xts::xts]-object containing,
#' @returns An <[\link[xts]{xts}]>-object containing,
#'
#' \item{index}{<[POSIXct]> the time-index}
#' \item{fgi}{<[numeric]> the daily fear and greed index value}
Expand Down
2 changes: 1 addition & 1 deletion R/get_fundingrate.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#'
#' @inheritParams get_quote
#'
#' @returns An [xts::xts]-object containing,
#' @returns An <[\link[xts]{xts}]>-object containing,
#'
#' \item{index}{<[POSIXct]> the time-index}
#' \item{funding_rate}{<[numeric]> the current funding rate}
Expand Down
2 changes: 1 addition & 1 deletion R/get_openinterest.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#' @inheritParams get_quote
#'
#' @returns
#' An [xts::xts]-object containing,
#' An <[\link[xts]{xts}]>-object containing,
#'
#' \item{index}{<[POSIXct]> the time-index}
#' \item{open_interest}{<[numeric]> open perpetual contracts on both both sides}
Expand Down
2 changes: 1 addition & 1 deletion R/get_quote.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#' @param to An optional [character]-, [date]- or
#' [POSIXct]-vector of [length] 1. [NULL] by default.
#'
#' @returns An [xts::xts]-object containing,
#' @returns An <[\link[xts]{xts}]>-object containing,
#'
#' \item{index}{<[POSIXct]> The time-index}
#' \item{open}{<[numeric]> Opening price}
Expand Down
4 changes: 2 additions & 2 deletions R/store_xts.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
#' ...
#' )
#'
#' @param x An <[xts::xts]>-object.
#' @param x An <[\link[xts]{xts}]>-object.
#' @inheritParams zoo::write.zoo
#' @inheritParams zoo::read.zoo
#'
#' @details
#' When reading and writing <[xts::xts]>-objects the [attributes] does not follow the object.
#' When reading and writing <[\link[xts]{xts}]>-objects the [attributes] does not follow the object.
#'
#'
#' @author
Expand Down
2 changes: 1 addition & 1 deletion man/alma.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/dema.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/ema.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/evwma.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/get_fgindex.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/get_fundingrate.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/get_openinterest.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/get_quote.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/hma.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/sma.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/vwap.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/wma.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/write_xts.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/zlema.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions tests/testthat/test-store_xts.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ testthat::test_that(
)
)
)

# 3) delete file
# after the test is run
unlink(temp_file)

}
)
Expand Down

0 comments on commit e129732

Please sign in to comment.