programming

Git Subtrees

Git subtrees Simple use of a library Let us create a Git repository. ~/tmp $ mkdir mainrepo ~/tmp $ cd mainrepo ~/tmp/mainrepo $ git init Initialized empty Git repository in /home/rat/tmp/mainrepo/.git/ Add some files and commits. ~/tmp/mainrepo $ touch feature1 ~/tmp/mainrepo $ git add *; git commit -m "Add feature1" ~/tmp/mainrepo (master) $ touch feature2 ~/tmp/mainrepo (master) $ git add *; git commit -m "Add feature2" The log shows

Rcpp with testthat and catch unit testing

The issue System This has been tested with R version 3.5.3 in RStudio 1.2.1335, using the following packages: usethis: 1.5.0 testthat: 2.0.1 Rcpp: 1.0.1 devtools: 2.0.2 Apparantly, in R version 3.2.x this approach would not work, with a reference to RcppExport SEXP run_testthat_tests(); not being created in RcppExports.cpp Setting up > library(usethis) > create_package("~/test/mypackage") ... > roxygen2::roxygenize() > library(usethis) > use_rcpp() > use_mit_license("my name") Create a mypackage-package.R file with the following contents:

Dynamical systems in Julia

Thanks to https://attractivechaos.wordpress.com/2018/09/26/creating-a-new-package-in-julia/ Creating a new package julia> cd("$(homedir())/github/Julia") (v1.0) pkg> generate Foo julia> mv("Foo", "Foo.jl"); julia> cd("Foo.jl") (v1.0) pkg> activate . Deploying it locally (v1.0) pkg> dev . Modifyin the startup file? push!(LOAD_PATH, "$(homedir())/github/Julia") Using a local package julia> cd("$(homedir())/github/Julia/Foo.jl") (v1.0) pkg> activate . (Foo) pkg> add homedir()/github/Julia/Bar.jl or, if the package is developed in parallel, (Foo) pkg> dev homedir()/github/Julia/Bar.jl Resolving package vesions... Updating `~/github/Julia/Foo.jl/Project.toml` [abcdabcd] + Bar.jl v0.1.0 [`~/github/Julia/Bar.