[Gnome-zeitgeist] New mailing list message requiring approval for Friends of GNOME Zeitgeist

2010-09-23 Thread Friends of GNOME Zeitgeist
Hello GNOME Zeitgeist Team,

Friends of GNOME Zeitgeist has a new message requiring your approval.

Subject: RE: gnome-zeitgeist-us...@lists.launchpad.net PainKiller \xae 
Discount #8475
Author name: Friends of GNOME Zeitgeist
Author url: https://launchpad.net/~gnome-zeitgeist-users
Date: 2010-09-23 06:43:04+00:00
Message-ID: 20100923064304.2957.77...@forster.canonical.com

A message has been posted to the mailing list for your team, but this
message requires your approval before it will be sent to the list
members.  After reviewing the message, you may approve, discard or
reject it.

To review all messages pending approval, visit:

https://launchpad.net/~gnome-zeitgeist-users/+mailinglist-moderate

Regards,
The Launchpad team

___
Mailing list: https://launchpad.net/~gnome-zeitgeist
Post to : gnome-zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~gnome-zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Merge] lp:~zeitgeist/zeitgeist/fix-641968 into lp:zeitgeist

2010-09-23 Thread Seif Lotfy
Seif Lotfy has proposed merging lp:~zeitgeist/zeitgeist/fix-641968 into 
lp:zeitgeist.

Requested reviews:
  Zeitgeist Framework Team (zeitgeist)
Related bugs:
  #641968 querying on LeastRecentActor and MostRecentActor for a certain 
subject_uri is not working
  https://bugs.launchpad.net/bugs/641968


Fixing the LeastRecentActor issues we have:
I came to the point where I think we had a fundamental understanding issue.

IMHO our current understanding of LeastRecentActor is wrong...
Let's assume we have sequential events. (The actors are defined by numbers)

2, 1, 3, 2, 1, 4

So we have 4 different actors (1,2,3,4) and we want to sort them by least 
recent.
the least recent is not 2 or 1 since they are used again at the end. the least 
recent is 3

This means LeastRecentActors should return the latest actors sorted ASC:

3, 2, 1, 4

and not

2, 1, 3, 4

MostRecentActors should return the same last 4 files but in reversed sorting:

4, 3, 1, 2
-- 
https://code.launchpad.net/~zeitgeist/zeitgeist/fix-641968/+merge/36424
Your team Zeitgeist Framework Team is requested to review the proposed merge of 
lp:~zeitgeist/zeitgeist/fix-641968 into lp:zeitgeist.
=== modified file '_zeitgeist/engine/main.py'
--- _zeitgeist/engine/main.py	2010-09-17 08:37:39 +
+++ _zeitgeist/engine/main.py	2010-09-23 10:01:19 +
@@ -346,7 +346,7 @@
 		if order == ResultType.LeastRecentActor:
 			sql += 
 NATURAL JOIN (
-	SELECT actor, min(timestamp) AS timestamp
+	SELECT actor, timestamp
 	FROM event_view
 	GROUP BY actor)
 

=== modified file 'test/blacklist-test.py'
--- test/blacklist-test.py	2010-04-26 19:42:07 +
+++ test/blacklist-test.py	2010-09-23 10:01:19 +
@@ -5,7 +5,6 @@
 import sys
 import os
 import unittest
-import dbus
 
 sys.path.insert(0, os.path.join(os.path.dirname(__file__), ..))
 from zeitgeist.client import ZeitgeistDBusInterface
@@ -19,6 +18,9 @@
 		self.blacklist = None
 	
 	def setUp(self):
+		# lazy import to get a chance to use the private bus
+		import dbus
+		
 		# We set up the connection lazily in order to wait for the
 		# engine to come up
 		super(BlacklistTest, self).setUp()

=== modified file 'test/engine-extension-test.py'
--- test/engine-extension-test.py	2010-08-02 10:13:12 +
+++ test/engine-extension-test.py	2010-09-23 10:01:19 +
@@ -7,30 +7,23 @@
 import weakref
 sys.path.insert(0, os.path.join(os.path.dirname(__file__), ..))
 
