Roger Bivand <Roger.Bivand-aX1nC9UfZf8@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 only, spgrass7 for 7.x. only.

We should include an error in initGRASS as well during the startup (if R
is running inside R)if the versions do not match (spgrass6 and
spgrass7) - I can look into that later this week.

A question about the naming of the functions. In spgrass6 the function
name is gmeta6, while in spgrass7 it is gmeta - I would suggest to
rename the function in spgrass6 to gmeta and to create a dummy function
gmeta6 which can give a warning that the function gmeta6 has been
replaced by gmeta and that the function gmeta6 will be deprecated in
the next release.

This would make it possible to switch from GRASS 6 to GRASS 7 only by
changing the package loaded (and changes in parameter and flag names
when using execGRASS).

I will think about the meta-package and it's structure a little bit more
and draw up a dummy package to show what I am thinking about.

Thanks,

Rainer


>
> Best wishes,
>
> Roger
>
>> Cheers,
>>
>> Rainer
>>
>>

-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982
