Skip to content

Commit

Permalink
Removing \donttest{} from examples and adding explanation of NOTE in …
Browse files Browse the repository at this point in the history
…cran-comments.md instead
  • Loading branch information
palderman committed Mar 27, 2023
1 parent e5e1e09 commit 36f7a38
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 51 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: DSSAT
Type: Package
Title: A Comprehensive R Interface for the DSSAT Cropping Systems Model
Version: 0.0.7
Date: 2023-03-22
Date: 2023-03-27
Author: Phillip D. Alderman [aut, cre]
Maintainer: Phillip D. Alderman <[email protected]>
Description: The purpose of this package is to provide a comprehensive
Expand Down
4 changes: 1 addition & 3 deletions R/read_casupro_eco.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
#'
#' @examples
#'
#' \donttest{
#'
#' sample_eco <- c('CA0001 (CP 80-1743; CP 88-1762)',
#' '!-------------------',
#' ' KCAN_ECO 0.80 Superseeds KCAN from .SPE file',
Expand All @@ -30,7 +28,7 @@
#' ' SENDAY 0.05 Maximum fraction of existing leaf weight which can be senesced on')
#'
#' read_casupro_eco(sample_eco)
#' }
#'

read_casupro_eco <- function(raw_lines){

Expand Down
2 changes: 0 additions & 2 deletions R/read_dssat.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@
#'
#' @examples
#'
#' \donttest{
#' # Extract file path for sample output file path
#' sample_output <- system.file('extdata','SAMPLE.OUT',package='DSSAT')
#'
#' read_dssat(sample_output)
#' }
#'

read_dssat <- function(file_name,col_types=NULL,col_names=NULL,na_strings=NULL,
Expand Down
3 changes: 0 additions & 3 deletions R/read_output.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@
#'
#' @examples
#'
#' \donttest{
#'
#' # Extract file path for sample output file path
#' sample_output <- system.file('extdata','SAMPLE.OUT',package='DSSAT')
#'
#' out <- read_output(sample_output)
#'
#' }

read_output <- function(file_name, col_types = NULL, col_names = NULL,
left_justified = NULL, read_only = NULL,
Expand Down
3 changes: 0 additions & 3 deletions R/read_soil_profile.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
#'
#' @examples
#'
#' \donttest{
#'
#' sample_sol <- c(
#' "*IB00000001 IBSNAT SIC 210 DEFAULT - DEEP SILTY CLAY",
#' "@SITE COUNTRY LAT LONG SCS FAMILY",
Expand All @@ -36,7 +34,6 @@
#'
#' read_soil_profile(sample_sol)
#'
#' }

read_soil_profile <- function(raw_lines,left_justified=NULL,
col_types=NULL,col_names=NULL){
Expand Down
3 changes: 0 additions & 3 deletions R/read_sol.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@
#'
#' @examples
#'
#' \donttest{
#'
#' # Extract file path for sample soil file
#' sample_sol <- system.file('extdata','SAMPLE.SOL',package='DSSAT')
#'
#' sol <- read_sol(sample_sol)
#'
#' }

read_sol <- function(file_name,id_soil=NULL,left_justified=NULL,col_types=NULL,col_names=NULL){

Expand Down
3 changes: 0 additions & 3 deletions R/write_casupro_eco.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#'
#' @examples
#'
#' \donttest{
#'
#' sample_eco <- c('CA0001 (CP 80-1743; CP 88-1762)',
#' '!-------------------',
#' ' KCAN_ECO 0.80 Superseeds KCAN from .SPE file',
Expand All @@ -30,7 +28,6 @@
#'
#' write_casupro_eco(eco)
#'
#' }

write_casupro_eco <- function(eco){

Expand Down
4 changes: 0 additions & 4 deletions R/write_filet.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
#'
#' @examples
#'
#' \donttest{
#'
#' # Extract FileT path for sample file
#' sample_filet <- system.file('extdata','SAMPLE.CRT',package='DSSAT')
#'
Expand All @@ -29,8 +27,6 @@
#' # Write out sample FileA
#' write_filet(filet,sample_filet2)
#'
#' }
#'

write_filet <- function(filet,file_name,drop_duplicate_rows=TRUE){

Expand Down
4 changes: 0 additions & 4 deletions R/write_sol.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#'
#' @examples
#'
#' \donttest{
#'
#' # Extract file path for sample soil file
#' sample_sol <- system.file('extdata','SAMPLE.SOL',package='DSSAT')
#'
Expand All @@ -37,8 +35,6 @@
#' # Write example soil file
#' write_sol(sol,sample_sol2)
#'
#' }
#'

write_sol <- function(sol,file_name,title=NULL,append=TRUE,force_std_fmt=TRUE){

Expand Down
28 changes: 19 additions & 9 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
## Test environments

* local Ubuntu 22.04.2 LTS, R 4.2.3, GCC
* R-hub Ubuntu Linux 20.04.1 LTS, R-release, GCC (ubuntu-gcc-release)
* R-hub Debian Linux, R-devel, GCC (debian-gcc-devel)
* win-builder (devel and release)
* R-hub Fedora Linux, R-devel, clang, gfortran (fedora-clang-devel)
* R-hub Debian Linux, R-devel, clang (debian-clang-devel)
* R-hub Windows Server 2022, R-release, 64 bit (windows-x86_64-release)
* win-builder (devel and release)

## R CMD check results

Expand All @@ -15,19 +14,30 @@ There were no ERRORs or WARNINGs. There were 2 NOTEs:

```
* checking for detritus in the temp directory ... NOTE
```

Inspecting the logs revealed this message:

```
Found the following files/directories:
'lastMiKTeXException'
* DONE
'lastMiKTeXException'
```
As noted in [R-hub issue #503](https://github.com/r-hub/rhub/issues/503), this is likely due to a bug/crash in MiKTeX and can likely be ignored.

* ONLY on R-hub Fedora Linux, R-devel, clang, gfortran:
As noted in [R-hub issue #503](https://github.com/r-hub/rhub/issues/503), this is likely due to a bug/crash in MiKTeX and can likely be ignored.

* ONLY on R-hub Debian Linux, R-devel, clang:

```
* checking HTML version of manual ... NOTE
Skipping checking HTML validation: no command 'tidy' found
* checking examples ... [31s/75s] NOTE
Examples with CPU (user + system) or elapsed time > 5s
user system elapsed
write_sol 3.074 0.012 7.317
read_dssat 2.047 0.025 5.449
read_sol 2.022 0.003 5.048
```

This NOTE is due to the `tidy` utility being unavailable on the R-hub Fedora server. I think this can be safely ignored given that HTML checks are passing on all other platforms.
I do not think this is a problem. Although I am not sure why these examples are running slowly in this environment, elapsed time for each example is less than 3 seconds for the other test environments.

## Downstream dependencies

Expand Down
1 change: 1 addition & 0 deletions man/read_casupro_eco.Rd

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

2 changes: 0 additions & 2 deletions man/read_dssat.Rd

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

3 changes: 0 additions & 3 deletions man/read_output.Rd

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

3 changes: 0 additions & 3 deletions man/read_sol.Rd

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

4 changes: 0 additions & 4 deletions man/write_filet.Rd

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

4 changes: 0 additions & 4 deletions man/write_sol.Rd

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

0 comments on commit 36f7a38

Please sign in to comment.