-import _zeitgeist.engine
-from _zeitgeist.engine import constants
-from _zeitgeist.engine import get_engine
-from _zeitgeist.engine.extension import Extension
-
 import unittest
 from testutils import import_events
 
-class _Extension1(Extension):
-	PUBLIC_METHODS = [return_hallo, return_engine]
-		
-	def return_hallo(self):
-		return Hallo
-		
-	def return_boo(self):
-		return boo
-		
-	def return_engine(self):
-		return self.engine
-
+Extension = None
 
 class _engineTestClass(unittest.TestCase):
 	
 	def setUp (self):
+		global Extension
+		
+		from _zeitgeist.engine import constants
+		from _zeitgeist.engine import get_engine
+		
+		if Extension is None:
+			from _zeitgeist.engine.extension import Extension as _Extension
+			Extension = _Extension
+		
 		constants.DATABASE_FILE = :memory:
 		self.save_default_ext = os.environ.get(ZEITGEIST_DEFAULT_EXTENSIONS)
 		self.save_extra_ext = os.environ.get(ZEITGEIST_EXTRA_EXTENSIONS)
@@ -39,6 +32,7 @@
 		self.engine = get_engine()
 		
 	def tearDown (self):
+		import _zeitgeist.engine
 		if self.save_default_ext is not None:
 			os.environ[ZEITGEIST_DEFAULT_EXTENSIONS] = self.save_default_ext
 		else:
@@ -54,13 +48,27 @@
 class TestExtensions(_engineTestClass):
 	
 	def testCreateEngine(self):
-		engine = get_engine()
+
+		class _Extension1(Extension):
+			PUBLIC_METHODS = [return_hallo, return_engine]
+
+			def return_hallo(self):
+return Hallo
+
+			def return_boo(self):
+return boo
+
+			def return_engine(self):
+return self.engine
+		
+		engine = self.engine
 		self.assertEqual(len(engine.extensions), 0)
 		self.assertRaises(AttributeError, engine.extensions.__getattr__, return_hallo)
 		engine.extensions.load(_Extension1)
 		self.assertEqual(engine.extensions.return_hallo(), Hallo)
 		self.assertRaises(AttributeError, engine.extensions.__getattr__, return_boo)
 		self.assertEqual(engine.extensions.return_engine(), weakref.proxy(engine))
+		
 
 class TestExtensionHooks(_engineTestClass):
 	

=== modified file 'test/engine-test.py'
--- test/engine-test.py	2010-09-19 09:24:40 +
+++ test/engine-test.py	2010-09-23 10:01:19 +
@@ -9,7 +9,6 @@
 import _zeitgeist.engine
 from _zeitgeist.engine import constants
 from _zeitgeist.engine import get_engine
-from _zeitgeist.engine.sql import WhereClause
 from zeitgeist.datamodel import *
 from testutils import import_events
 
@@ -602,7 +601,26 @@
 		
 		events = self.engine.find_events(
 			TimeRange.always(), [], StorageState.Any, 0, ResultType.LeastRecentActor)
