[Ml-yokadi] Module reorg

Sébastien Renard Sebastien.Renard
Dim 7 Déc 22:18:47 CET 2008


Le dimanche 7 décembre 2008, Aurélien Gâteau a écrit :
> Sébastien Renard wrote:
> > Hello yokaders !
> >
> > Yokadi source tree tends to be more and more messy. We have 17 .py files
> > at the root. Only tests and update are grouped in folders.
> >
> > Time to reorganise it isn't it ?
>
> Honestly, I consider 17 files to be not that much. The current project I
> work on at work has 91 files in the main dir and I don't feel like it's
> a problem.

Really ? 

> I agree, however that something must be done for utils.py :)

Yes. I like small modules.

> Most functions are db related, so I would move them to dbutils.py:
> addTask
> getTaskFromId
> getOrCreateKeyword
> getOrCreateProject
> createMissingKeywords
> => dbutils.py

Right.

> getProjectFromName
> => projectcmd.py (only used here)

Ok.

> getItemPropertiesStartingWith
> => completers.py (only used here)

Ok.

> exportTasks
> => disappear if t_export is merged with t_list

We can keep it separate to avoid a huge taskcmd.py module. 

In a ideal world, I think *cmd.py module should only do the parsing and 
presentation part. Every complicated stuff should be done in backstage 
module.

> Only thing remaining is ENCODING. Don't know what to do about this one

We can't put it yokadi.py because every other modules import it. As it is text 
related, we can put it with tui.py ?

a+
-- 
Sébastien


Plus d'informations sur la liste de diffusion Ml-yokadi