Quantcast

Event Filters

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Event Filters

Helge@Gramps
Hi all,

because I like filtering to do some thing like described e. g. in GEP 015 I tried some days ago to provide some mock-ups for extensions on event filters (issue 4913).
It would be great if some one could spend a little bit of his time to have a look at this, if this could be a way to go ahead.
Thank you
-Helge
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Event Filters

Gerald Britton-2
On Fri, Jun 3, 2011 at 7:28 AM, Helge@Gramps <[hidden email]> wrote:
> Hi all,
>
> because I like filtering to do some thing like described e. g. in GEP 015 I
> tried some days ago to provide some mock-ups for extensions on event filters
> ( http://www.gramps-project.org/bugs/view.php?id=4913 issue 4913 ).
> It would be great if some one could spend a little bit of his time to have a
> look at this, if this could be a way to go ahead.

taking a look at the patch file...Basically looks good to me though
there are a couple of style issues I found:

(referring to line numbers in the patch file)

- lines 19-23 could be written as one statement:

         for source in obj.get_source_references():
             if required_conf <= source.get_confidence_level():
                 return True
        return False

should be equivalent to:

    return any(required_conf <= source.get_confidence_level()
                    for source in obj.get_source_references())

- line 62 has unnecessary parentheses.  So rewrite:

    if (self.MSF_filt is None) or (len(object.source_list) == 0):

as

    if  self.MSF_filt is None or not object.source_list:

- lines 76-79: the variable "ConfIsTrue" does not follow PEP 8.  Try
"is_conf" instead

- line 156, 163, 179, 180  -  you can remove the extra parentheses

> Thank you
> -Helge
>
> --
> View this message in context: http://gramps.1791082.n4.nabble.com/Event-Filters-tp3570583p3570583.html
> Sent from the GRAMPS - Dev mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Simplify data backup and recovery for your virtual environment with vRanger.
> Installation's a snap, and flexible recovery options mean your data is safe,
> secure and there when you need it. Discover what all the cheering's about.
> Get your free trial download today.
> http://p.sf.net/sfu/quest-dev2dev2
> _______________________________________________
> Gramps-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-devel
>



--
Gerald Britton

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today.
http://p.sf.net/sfu/quest-dev2dev2 
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Event Filters

jerome
In reply to this post by Helge@Gramps

Yes, it is an extension to '4491: Matching source and quality level
[0-3]'. Should we try this on trunk and then to port it to 3.3.x (no
change on class names) ?



Helge@Gramps a écrit :

> Hi all,
>
> because I like filtering to do some thing like described e. g. in GEP 015 I
> tried some days ago to provide some mock-ups for extensions on event filters
> ( http://www.gramps-project.org/bugs/view.php?id=4913 issue 4913 ).
> It would be great if some one could spend a little bit of his time to have a
> look at this, if this could be a way to go ahead.
> Thank you
> -Helge
>
> --
> View this message in context: http://gramps.1791082.n4.nabble.com/Event-Filters-tp3570583p3570583.html
> Sent from the GRAMPS - Dev mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Simplify data backup and recovery for your virtual environment with vRanger.
> Installation's a snap, and flexible recovery options mean your data is safe,
> secure and there when you need it. Discover what all the cheering's about.
> Get your free trial download today.
> http://p.sf.net/sfu/quest-dev2dev2 
> _______________________________________________
> Gramps-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-devel
>


------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today.
http://p.sf.net/sfu/quest-dev2dev2 
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Event Filters

Helge@Gramps
In reply to this post by Gerald Britton-2
Gerald,
thank you for the comments. I'll improve the code following your suggestions.
-Helge
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Event Filters

Helge@Gramps
In reply to this post by jerome
Following the suggestions by Gerald I tried to prevent any style issues, did remove a smaller error and did provide a new patch against trunk 17688. But I'm still not so familiar with Python. So may be there are still some style issues in.
 -Helge
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Event Filters

Helge@Gramps
In reply to this post by Helge@Gramps
Hi all,

I have a new version (first for MatchesSourceFilter) located on (issue 4913)
Thank you for any comment.

-Helge
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Event Filters

jerome
Hi,


Note, there is many possible enhancements for handling/managing/filtering/displaying sources. (GEPS [1][2] & Co)...

I also remember Nick's modified version for the source gramplet but cannot find it anymore on bug tracker !

I did not try patched version yet, but at glance I see some new translation strings ... If one commit the change, could you just wait some days before next release ?

And some strings sound strange!
ie. new line set twice ? space before end of line ?
+                    "containing <substring> or <string> in \"page\". "
+                    "\nUsing 'confidence level = very low' matches every "

I do not exactly remember when this happens but two '\n\n' could crash on translation files (syntax issue)!

Global fields make sense.
I will try it, but maybe I will not have time to test all of them with or without privacy mark and date values.

Note, it seems that only Event has a _MatchesSourceFilter.py: 'Base' class is only for one object ! And I suppose person/_HasSourceOf.py rule is more limited ? Should person/_HasSourceOf.py try to use MatchesSourceFilterBase classe ?



[1] http://gramps-project.org/wiki/index.php?title=GEPS_018:_Evidence_style_sources
[2] http://gramps-project.org/wiki/index.php?title=GEPS_023:_Storing_data_from_large_sources



Jérôme


--- En date de : Mar 28.6.11, Helge@Gramps <[hidden email]> a écrit :

> De: Helge@Gramps <[hidden email]>
> Objet: Re: [Gramps-devel] Event Filters
> À: [hidden email]
> Date: Mardi 28 juin 2011, 19h02
> Hi all,
>
> I have a new version (first for MatchesSourceFilter)
> located on (
> http://www.gramps-project.org/bugs/view.php?id=4913&PHPSESSID=d1410421b31d8c8dad038ab4f38aa0ee
> issue 4913 )
> Thank you for any comment.
>
> -Helge
>
> --
> View this message in context: http://gramps.1791082.n4.nabble.com/Event-Filters-tp3570583p3630887.html
> Sent from the GRAMPS - Dev mailing list archive at
> Nabble.com.
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is
> seriously valuable.
> Why? It contains a definitive record of application
> performance, security
> threats, fraudulent activity, and more. Splunk takes this
> data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> Gramps-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-devel
>

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Event Filters

Helge@Gramps
I hope, the new version based on tiny filters looks better
-Helge
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Event Filters

Helge@Gramps
The new and improved version based on tiny filters is available at issue 4913 (EventSourceReferenceFilters2011.07.03.patch).
Again, I look forward for every comment.

I think too about a text report (graphical report behind my current possibilities, may be later possible) to  see all filters and their content and to check for un-allowed loops.
Am I on the right way, or should stop these trials?
-Helge
Loading...