[GRASS-dev] proposal for g.search module

Vaclav Petras wenzeslaus at gmail.com
Mon Nov 30 13:31:41 PST 2015


On Mon, Nov 30, 2015 at 4:12 PM, Jachym Cepicky <jachym.cepicky at gmail.com>
wrote:

> the script called g.search.module is now in trunk, I've added tests
>

Great. It is really fast (without -m). It will be useful.


> (VaĊĦek: they seem to be far too verbose to me, anything I could do about
> that?)
>

Yes, partially. The it is written with verbosity rather higher than lower
but some things would need more programming. No quiet option available now
but at least some basic form might be relatively easy to add.


>
> I've left the colorize and print_output functions in the file, reason:
> better code structure would have to be implemented (read: IMHO decorator at
> least for colorize should be used and I'm to doubt for now to get working)
>

Yes, perhaps we should let it settle.

Now I see that termcolor is not necessarily installed (I had no reason to
install it so far), so some better error handing is needed.

With -m, I'm getting a lot of these:

g.search.module search -m
warning: file `<standard input>', around line 172:
  table wider than line width

I get those with test as well and additionally also:

======================================================================
FAIL: test_json_output (__main__.TestSearchModule)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./test_g_search_module.py", line 37, in test_json_output
    self.assertEqual(stdout[3]['name'], 'r.basins.fill', 'r.basins.fill')
AssertionError: r.basins.fill
u'r.sim.water' != 'r.basins.fill'

======================================================================
FAIL: test_shell_outout (__main__.TestSearchModule)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./test_g_search_module.py", line 45, in test_shell_outout
    self.assertEqual(stdout[3], 'r.basins.fill')
AssertionError: 'r.sim.water' != 'r.basins.fill'
- r.sim.water
+ r.basins.fill

Can't investigate more now but I'm definitively looking forward to using it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20151130/f5672b10/attachment.html>


More information about the grass-dev mailing list