[GRASS-stats] Some refactoring and fixing

Roger Bivand Roger.Bivand at nhh.no
Wed Jan 28 09:19:36 PST 2015


On Wed, 28 Jan 2015, Rainer M Krug wrote:

> OK - the problem seems to be a name conflict. The build system status
> report [1] states:
>
> ,----
> | - Package name conflicts:
> | ...
> | [7] "rspatial: spgrass6"     "spgrass: spgrass6"
> `----

Right, spgrass6 is still hosted as part of rspatial (it was originally 
there). I'll try to resolve this by removing it from that project. The 
file oChangeLog is the frozen ChangeLog from its original project, so when 
releasing, we need to run:

cd spgrass6 # or 7
svn up
sh svn2cl.sh # must be on PATH
# if formatted too narrowly
# fmt < ChangeLog > tmp
# mv tmp ChangeLog
cat oChangeLog >> ChangeLog
cp ChangeLog inst
svn commit -m tidy
svn up
cd ..

to build a ChangeLog including all past history.

Roger

>
> So the easiest to install at the moment seems to be to checkout the
> sources via
>
> ,----
> | svn checkout svn://r-forge.r-project.org/svnroot/spgrass/
> `----
>
> and then install from the sources.
>
> Cheers,
>
> Rainer
>
> Rainer M Krug <Rainer at krugs.de> writes:
>
>> Hi Roger
>>
>> it seems that there is something not as it should be with the builds of
>> spgrass6 and spgrass7 - there are at the moment GRASS, spgrass and
>> spgrass7 but no spgrass6 - I don't have much experience with r-forge,
>> could you please check what is going on?
>>
>> Thanks,
>>
>> Rainer
>>
>> Rainer M Krug <r.m.krug at gmail.com> writes:
>>
>>> Envoyé de mon iPhone
>>>
>>>> Le 28 janv. 2015 à 15:55, Thomas Adams <tea3rd at gmail.com> a écrit :
>>>>
>>>> Rainer,
>>>>
>>>> Where can I get the new spgrass6 and spgrass7 to do some testing?
>>>
>>> The repository is on https://r-forge.r-project.org/projects/spgrass/   .
>>>
>>> It doesn't seem to be build yet so you have to install it from the svn
>>> repo or wait a few hours - then you shoud be able to install it via
>>>
>>>  	R install command: install.packages("spgrass6", repos="http://R-Forge.R-project.org")
>>>
>>>  	Cheers,
>>>
>>> Rainer
>>>> Thank you,
>>>> Tom
>>>>
>>>>> On Wed, Jan 28, 2015 at 7:23 AM, Rainer M Krug <Rainer at krugs.de> wrote:
>>>>> Rainer M Krug <Rainer at krugs.de> writes:
>>>>>
>>>>>> Roger Bivand <Roger.Bivand-aX1nC9UfZf8 at public.gmane.org> writes:
>>>>>>
>>>>>>> On Tue, 27 Jan 2015, Rainer M Krug wrote:
>>>>>>>
>>>>>>>> Hi
>>>>>>>>
>>>>>>>> I just committed a few of commits which refactor the code of readRAST,
>>>>>>>> writeRAST, readVECT & writeVECT by creating internal fi=unctions for
>>>>>>>> reading / writing for plugin / non-plugin and moving the default values
>>>>>>>> (get...Options()) into the function definitions.
>>>>>>>
>>>>>>> Good, thanks; I've updated the default values in the help files. It's
>>>>>>> easy to check for discrepancies in spgrass/pkg:
>>>>>>>
>>>>>>> R CMD build spgrass7
>>>>>>> R CMD check spgrass7_0.1-0.tar.gz
>>>>>>
>>>>>> Thanks - haven't thought about about the check - will do the next time.
>>>>>>
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> Maybe we could quieten the progress bar in the output from checking?
>>>>>>> As in:
>>>>>>>
>>>>>>> pkg/spgrass7.Rcheck/spgrass7.Rout
>>>>>>>
>>>>>>> (local file, not added to repository, created by R CMD check if run in
>>>>>>> spgrass/pkg).
>>>>>>>
>>>>>>>>
>>>>>>>> Also, I added tryCatch blocks to close open connections and to reset
>>>>>>>> echoCmdOption. I ran the examples before each commit and I did not see
>>>>>>>> any errors or changed behavior.
>>>>>>>>
>>>>>>>> Apologies for the typos in the commit messages - I only saw them later.
>>>>>>>>
>>>>>>>> To stick with consistency, I would recommend to rename the package to
>>>>>>>> spgrass7 and to look into the possibility to create a meta-package which
>>>>>>>> uses spgrass6 or spgrass7 (I don't know about the GRASS 5 interface -
>>>>>>>> haven't used it) depending on the GRASS GIS version set / loaded.
>>>>>>>>
>>>>>>>
>>>>>>> I've renamed spgrass as spgrass7 - when you update, the change will
>>>>>>> propagate.
>>>>>>
>>>>>> Thanks - got it.
>>>>>>
>>>>>>> I'm unsure about a metapackage, maybe block version 7 in
>>>>>>> spgrass6 (following the parameter and flag name harmonisation).
>>>>>>
>>>>>> Yes - spgrass6 for 6.x, spgrass7 for 7.x.
>>>>>>
>>>>>> Will respnd in more detail tomorrow.
>>>>>
>>>>> OK - I just committed a blocking mechanism which for spgrass6 and
>>>>> spgrass7 so that they
>>>>>
>>>>> a) when R is started in GRASS, the package can not be loaded if the
>>>>> versions are not compatible and
>>>>> b) initGRASS raises an error if the GRASS GIS version in gisBase is not
>>>>> compatible with the package version
>>>>>
>>>>> If you think this is the right approach, the help files still need to be
>>>>> amended to reflect this change.
>>>>>
>>>>> I was thinking if it would make sense to introduce an overwrite
>>>>> mechanism for these checks to enable "non-standard" use or testing?
>>>>>
>>>>> I haven't looked at references for GRASS 7.0 in spgrass6 yet.
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Rainer
>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Rainer
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> Best wishes,
>>>>>>>
>>>>>>> Roger
>>>>>>>
>>>>>>>> Cheers,
>>>>>>>>
>>>>>>>> Rainer
>>>>>>>>
>>>>>>>>
>>>>>
>>>>> --
>>>>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
>>>>>
>>>>> Centre of Excellence for Invasion Biology
>>>>> Stellenbosch University
>>>>> South Africa
>>>>>
>>>>> Tel :       +33 - (0)9 53 10 27 44
>>>>> Cell:       +33 - (0)6 85 62 59 98
>>>>> Fax :       +33 - (0)9 58 10 27 44
>>>>>
>>>>> Fax (D):    +49 - (0)3 21 21 25 22 44
>>>>>
>>>>> email:      Rainer at krugs.de
>>>>>
>>>>> Skype:      RMkrug
>>>>>
>>>>> PGP: 0x0F52F982
>>>>>
>>>>> _______________________________________________
>>>>> grass-stats mailing list
>>>>> grass-stats at lists.osgeo.org
>>>>> http://lists.osgeo.org/mailman/listinfo/grass-stats
>>>>
>>>>
>>>>
>>>>
>>>>
>
>
> Footnotes:
> [1]  http://download.r-forge.r-project.org/STATUS
>
>

-- 
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 91 00
e-mail: Roger.Bivand at nhh.no


More information about the grass-stats mailing list