Inconsistency in FindEvents/CountEvents filter

Bug #404914 reported by Siegfried Gevatter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zeitgeist Framework
Fix Released
Low
Siegfried Gevatter
0.2
Fix Released
Low
Siegfried Gevatter
0.3
Fix Released
Low
Siegfried Gevatter

Bug Description

Some of our filters (eg., tags, source, content, etc) take an array of different possibilities, but uri does only take a single string; this should be made more consistent (probably making the uri take an array too). Maybe we could even consider accepting everywhere either a single value or an array.

Related branches

Revision history for this message
Siegfried Gevatter (rainct) wrote :

To clarify that last sentence, I mean that both options would be supported (differentiating between them with a hasattr(..., "__iter__") or the like).

Changed in zeitgeist:
importance: Undecided → Low
milestone: none → 0.3
Revision history for this message
Siegfried Gevatter (rainct) wrote :

Opinions?

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

My gut instinct says "Require arrays everywhere" in order to make the API more uniform and clear - so that the signature of a filter can be written a{sav} (instead of the weaker a{sv} as now).

Revision history for this message
Siegfried Gevatter (rainct) wrote : Re: [Bug 404914] Re: Inconsistency in FindEvents/CountEvents filter

Well, stuff like "bookmarked" won't be an array ever.

--
Siegfried-Angel Gevatter Pujals (RainCT)
Ubuntu Developer. Debian Contributor.

Revision history for this message
Siegfried Gevatter (rainct) wrote :

Seif wants to use the feature so we decided we will use my way in 0.2.1 (so that we make it available but remain compatible with 0.2) and in 0.3 we will drop the support for using anything other than a list in uri, text, etc.

Changed in zeitgeist:
assignee: nobody → Siegfried Gevatter (rainct)
milestone: 0.3 → 0.2.1
status: New → In Progress
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

> Well, stuff like "bookmarked" won't be an array ever.

But wont that info be passed in the annotations in the new API?

Revision history for this message
Siegfried Gevatter (rainct) wrote :

> But wont that info be passed in the annotations in the new API?

No, the idea is that "bookmarked: True/False" would still be in the result of FindEvents because it's very basic information. I started describing the idea at http://live.gnome.org/GnomeZeitgeist/EngineAPIRevamp . WDYT?

Revision history for this message
Siegfried Gevatter (rainct) wrote :

Ah wait, I'm still sleeping :P:

You're talking about the filter, as in FindEvents([{"uri": [...], "text": [...], "annotations": {"UserTags": [...], "bookmarked": True/False} }])? Yeah that should work.

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Actually I am talking about both. I stand by what you describe in comment 8 and I myself in comment 3 and you realize in comment 8 :-).

But the question in comment 6 is about something else.

The bookmarked True/False is also a too weak description. It is not fx. not compatible with the standard hierarchical bookmarks of the Places menu in the Gnome panel. Where ones has folders of bookmarks...

Revision history for this message
Siegfried Gevatter (rainct) wrote :

We aren't supporting different types of bookmarks, and thinking about it I don't think we should. That's what tags are for.

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Ok, but then I am basically saying that the only possible consumer of the "bookmark" field is the dedicated Zeitgeist UI. This design concerns me a little...

Revision history for this message
Siegfried Gevatter (rainct) wrote :

> Ok, but then I am basically saying that the only possible consumer of the "bookmark" field is the dedicated Zeitgeist UI.

I don't agree. Bookmarks are used to mark that an user consider the importance of an item above average. This can then be considered together with frequency of use, associated tags, etc. to choose where and how to display the item.

Revision history for this message
Siegfried Gevatter (rainct) wrote :

Anyway, the bug (of not accepting a list for "uri" and "name") has been fixed now; I'm leaving a 0.3 task open so that I don't forget to remove the backwards compatibility in 0.3 (will do once the 0.2.1 tarball is out, so that merging isn't unnecessarily complicated more).

Some more changes we could do for 0.3 (unrelated to this):
 - Rename "name" to "text".
 - Currently tags have an AND condition. We could let the tags filter take a list of lists (instead of just a list) so that everything inside a list has an AND condition but the different lists have an OR condition between each other.

Revision history for this message
Seif Lotfy (seif) wrote :

For all i can see countevents is not there anymore. The issues with bookmarks etc is not relevant anymore.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.