Hi Stefan,(and thanks Roger and Floris for replying as well)
Your solution worked perfectly, Stefan. Thanks a lot!In the case of continuous 
integration within Github as it is the case, it seems we must ask GRASS to be 
installed in the virtual machine.
This could be done with Stefan's suggestion, adding these lines to the yaml 
file within .github/workflows:
- name: Install GRASS GIS and other dependencies        run: |          sudo 
apt-get update -qq          sudo apt-get install -y -qq grass grass-dev 
grass-doc wget
You can also see it here: Install GRASS for CI by ninsbl · Pull Request #11 · 
NINAnor/oneimpact (github.com)
I guess this could be documented for GRASS/R users somewhere? Maybe in some 
wiki?Any suggestion on where to add this?

BestBernardo

    Em sexta-feira, 26 de agosto de 2022 13:27:46 GMT+2, Stefan Blumentrath 
<stefan.blumentr...@nina.no> escreveu:  
 
  <!--#yiv0852532148 _filtered {} _filtered {} _filtered {} _filtered 
{}#yiv0852532148 #yiv0852532148 p.yiv0852532148MsoNormal, #yiv0852532148 
li.yiv0852532148MsoNormal, #yiv0852532148 div.yiv0852532148MsoNormal 
{margin:0cm;font-size:11.0pt;font-family:"Calibri", sans-serif;}#yiv0852532148 
a:link, #yiv0852532148 span.yiv0852532148MsoHyperlink 
{color:blue;text-decoration:underline;}#yiv0852532148 pre 
{margin:0cm;margin-bottom:.0001pt;font-size:10.0pt;font-family:"Courier 
New";}#yiv0852532148 span.yiv0852532148HTMLPreformattedChar 
{font-family:Consolas;}#yiv0852532148 span.yiv0852532148ydpa6a6511er-in 
{}#yiv0852532148 span.yiv0852532148ydpa6a6511efu {}#yiv0852532148 
span.yiv0852532148ydpa6a6511eop {}#yiv0852532148 
span.yiv0852532148ydpa6a6511est {}#yiv0852532148 
span.yiv0852532148ydpa6a6511ecn {}#yiv0852532148 span.yiv0852532148EmailStyle26 
{font-family:"Calibri", sans-serif;color:windowtext;}#yiv0852532148 
.yiv0852532148MsoChpDefault {font-size:10.0pt;} _filtered {}#yiv0852532148 
div.yiv0852532148WordSection1 {}-->
Hi Bernardo,
 
  
 
Seems like GRASS GIS isn`t installed on the CI VM.
 
  
 
Please see:
 
https://github.com/NINAnor/oneimpact/pulls
 
  
 
You may add UbuntuGIS PPAs if you want other versions than shipped by plain 
Ubuntu.
 
  
 
Cheers
 
Stefan
 
  
 
From: grass-user <grass-user-boun...@lists.osgeo.org>On Behalf Of Bernardo 
Santos via grass-user
Sent: fredag 26. august 2022 12:56
To: grass-stats@lists.osgeo.org; GRASS User List <grass-u...@lists.osgeo.org>
Subject: [GRASS-user] Running r-grass examples when building a R package
 
  
 
Dear all,
 
  
 
I am building a R package and some of the functions use rgrass to connect to a 
GRASS project and run thingfs within GRASS.
 
I have now set up a webpage for the package using pkgdown in integrated to 
Github actions. This means when I push new commits all the examples of R 
functions are run again and the webpage is updated with the results of the 
examples. Here is the webpage: https://ninanor.github.io/oneimpact/
 
  
 
All works fine, except the functions calling GRASS. When I run the examples 
form my local computer everything works, but in the Github actions it does not 
run, apparently because the command
 
  
 system("grass78 --config path", intern = T) 
to find the GRASS folder and use within rgrass::initGRASS does not work, so the 
connection between R and GRASS do not exist.
 
  
 
Does someone in the group has experience with that and could help with hints to 
solve it?
 
Is there a recommended way to make sure Github actions know where GRASS is and 
use it?
 
  
 
Best
 
Bernardo
   
_______________________________________________
grass-stats mailing list
grass-stats@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-stats

Reply via email to