[Nepomuk] Review Request 108916: Refactor nepomuk-simpleresource-rygen.py

Luca Beltrame lbeltrame at kde.org
Tue Feb 12 10:39:00 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108916/#review27276
-----------------------------------------------------------



services/storage/rcgen/nepomuk-simpleresource-rcgen.py
<http://git.reviewboard.kde.org/r/108916/#comment20533>

    Be aware that all uses of QString() will break if the rcgen is used with Python 3.
    
    To prevent this, add the following imports:
    
    import sip
    sip.setapi("QString", 1)



services/storage/rcgen/nepomuk-simpleresource-rcgen.py
<http://git.reviewboard.kde.org/r/108916/#comment20534>

    Docstrings in Python need to be put after the definition statement, eg.
    
    def foo()
    
        "my docstring"
    
    



services/storage/rcgen/nepomuk-simpleresource-rcgen.py
<http://git.reviewboard.kde.org/r/108916/#comment20536>

    Style: argparse puts not supplied options as None, so reword as
    
    if args.output is not None:



services/storage/rcgen/nepomuk-simpleresource-rcgen.py
<http://git.reviewboard.kde.org/r/108916/#comment20535>

    Whitespace (also elsewhere in the diff)


- Luca Beltrame


On Feb. 12, 2013, 10:32 a.m., Jörg Ehrichs wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/108916/
> -----------------------------------------------------------
> 
> (Updated Feb. 12, 2013, 10:32 a.m.)
> 
> 
> Review request for Nepomuk, Sebastian Trueg and Vishesh Handa.
> 
> 
> Description
> -------
> 
> To reduce to time necessary for large SimpelResource class generation for
> any application that needs more than a few ontologies.
> 
> This patch removes most calls to soprano and uses internal dictionary
> handling to generate the classes. Thus the class generation for the
> Nepomuk-WebMiner is down from ~25min to less than a second.
> 
> Instead of asking soprano for the properties/range etc of a class
> the output of the Soprano parser is used directly.
> 
> 
> Diffs
> -----
> 
>   services/storage/rcgen/nepomuk-simpleresource-rcgen.py d2a4e0c 
> 
> Diff: http://git.reviewboard.kde.org/r/108916/diff/
> 
> 
> Testing
> -------
> 
> Class output for Nepomuk-WebMiner is exactly the same just faster.
> 
> 
> Thanks,
> 
> Jörg Ehrichs
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/nepomuk/attachments/20130212/5bcc7a71/attachment.html>


More information about the Nepomuk mailing list