OpenSenseAction / OPENSENSE_sandbox

Collection of runable examples with software packages for processing opportunistic rainfall sensors
BSD 3-Clause "New" or "Revised" License
9 stars 16 forks source link

Integrate all submodules via postBuild to Python and R path #30

Closed georges-schutz closed 1 year ago

georges-schutz commented 1 year ago

Sub-modules are not installed, they are only a code-clone of another repository into the sandbox project. In order to make this usable in notebooks, there is a need to add the path to each of the sub-module in an automatic way to the project. This may be realized by using the postBuild process.

cchwala commented 1 year ago

From the mybinder docs I would say that it is better to use the start file that is run just before the user sessions starts. The postBuild is ran when the container is built, which, in our case, is now done from the separate env repository, where we actually do not yet have the submodules available. Hence, my hope would be to run the start script from our code repo directly when a new binder instance is launched.

From the docs for the start file

A script that can contain simple commands to be run at runtime (as an ENTRYPOINT to the docker container). If you want this to be a shell script, make sure the first line is #!/bin/bash. The last line must be exec "$@" or equivalent.

Use this to set environment variables that software installed in your container expects to be set. This script is executed each time your binder is started and should at most take a few seconds to run.

overeem11 commented 1 year ago

For RAINLINK to run:

overeem11 commented 1 year ago

R CMD INSTALL RAINLINK_1.3.tar.gz

overeem11 commented 1 year ago

Note that RAINLINK has been successfully tested using R, but R libraries from the Config.R file cannot (all) be loaded properly when using RStudio. This is likely because the installed R packages do not have the right version for the used version of RStudio (or perhaps the R version RStudio is referring to is not the right one).

cchwala commented 1 year ago

Things did not work out as planed at the beginning of this issue. Submodules are now initialized via the solution provided by #38.