I did some cleanup in the code in your branch. Nothing important was
changed. I just added a copyright header and suggested a possible way
to proceed to seamless integrate your functionality with the current
structure:

http://dev.umitproject.org/projects/pm/repository/diff?rev=0b4302a3779d7da7864a77dfbc92bedd340d57ee&rev_to=6a42f1d2dce8c36079da089288b0e594dbabd3ac

Regarding the question about the version, the operator '.' returned by
extract version does not do anything in particular. So if you apply
that operator over a version and a 'n/a' versioned plugin you will
always get back None value. This is perfectly reasonable if you have a
given plugin and you don't want to specify any particular restriction
about the version.  You have simply to take care of it accordingly. So
it's better to add some more test cases in the module.

Last two points you mentioned:

1 - The deque module is perfectly fine for me, the important point is
that it will work.
2 - For the plugins already loaded that are in conflict with the other
you are going to load, I think it is sufficient to just warn the user
about the situation. So just popup an error window saying plugin 'xyz'
cannot be loaded since is in conflict with 'wkj'. That's it.


> But in need in the plugin, does not have the version, then
> Version.extract_version put '.' as operator and 'n/a' as version.
> What is better? Change all plugins and put the version in need =X
> or change Version in atoms.py when compare with '.n/a' to consider TRUE if
> name is equal.
> or change in my code to, when Version returns '.n/a', change to '>0.1' ... ?
> []'s

--
Best regards,
Francesco Piccinno



