[Pywikipedia-l] Rewrite: porting status

Russell Blau russblau at imapmail.org
Sun Apr 19 12:06:10 UTC 2009


Nicolas Dumazet wrote:
> 2009/4/14 Russell Blau <russblau at imapmail.org>
>> 	BTW, I'd really like
>> 	to move scripts/ back under the pywikibot/ package; do 
>> you object?
> 
> 
> No strong objections. I'm just wondering why would you want 
> to do that... :)
> 
> 
> I personally liked the idea of clearly separating the core 
> module used for mediawiki editing, and the "user" scripts we 
> wrote from this core module. 
> * The former is a set of primitives that any users are likely 
> to need, the latter contains a lot of different scripts that 
> are not necessary for creating a new mediawiki bot
> * From a developer perspective, it's very different to 
> maintain core scripts or to modify user scripts. Someone with 
> very little knowledge of the implementation of the core 
> module can work to improve user scripts. A broken user script 
> only stops this particular script from working; a broken core 
> feature is likely to cause much more damage, etc...
> 
> But maybe that distinction is not important enough to get the 
> user scripts out of the pywikibot bot module. As Merlijn 
> (valhallasw) said, it might also be useful to be able to 
> import pywikibot.script.foo.Particularclass from time to time.
> 
> Can we get your input Russell? =)

Two reasons.  First, as per Merlijn, sometimes it is useful to import a
component from one script into another script.  (To answer Liangent, no, a
lot of the time the scripts aren't written so that this is useful, but
sometimes they are and it would be better authoring practice if we wrote
more reusable components.)

Second, for distribution, it is cleaner to have all files relating to the
framework distributed in a single package.  We could address your concern by
moving all the "core" modules into a pywikibot.core subpackage (that's how
Django, for example, organizes their namespace).

Russ




More information about the Pywikipedia-l mailing list