Re: [GRASS-dev] [GRASS-SVN] r66334 - in grass-addons/grass7: . temporal temporal/t.rast.whatcsv temporal/t.rast.whatcsv/testsuite

2015-10-07 Thread Vaclav Petras
On Fri, Sep 25, 2015 at 11:39 AM,  wrote:
>
> Author: neteler
> New Revision: 66334
>
> Added:
>grass-addons/grass7/temporal/t.rast.whatcsv/t.rast.whatcsv.py
>
> Log:
> t.rast.whatcsv Addon: new prototype module by Soeren Gebbert
>
> +from grass.gunittest.gmodules import SimpleModule
>
> +
> +r_what = SimpleModule("r.what", map="dummy",
> +output="-",
> +separator=separator,
> +quiet=True)
> +

Soeren and Markus,

What is the reason for using SimpleModule from gunittest? In gunittest it
is used to preset defaults which are needed everywhere in the gunittest. If
it is advantageous perhaps we should move it to the same place where
pygrass's Module currently* is. In this case, we need to rethink the
defaults and naming.

Vaclav

* I'm saying currently because it seems that we might move it somewhere
else.
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS-SVN] r66334 - in grass-addons/grass7: . temporal temporal/t.rast.whatcsv temporal/t.rast.whatcsv/testsuite

2015-10-07 Thread Sören Gebbert
Hi,

2015-10-07 17:25 GMT+02:00 Vaclav Petras :
>
> On Fri, Sep 25, 2015 at 11:39 AM,  wrote:
>>
>> Author: neteler
>> New Revision: 66334
>>
>> Added:
>>grass-addons/grass7/temporal/t.rast.whatcsv/t.rast.whatcsv.py
>>
>> Log:
>> t.rast.whatcsv Addon: new prototype module by Soeren Gebbert
>>
>> +from grass.gunittest.gmodules import SimpleModule
>>
>> +
>> +r_what = SimpleModule("r.what", map="dummy",
>> +output="-",
>> +separator=separator,
>> +quiet=True)
>> +
>
> Soeren and Markus,
>
> What is the reason for using SimpleModule from gunittest? In gunittest it is
> used to preset defaults which are needed everywhere in the gunittest. If it
> is advantageous perhaps we should move it to the same place where pygrass's
> Module currently* is. In this case, we need to rethink the defaults and
> naming.

The reason was:
t.rast.whatcsv was a fast hack and i did not take the time to
configure pygrass.modules.Module to do the same as SimpleModule does.
So laziness was the reason.

I think moving SimpleModule to pygrass.modules is a good idea, but
with a better name. Unfortunately i have no better name in mind for
SimpleModule ... .

Best regards
Soeren

>
> Vaclav
>
> * I'm saying currently because it seems that we might move it somewhere
> else.
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] [GRASS-SVN] r66334 - in grass-addons/grass7: . temporal temporal/t.rast.whatcsv temporal/t.rast.whatcsv/testsuite

2015-10-07 Thread Vaclav Petras
On Wed, Oct 7, 2015 at 1:05 PM, Sören Gebbert 
wrote:
>
> > What is the reason for using SimpleModule from gunittest? In gunittest
it is
> > used to preset defaults which are needed everywhere in the gunittest.
If it
> > is advantageous perhaps we should move it to the same place where
pygrass's
> > Module currently* is. In this case, we need to rethink the defaults and
> > naming.
>
> The reason was:
> t.rast.whatcsv was a fast hack and i did not take the time to
> configure pygrass.modules.Module to do the same as SimpleModule does.
> So laziness was the reason.
>
> I think moving SimpleModule to pygrass.modules is a good idea, but
> with a better name. Unfortunately i have no better name in mind for
> SimpleModule ... .

Thanks for the answer Soeren. This is reasonable. I was not yet able to
come up with better name either. Even bigger challenge is name and place
for the new package/module which would separate/take out pygrass Module
from the ctypes-based part of pygrass package. But that's another story.
For now we just need to figure out the SimpleModule rename and whether the
parameters needs to be adjusted and what are the suggested usages. Low
priority, but should be solved before 7.1.
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev