From: Benjamin Auder Date: Mon, 10 Feb 2020 12:56:35 +0000 (+0100) Subject: Merge branch 'master' of github.com:yagu0/valse X-Git-Url: https://git.auder.net/?p=valse.git;a=commitdiff_plain;h=04845e3300b5450629bf1a2c3344d2f9419e91a6;hp=6775f5b98ffc7eae7ce9d4081b23b39ce66d3c0b Merge branch 'master' of github.com:yagu0/valse --- diff --git a/.git-fat b/.git-fat new file mode 160000 index 0000000..286bcd3 --- /dev/null +++ b/.git-fat @@ -0,0 +1 @@ +Subproject commit 286bcd30cea5f86363a04a9313afaf9e2e7a7b81 diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..16826ed --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule ".git-fat"] + path = .git-fat + url = https://github.com/yagu0/git-fat.git +[submodule ".nbstripout"] + path = .nbstripout + url = https://github.com/kynan/nbstripout.git diff --git a/.nbstripout b/.nbstripout new file mode 160000 index 0000000..10c80cb --- /dev/null +++ b/.nbstripout @@ -0,0 +1 @@ +Subproject commit 10c80cbd5b6356fa38179ca526ee2894d9b3bd20 diff --git a/initialize.sh b/initialize.sh new file mode 100755 index 0000000..48f0ba1 --- /dev/null +++ b/initialize.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +#initialize submodules, set-up .git/config and .gitattributes, and pre-push hook +git submodule init && git submodule update --merge + +#filter for git-fat +printf \ +'*.pdf filter=fat +*.tar.xz filter=fat +*.png filter=fat +*.jpg filter=fat +*.ps filter=fat\n' > .gitattributes + +#filter for Jupyter +python .nbstripout/nbstripout.py --install --attributes .gitattributes + +#pre-commit and pre-push hooks: indentation, git fat push, submodules update +cp hooks/* .git/hooks/ + +#install formatR +echo 'if (! "formatR" %in% rownames(installed.packages())) + install.packages("formatR",repos="https://cloud.r-project.org")' | R --slave + +#.gitfat file with remote on gitfat@auder.net +printf '[rsync]\nremote = gitfat@auder.net:~/files/valse\n' > .gitfat + +#manual git-fat init: with relative path to binary +#1] remove filter if exists http://stackoverflow.com/a/12179641/4640434 +sed -i '1N;$!N;s/\[filter "fat"\]\n.*\n.*//;P;D' .git/config +#2] place new filter +printf \ +'[filter "fat"] + clean = ./.git-fat/git-fat filter-clean + smudge = ./.git-fat/git-fat filter-smudge\n' >> .git/config diff --git a/pkg/inst/testdata/TODO.csv b/pkg/inst/testdata/TODO.csv new file mode 100644 index 0000000..d679966 --- /dev/null +++ b/pkg/inst/testdata/TODO.csv @@ -0,0 +1 @@ +ou alors data_test.RData, possible aussi diff --git a/pkg/tests/testthat.R b/pkg/tests/testthat.R new file mode 100644 index 0000000..88e5631 --- /dev/null +++ b/pkg/tests/testthat.R @@ -0,0 +1,4 @@ +library(testthat) +library(valse) #ou load_all() + +test_check("valse") diff --git a/pkg/tests/testthat/helper-context1.R b/pkg/tests/testthat/helper-context1.R new file mode 100644 index 0000000..b40f358 --- /dev/null +++ b/pkg/tests/testthat/helper-context1.R @@ -0,0 +1,5 @@ +# Potential helpers for context 1 +help <- function() +{ + #... +} diff --git a/pkg/tests/testthat/test-context1.R b/pkg/tests/testthat/test-context1.R new file mode 100644 index 0000000..17c633f --- /dev/null +++ b/pkg/tests/testthat/test-context1.R @@ -0,0 +1,11 @@ +context("Context1") + +test_that("function 1...", +{ + #expect_lte( ..., ...) +}) + +test_that("function 2...", +{ + #expect_equal(..., ...) +}) diff --git a/pkg/vignettes/.gitignore b/pkg/vignettes/.gitignore new file mode 100644 index 0000000..e6493d4 --- /dev/null +++ b/pkg/vignettes/.gitignore @@ -0,0 +1,14 @@ +#ignore jupyter generated file (ipynb, HTML) +*.html +*.ipynb + +#and various (pdf)LaTeX files, in case of +*.tex +*.pdf +*.aux +*.dvi +*.log +*.out +*.toc +*.synctex.gz +/figure/ diff --git a/reports/.Rhistory b/reports/.Rhistory new file mode 100644 index 0000000..dc970cc --- /dev/null +++ b/reports/.Rhistory @@ -0,0 +1,512 @@ +a = sum(beta*c(1,gammai[i,])) +return(exp(a)/(1+exp(a))) +}) +U = runif(length(pydata)) +ydata = as.numeric(U