Skip to content

Commit

Permalink
re-generare with fixed seed + ignore whitespace changes in untracked …
Browse files Browse the repository at this point in the history
…build directories.
  • Loading branch information
dfalbel committed Jan 14, 2022
1 parent e1f017d commit 9a41ec2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -48,12 +48,12 @@ y <- torch_tensor(x, dtype = torch_float64())
y
#> torch_tensor
#> (1,.,.) =
#> 0.2879 0.6675
#> 0.9247 0.4802
#> 0.7658 0.6123
#> 0.3150 0.4639
#>
#> (2,.,.) =
#> 0.7612 0.6587
#> 0.9068 0.2109
#> 0.0604 0.0290
#> 0.9553 0.6541
#> [ CPUDoubleType{2,2,2} ]
identical(x, as_array(y))
#> [1] TRUE
Expand Down
13 changes: 11 additions & 2 deletions tools/style.sh
Expand Up @@ -23,14 +23,23 @@ git diff --stat

# Remove whitespaces
find . -type f \( -name 'DESCRIPTION' -o -name "*.R" \) ! -path "*/gen-*.*" ! -path "*/RcppExports.*" ! -path "./check/*" -printf '%p\n' -exec perl -pi -e 's/[ \t]*$//' {} \;
find . -type f \( -name '*.h' -o -name '*.hpp' -o -name '*.c' -o -name '*.cc' -o -name '*.cpp' -o -name '*.cxx' \) ! -path "*/gen-*.*" ! -path "*/lantern.*" ! -path "*/RcppExports.*" ! -path "./check/*" -printf '%p\n' -exec perl -pi -e 's/[ \t]*$//' {} \;
find . -type f \( -name '*.h' -o -name '*.hpp' -o -name '*.c' -o -name '*.cc' -o -name '*.cpp' -o -name '*.cxx' \) \
! -path "*/gen-*.*" ! -path "*/lantern.*" ! -path "*/RcppExports.*" ! -path "./check/*" \
-not -path './lantern/build/*' \
-not -path './lantern/headers/build/*' \
-not -path "./inst/include/*/*" \
-not -path "./revdep/*" \
! -path "./check/*" \
-printf '%p\n' \
-exec perl -pi -e 's/[ \t]*$//' {} \;

git diff --stat

# Render documents
Rscript -e "if (!require('rmarkdown')) install.packages('rmarkdown')"
Rscript -e "if (!require('roxygen2')) install.packages('roxygen2')"
Rscript tools/document.R
if [ -f README.Rmd ]; then
Rscript -e 'rmarkdown::render("README.Rmd", output_format = "md_document")'
Rscript -e 'rmarkdown::render("README.Rmd", output = "github_document")'
fi
git diff --stat

0 comments on commit 9a41ec2

Please sign in to comment.