[Grok-dev] martian.scan changed

Uli Fouquet uli at gnufix.de
Thu Aug 16 23:22:22 EDT 2007


Hi,

Am Donnerstag, den 16.08.2007, 18:43 +0200 schrieb Martijn Faassen:
> On 8/16/07, Uli Fouquet <uli at gnufix.de> wrote:
> >
> > No worries! The code wasn't checked in at that time. And it's easy to
> > write an own package finder if needed.
> 
> scan is intended to be a generic functionality so nobody will have to
> write one ever again. :)
> (we looked for one while writing grok but couldn't find one)

That's why I was happy to find it :-)

> > > Why don't you roll back this behavior from martian's scan, or at least
> > > make it optional (pass a list of modules names to ignore to it, or a
> > > filter function, or something like that). If you have time?
> >
> > I'd do the latter with a filter function tonight if that's okay for
> > everybody.

I checked this in. So martian.scan now again groks every package/module,
also 'tests' and 'ftests'. You can give a filter function to opt-out
certain names, like this:

    >>> mymodinfo.getSubmoduleInfos(
    ...     exclude_filter=lamda x: x.startswith('java'))

The default grok behaviour is however, to grok everything.

> > The tests problem might be solved more easily (and more explicitly) with
> > the upcoming grok.testing.
> 
> Not sure how it would help - the idea is that grok doesn't actually
> grok anything defined in test and ftests modules. Comes to mind, this
> directly conflicts with having grok pick up tests, though it'll
> probably be another run anyway.

Not sure, whether I understood correctly. Is the aim for grok not to
grok tests (tests/ftests modules) by default but only when told so
explicitly (by the tests for example)?

Cheers,

-- 
Uli




More information about the Grok-dev mailing list