Breaking up the importer's huge icommon.py file

Max Bowsher _ at maxb.eu
Mon May 30 10:33:20 UTC 2011


On 24/05/11 17:57, James Westby wrote:
> On Sat, 21 May 2011 18:52:20 +0100, Max Bowsher <maxb at f2s.com> wrote:
>> A huge amount of the UDD importer's interesting code is in one file,
>> icommon.py.
>>
>> I'd like to submit a series of changes to break it up such that only the
>> most common bits of code remain there.
> 
> Good idea.
> 
>> Things I'm thinking of:
>>
>> 1) Move code in icommon.py that is uniquely invoked by a single
>> executable component of the importer out to that component:
> 
> I think I would prefer it if they moved to their own modules...
> 
>> e.g.
>> class ImportList, class PackageToImport --> import_package.py
>>
>> class SubprocessMonitor, class ThreadDriver --> mass_import.py
> 
> Especially things like this.
> 
> I don't have a strong preference though.

ImportList and PackageToImport really are very much core parts of the
logic of how import_package.py works.

SubprocessMonitor and ThreadDriver look fairly generic - the only
reasons I wanted to merge them in was to spare me having to come up with
a good name for a separate file to put them, and it doesn't seem likely
that they'll need to be re-used outside mass_import.py

Max.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-distributed-devel/attachments/20110530/d86b3aa9/attachment.pgp>


More information about the ubuntu-distributed-devel mailing list