Conduit Config System


I'm sorry I didnt gave any news lately, I've been busy with the end of the semester. Now that I'm on vacation I had some time to hack on Conduit.

So, the new configuration system I was creating is almost complete. It's almost feature complete now, and I've converted most dataproviders to it. I plan to convert all dataproviders very soon.

One more thing popped when I was changing some code, which was the way set_configuration and get_configuration worked. Most dataproviders had to define properties in their initialization with their default values, then define them again in those functions, and had to deal with missing values and type checking in set_configuration. An automated way to restore the values were availiable in set_configuration, but it didnt work very well, and a few problems popped when I used them in the new configurators.
So I created a new way to define those properties, so that they only have to be declared once on initialization. It includes type checking and using functions to set and get values if needed, so that set_configuration and get_configuration dont have to be used at all (but only defining them already goes to the old behaviour), and only one function call has to be made at initialization, with a very clear syntax (using kwargs, similar to how configuration items are defined in the new configuration system). So I've been using that when converting dataproviders, and it's working fine so far (no module required any special behaviour). Any module not using it is not affected, so I'm converting most modules to this system, but it's not a requirement. In fact, it's just an extension of the current system, so that if a need arises, the usual behaviour can be used with no trouble.

Even with all this work complete, it's a big change, and may cause some disruption. I've been thinking on how to merge it with trunk, and it could be split into smaller and more manageable pieces. I could separate it in a set of patches, but it's a lot of work, and I only want to do it if it's necessary. What do you think?

The code is still availiable at my Bazaar branch. I updated it with my last work, but it includes some UI experiments I'll explain later (that can be easily disabled anyway). The branch can be found in:

And I've began to document it in
I plan to add more information in there. It's in reStructuredText format, so it can be embed in the code later, or put in another wiki.

Alexandre Rosenfeld


FOG - The Fellowship of the Game

USP São Carlos - EESC/ICMC  
Engenharia de Computação 06
(Computer Engineering Student)

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]