r5r icon indicating copy to clipboard operation
r5r copied to clipboard

Create a situation report function for easier debugging

Open dhersz opened this issue 3 years ago • 3 comments

From a recent rOpensci blog post:

Have you also considered adding some sort of sitrep (situation report) function? The devtools package has devtools::dev_sitrep() e.g. reports on the package development situation, with clear hints given if something is not quite right. The usethis package has usethis::git_sitrep() (using the gert package under the hood!), blogdown has blogdown::check_site(). Good candidates for checks are common pain points, so finding them might require some sort of external perspective on your package.

devtools::dev_sitrep(), for example, reports:

  • If R is up to date
  • If RStudio is up to date
  • If compiler build tools are installed and available for use
  • If devtools and its dependencies are up to date
  • If the package's dependencies are up to date

We could include something similar to r5r, since we ask similar question in basically all our issues:

  • Is r5r up to date?
  • Is r5r's jar up to date?
  • Is R5's jar up to date?

What are other questions we could try to answer with this function?

dhersz avatar Oct 04 '21 13:10 dhersz

That's a good ideia. We could include:

  • current Java version
  • amount of memory set to Java through the Xmx option

mvpsaraiva avatar Oct 18 '21 14:10 mvpsaraiva

Jar size as well.

dhersz avatar May 04 '22 20:05 dhersz

path argument could be used to list files inside router directory.

dhersz avatar May 04 '22 20:05 dhersz

I've updated the function, which now returns a list with the following information:

  • The package version of {r5r} in use.
  • The installed version of R5.jar.
  • The Java version in use.
  • The amount of memory set to Java through the java.parameters option.
  • The user's Session Info.
r5r_sitrep()

> $r5r_package_version
> [1] ‘0.7.90000’
> 
> $r5_jar_version
> [1] "6.7"
> 
> $java_version
> [1] "11.0.10"
> 
> $set_memory
> [1] "-Xmx512m"
> 
> $session_info
> R version 4.1.1 (2021-08-10)
> Platform: x86_64-w64-mingw32/x64 (64-bit)
> Running under: Windows 10 x64 (build 22000)
> 
> Matrix products: default
> 
> locale:
> [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
> [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
> [5] LC_TIME=English_United States.1252    
> 
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base     
> 
> other attached packages:
> [1] r5r_0.7.90000
> 
> loaded via a namespace (and not attached):
> [1] compiler_4.1.1    tools_4.1.1       data.table_1.14.6 rJava_1.0-6 

rafapereirabr avatar Dec 22 '22 17:12 rafapereirabr

this issue has been fixed with the new r5r_sitrep() released in r5r v1.0.0

rafapereirabr avatar Feb 24 '23 12:02 rafapereirabr