[ESS] ESS process on Docker containers and enabing Flymake
@hrey@@ @end|ng |rom |@@tm@||@com
Thu Jan 23 23:09:13 CET 2020
I would be grateful for advice on 2 questions.
1. How to connect inferior modes / ESS processes to run on a specified docker container?
Within Org mode source blocks, I can use the :dir /docker:container-name/:/home/ header argument to run commands on docker containers and it seems to work well.
However, when I edit the source block C-c ' - and ESS has to connect to an R process - how can I have the process connected to the specified project docker container? Extending this - how about native .R files?
2. How can I enable flymake in ESS?
Going through the documentation, I set the following and did not receive an error, but there is no indication of flymake working, and I think I have the syntax wrong. For example, I am able to create a variable name starting with a number and there is no error indication. So in my modeline - I can see flymake:!.
(setq ess-use-flymake '("lintr::default_linters()"))
(setq ess-use-flymake "lintr::default_linters()")
Here are the 2 errors in the flymake logfile :
Warning [flymake stock_analysis_completed.R]: Disabling backend flymake-proc-legacy-flymake because (error Can’t find a suitable init function)
Error [ess-r-flymake *ess-r-flymake*]: ‘lintr‘ package not installed
Warning [flymake *Org Src README.org<DSB-101-R>[ R ]*]: Disabling backend ess-r-flymake because (wrong-type-argument sequencep 1)
Warning [flymake *Org Src README.org<DSB-101-R>[ R ]*]: Disabling backend flymake-proc-legacy-flymake because (error Can’t find a suitable init function)
Some additional background may help with context for the docker question:
I have setup a bunch of docker images with a long list of common packages used in data science : https://github.com/shrysr/sr-ds-docker.
In a nutshell : there is an OS image, and then an image with R packages built on the OS image, and then separate rstudio server and shiny server images built on the R packages layer. This is actually a convenient starting point for anybody venturing in this direction. I would be happy for feedback, and it is a work in progress as always.
The shiny server works as expected. The idea is to standardise my working environment and have my data science projects to be reproducible. My current plan is to use a dedicated container for each individual project, and then extent these efforts into CI/CD and other things.
More information about the ESS-help