On Fri, May 20, 2011 at 11:28 PM, Guilherme Rezende
<[email protected]> wrote:
>
>
> ---------- Forwarded message ----------
> From: Guilherme Rezende <[email protected]>
> Date: Fri, May 20, 2011 at 6:16 PM
> Subject: Re: PluginDepLoader
> To: Francesco Piccinno <[email protected]>
> Cc: umit gsoc <[email protected]>
>
>
> Hey Francesco =]
> I Committed the modifications in
> engine.py (Load the main graph)
> tree.py (Get a work copy and call in load_module the get_dep_for() )
> depsolver.py
> But in need in the plugin, does not have the version, then
> Version.extract_version put '.' as operator and 'n/a' as version.
> What is better? Change all plugins and put the version in need =X
> or change Version in atoms.py when compare with '.n/a' to consider TRUE if
> name is equal.
> or change in my code to, when Version returns '.n/a', change to '>0.1' ... ?
> []'s
>
>
>
>
> On Fri, May 13, 2011 at 3:02 AM, Guilherme Rezende <[email protected]>
> wrote:
>>
>> Hey =]
>> Please take a look in the
>> code: http://paste.pocoo.org/show/SsYN4UctWopY6bratAPg/
>> 1 - I changed from queue to deque, for make possible search in structure.
>> 2 - For the plugins that are already loaded, and conflict with what is
>> going up, I shall return in load_list something like "-ShinyTCP", or create
>> a function that returns a unload_list?
>>
>> []''s
>>
>> On Wed, May 11, 2011 at 7:56 AM, Francesco Piccinno <[email protected]>
>> wrote:
>>>
>>> First of all I suggest you to take a look to this page:
>>>
>>> http://www.umitproject.org/d-devel/html/plugins_dev.html
>>>
>>> Maybe it will help you to better understand what is the situation.
>>> Take a look to the manifest section.
>>>
>>> Regarding the code you might want to use already present code like:
>>>
>>> umit/pm/gui/plugins/atoms.py - Providing functionalities to deal with
>>> version strings
>>> umit/pm/gui/plugins/containers.py - Containing Manifest information
>>> umit/pm/core/atoms.py - Containing a class Node that you might
>>> specialize by subclassing
>>>
>>> The code for get should be something like this:
>>>
>>> http://paste.pocoo.org/show/UH6ICqPUvmSgeBVwAyMN/
>>>
>>> Try to make that input sample work correctly.
>>>
>>> --
>>> Best regards,
>>> Francesco Piccinno
>>>
>>>
>>>
>>> On Wed, May 11, 2011 at 7:16 AM, Guilherme Rezende
>>> <[email protected]> wrote:
>>> > Hi Francesco,
>>> > Just today I had time to continue the algorithm....
>>> > Please take a look in code, in Graph class, i dont know how the best
>>> > way to
>>> > do the for statement in get function... =[
>>> > http://paste.pocoo.org/show/LbWHD6OX3XEBykCM6NZQ/
>>> > I'm doing tests, so do not repair the formatting, comments, etc ... =D
>>> > tnks!
>>> > []'s
>>> >
>>> > On Mon, May 9, 2011 at 10:15 AM, Francesco Piccinno
>>> > <[email protected]>
>>> > wrote:
>>> >>
>>> >> Actually the code you produced is correct but does not handle specific
>>> >> case that are required to be modeled. I've made some style
>>> >> modification to your code and added various comments to let you
>>> >> understand which cases you should handle. That's the nopaste
>>> >> http://paste.pocoo.org/show/WafV3aFXtzjEFiA3QIMO/
>>> >>
>>> >> By the way, please try to keep conform to the PEP8 specifications
>>> >> (http://www.python.org/dev/peps/pep-0008/). So summarizing 4 spaces
>>> >> level identation and c-style naming conventions.
>>> >>
>>> >> For the rest the code seems ok. Regarding your question, the method to
>>> >> load the dependencies information will be called at program startup
>>> >> time before loading every plugins.
>>> >>
>>> >> --
>>> >> Best regards,
>>> >> Francesco Piccinno
>>> >>
>>> >>
>>> >>
>>> >> On Mon, May 9, 2011 at 5:45 AM, Guilherme Rezende
>>> >> <[email protected]>
>>> >> wrote:
>>> >> > Hi Francesco,
>>> >> > Are you fine?
>>> >> > I created the algorithm in http://pastebin.com/00LBL2KV , but I have
>>> >> > some
>>> >> > doubts.
>>> >> > when the method to load the graph will be called?
>>> >> > I had originally thought to recursively check the dependencies when
>>> >> > trying
>>> >> > to load the plugin, it would not be a good idea?
>>> >> >
>>> >> > Best regards
>>> >> >
>>> >> >
>>> >> >
>>> >> >
>>> >> >
>>> >> >
>>> >> > On Fri, May 6, 2011 at 9:36 AM, Francesco Piccinno
>>> >> > <[email protected]>
>>> >> > wrote:
>>> >> >>
>>> >> >> On Fri, May 6, 2011 at 7:02 AM, Guilherme Rezende
>>> >> >> <[email protected]>
>>> >> >> wrote:
>>> >> >> > 1) The main idea is a loader for dependency of plugin, right?
>>> >> >>
>>> >> >> Yes exactly. A dependency solver.
>>> >> >>
>>> >> >> > 2) This implementation will be called within
>>> >> >> > umit/pm/gui/plugins/tree.py
>>> >> >> > instead of message of dependency or conflict, in the load_plugin
>>> >> >> > function?
>>> >> >> > 3) What place should I create this feature?
>>> >> >>
>>> >> >> Yes the point where your dependency checking and solver should be
>>> >> >> started is exactly that.
>>> >> >>
>>> >> >> The first step should be to load import the manifest of all
>>> >> >> available
>>> >> >> plugins in DAG structure. Then whenever the user wants to load the
>>> >> >> plugin you have to call your dependency solver starting at line 316
>>> >> >> (tree.py) and provide a way to solve all the dependencies (and
>>> >> >> automatically load them or show to the user the list of possible
>>> >> >> solutions).
>>> >> >>
>>> >> >> To better explain assuming that we have only the following plugins:
>>> >> >>
>>> >> >> - smb (depends on tcp)
>>> >> >> - tcp (depends on ip)
>>> >> >> - ip (depends on eth)
>>> >> >> - eth
>>> >> >>
>>> >> >> You should first of all load these information in a DAG in order
>>> >> >> that
>>> >> >> you have something like:
>>> >> >>
>>> >> >> eth -> ip -> tcp -> smb
>>> >> >>
>>> >> >> Then if the user wants to load smb you should automatically load
>>> >> >> the
>>> >> >> deps or show the user a dialog windows saying:
>>> >> >>
>>> >> >> - SMB requires the following plugins to be loaded in order (eth,
>>> >> >> ip,
>>> >> >> tcp) are you sure that you want to load?
>>> >> >>
>>> >> >> Take in consideration that there can be several version of ip
>>> >> >> plugins
>>> >> >> (in this case you should prefer more recent version) or the smb can
>>> >> >> require a specific version of tcp plugin.
>>> >> >>
>>> >> >> --
>>> >> >> Best regards,
>>> >> >> Francesco Piccinno
>>> >> >
>>> >> >
>>> >> >
>>> >> > --
>>> >> > Guilherme Bessa Rezende
>>> >> > Security and Telecom Developer
>>> >> > http://gbr.codesafe.com.br
>>> >> >
>>> >> >
>>> >> >
>>> >
>>> >
>>> >
>>> > --
>>> > Guilherme Bessa Rezende
>>> > Security and Telecom Developer
>>> > http://gbr.codesafe.com.br
>>> >
>>> >
>>> >
>>
>>
>>
>> --
>> Guilherme Bessa Rezende
>> Security and Telecom Developer
>> http://gbr.codesafe.com.br
>>
>>
>
>
>
> --
> Guilherme Bessa Rezende
> Security and Telecom Developer
> http://gbr.codesafe.com.br
>
>
>
>
>
> --
> Guilherme Bessa Rezende
> Security and Telecom Developer
> http://gbr.codesafe.com.br
>
>
>
> ------------------------------------------------------------------------------
> What Every C/C++ and Fortran developer Should Know!
> Read this article and learn how Intel has extended the reach of its
> next-generation tools to help Windows* and Linux* C/C++ and Fortran
> developers boost performance applications - including clusters.
> http://p.sf.net/sfu/intel-dev2devmay
> _______________________________________________
> Umit-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/umit-devel
>
>

------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Umit-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/umit-devel

Reply via email to