-		self.assertEquals([e[0][1] for e in events], 

[Zeitgeist] [Bug 641968] Re: querying on LeastRecentActor and MostRecentActor for a certain subject_uri is not working

2010-09-23 Thread Seif Lotfy
IMHO our current understanding of LeastRecentActor is wrong...
Let's assume we have sequential events. (The actors are defined by numbers)

2, 1, 3, 2, 1, 4

So we have 4 different actors (1,2,3,4) and we want to sort them by least 
recent.
the least recent is not 2 or 1 since they are used again at the end. the least 
recent is 3

This means LeastRecentActors should return the latest actors sorted ASC:

3, 2, 1, 4

and not

2, 1, 3, 4

MostRecentActors should return the same last 4 files but in reversed
sorting:

4, 3, 1, 2

** Branch linked: lp:~zeitgeist/zeitgeist/fix-641968

-- 
querying on LeastRecentActor and MostRecentActor for a certain subject_uri is 
not working
https://bugs.launchpad.net/bugs/641968
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.

Status in Zeitgeist Framework: In Progress

Bug description:
Scenario: I would like to know which actor touched a file with uri=home/boo 
least recently.

This query should do the job:
 template = Event.new_for_values(subject_uri=home/boo)
 ids = engine.find_eventids(TimeRange.always(), [template, ], 
 StorageState.Any, 0, ResultType.LeastRecentActor)

However as you can see in the attached script this does always return an empty 
result. It looks like LeastRecentActor plus any search template is not working.



___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 641968] Re: querying on LeastRecentActor and MostRecentActor for a certain subject_uri is not working

2010-09-23 Thread Seif Lotfy
** Branch linked: lp:~seif/zeitgeist/fix-641968

-- 
querying on LeastRecentActor and MostRecentActor for a certain subject_uri is 
not working
https://bugs.launchpad.net/bugs/641968
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.

Status in Zeitgeist Framework: In Progress

Bug description:
Scenario: I would like to know which actor touched a file with uri=home/boo 
least recently.

This query should do the job:
 template = Event.new_for_values(subject_uri=home/boo)
 ids = engine.find_eventids(TimeRange.always(), [template, ], 
 StorageState.Any, 0, ResultType.LeastRecentActor)

However as you can see in the attached script this does always return an empty 
result. It looks like LeastRecentActor plus any search template is not working.



___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 641968] Re: querying on LeastRecentActor and MostRecentActor for a certain subject_uri is not working

2010-09-23 Thread Markus Korn
I'm removing the attached branch, since the initial issue is not fixed
by this changes (maybe indirectly=

** Branch unlinked: lp:~seif/zeitgeist/fix-641968

** Changed in: zeitgeist
   Status: In Progress = Confirmed

-- 
querying on LeastRecentActor and MostRecentActor for a certain subject_uri is 
not working
https://bugs.launchpad.net/bugs/641968
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.

Status in Zeitgeist Framework: Confirmed

Bug description:
Scenario: I would like to know which actor touched a file with uri=home/boo 
least recently.

This query should do the job:
 template = Event.new_for_values(subject_uri=home/boo)
 ids = engine.find_eventids(TimeRange.always(), [template, ], 
 StorageState.Any, 0, ResultType.LeastRecentActor)

However as you can see in the attached script this does always return an empty 
result. It looks like LeastRecentActor plus any search template is not working.



___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] cldx3000 joined gnome-zeitgeist-users

2010-09-23 Thread Friends of GNOME Zeitgeist
Hello Zeitgeist Framework Team,

cldx (cldx3000) has been added as a member of Friends of GNOME Zeitgeist
(gnome-zeitgeist-users) by cldx (cldx3000). Follow the link below for
more details.

https://launchpad.net/~gnome-zeitgeist-users/+member/cldx3000

-- 
You received this email because you are an admin of the Friends of GNOME 
Zeitgeist team
via the Zeitgeist Framework Team team.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] Translation template import - zeitgeist in Zeitgeist Framework 0.1

2010-09-23 Thread rosetta
Hello Zeitgeist Framework Team,

On 2010-09-24 05:40z (1 minutes ago), you uploaded a translation
template for zeitgeist in Zeitgeist Framework 0.1 in Launchpad.

The template has now been imported successfully.


Thank you,

The Launchpad team

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] Translation template import - zeitgeist in Zeitgeist Framework 0.5

2010-09-23 Thread rosetta
Hello Zeitgeist Framework Team,

On 2010-09-24 05:40z (2 minutes ago), you uploaded a translation
template for zeitgeist in Zeitgeist Framework 0.5 in Launchpad.

The template has now been imported successfully.


Thank you,

The Launchpad team

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp