Skip to content

Commit

Permalink
remove deprecate function and spell check before release
Browse files Browse the repository at this point in the history
  • Loading branch information
vzhomeexperiments committed Apr 8, 2021
1 parent dbdc9bc commit dcf9450
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 198 deletions.
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export(encrypt_api_key)
export(evaluate_macroeconomic_event)
export(get_profit_factorDF)
export(import_data)
export(load_asset_data)
export(mt_evaluate)
export(mt_import_data)
export(mt_make_model)
Expand Down
9 changes: 5 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@

## Changes

* add simulation function `aml_simulation` designed to test different inputs
* some other minor changes
### New Function `aml_simulation`

* designed to test different inputs

### Function `aml_make_model`

Expand All @@ -21,11 +22,11 @@
* add parameter to split data with specific n of rows
* add parameter num_bars_ahead, default is 34 bars
* add options for deep learning function parameters search, `num_epochs`, `fixed_nn_struct`
* add option `objective_test` to allow strategy test inside the function to select best model
* add option `objective_test` to allow strategy test inside the function to select best model based on specific objective

### Function `aml_collect_data`

* more accurate calculation of Label column
* more accurate calculation of Label column using tick data
* added fail safe scenarios

# lazytrade 0.4.5
Expand Down
85 changes: 0 additions & 85 deletions R/load_asset_data.R

This file was deleted.

12 changes: 8 additions & 4 deletions R/opt_aggregate_results.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#' Function to aggregate trading results from multiple folders and files
#'
#' @description PURPOSE: Read multiple '.csv' files stored in different folders
#' @description Read multiple '.csv' files stored in different folders
#' Store results to the intermediate dataframe.
#'
#' `r lifecycle::badge('stable')`
#' `r lifecycle::badge('deprecated')`
#'
#' @details user must provide the path to the files in the folders
#' all files in subfolders are read and aggregated into one data object.
Expand All @@ -28,13 +28,17 @@
#' file.copy(from = system.file("extdata/RES", package = "lazytrade"),
#' to = dir, recursive = TRUE)
#'
#'
#'
#' DF_RES <- opt_aggregate_results(path_data = file.path(dir, "RES"))
#'
#'
opt_aggregate_results <- function(path_data){


lifecycle::deprecate_warn(when = "0.5.1",
what = "opt_aggregate_results()",
details = "This function is not used."
)

# folders with results
# join paths into a vector
DFOLDER <- dir(path_data, full.names = TRUE)
Expand Down
49 changes: 29 additions & 20 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,15 @@ and we check that there is nothing more remained:
dir("/tmp/*.csv")
```

### Delete deprecate functions

To remove function from the package we can use:

* Delete function from the folder (careful not to break other functions)
* Build -> More -> Document
* Build -> More -> Clean and Rebuild
* Build -> Check

## CRAN Submission Tips and Tricks

### Many notes while using global variables:
Expand Down Expand Up @@ -471,10 +480,16 @@ It's important to avoid that function write to the directory other then `tempdir
Construct file name must be done using `file.name()` function as follow:

```{r}
# use plane temp directory
dir_name <- normalizePath(tempdir(),winslash = "/")
file_name <- paste0('my_file', 1, '.csv')
# this needs to be used in the function
full_path <- file.path(dir_name, file_name)
# when using sub-directory
sub_dir <- file.path(dir_name, "_SUB")
if(!dir.exists(sub_dir)){dir.create(sub_dir)}
```


Expand All @@ -501,9 +516,11 @@ Clone package from GitHub and test check it in Docker Container

`usethis::use_readme_rmd()`

## Automatic check with Travis
## Automatic check with GitHub Actions

`usethis::use_github_action()`

`usethis::use_travis()`
To be elaborated

## Upload package to CRAN

Expand All @@ -520,38 +537,30 @@ then:
`devtools::release()`

### before release checks

spelling
`devtools::spell_check()`

checking on R hub
`rhub::validate_email()`
`rhub::check(
platform="windows-x86_64-devel",
env_vars=c(R_COMPILE_AND_INSTALL_PACKAGES = "always")
)`

```{r eval=FALSE, include=FALSE}
rhub::check_on_fedora(show_status = FALSE,
env_vars=c(R_COMPILE_AND_INSTALL_PACKAGES = "always"))
```

#### checking on R hub

`devtools::check_rhub(interactive = F)`
https://builder.r-hub.io/

checking with release
#### checking with release
`devtools::check_win_release()`

checking win devel
#### checking win devel
`devtools::check_win_devel()`

checking win old devel
#### checking win old devel
`devtools::check_win_oldrelease()`

check with rocker R in container
#### check with rocker R in container
- use docker image with R Studio,
- clone repo, build, check package...

Update news.md file
### Update news.md file

Explain the changes

### uploading the package archive to CRAN
https://cran.r-project.org/submit.html
Expand Down
50 changes: 39 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ library(readr)

#generate 8digit password for trading platform
util_generate_password(salt = 'random text')
#> .
#> 1 8a289ED5
```

## Example - generate initialization files for MT4 platform
Expand Down Expand Up @@ -423,6 +425,16 @@ and we check that there is nothing more remained:
dir("/tmp/*.csv")
```

### Delete deprecate functions

To remove function from the package we can use:

- Delete function from the folder (careful not to break other
functions)
- Build -&gt; More -&gt; Document
- Build -&gt; More -&gt; Clean and Rebuild
- Build -&gt; Check

## CRAN Submission Tips and Tricks

### Many notes while using global variables:
Expand Down Expand Up @@ -471,10 +483,15 @@ It’s important to avoid that function write to the directory other then
function as follow:

``` r
# use plane temp directory
dir_name <- normalizePath(tempdir(),winslash = "/")
file_name <- paste0('my_file', 1, '.csv')
# this needs to be used in the function
full_path <- file.path(dir_name, file_name)

# when using sub-directory
sub_dir <- file.path(dir_name, "_SUB")
if(!dir.exists(sub_dir)){dir.create(sub_dir)}
```

## Versioning of the package
Expand All @@ -500,9 +517,11 @@ Clone package from GitHub and test check it in Docker Container

`usethis::use_readme_rmd()`

## Automatic check with Travis
## Automatic check with GitHub Actions

`usethis::use_github_action()`

`usethis::use_travis()`
To be elaborated

## Upload package to CRAN

Expand All @@ -522,21 +541,30 @@ then:

spelling `devtools::spell_check()`

checking on R hub `rhub::validate_email()`
`rhub::check( platform="windows-x86_64-devel", env_vars=c(R_COMPILE_AND_INSTALL_PACKAGES = "always") )`
#### checking on R hub

<https://builder.r-hub.io/>

#### checking with release

`devtools::check_win_release()`

#### checking win devel

`devtools::check_win_devel()`

`devtools::check_rhub(interactive = F)`
#### checking win old devel

checking with release `devtools::check_win_release()`
`devtools::check_win_oldrelease()`

checking win devel `devtools::check_win_devel()`
#### check with rocker R in container

checking win old devel `devtools::check_win_oldrelease()`
- use docker image with R Studio,
- clone repo, build, check package…

check with rocker R in container - use docker image with R Studio, -
clone repo, build, check package…
### Update news.md file

Update news.md file
Explain the changes

### uploading the package archive to CRAN

Expand Down
Loading

0 comments on commit dcf9450

Please sign in to comment.