Commit b46ddd3e authored by MGB's avatar MGB
Browse files

minor fixes

parent 21643d35
......@@ -21,7 +21,7 @@ import os,string
from .models import *
# clients
userid_clients = range(1, 300)
userid_clients = range(1, 301)
def nodot(item):
"""Can be used to ignore hidden files, starting with the . character."""
......@@ -29,7 +29,7 @@ def nodot(item):
def add_clients(session, verbose):
"""Add clients to the ATVS Keystroke database."""
for cdid in userid_clients:
for cid in userid_clients:
if verbose>1: print(" Adding user '%s'" % (cid))
session.add(Client(cid))
......
......@@ -107,14 +107,14 @@ class Database(bob.db.verification.utils.SQLiteDatabase,bob.db.verification.util
"""
groups = self.__group_replace_eval_by_genuine__(groups)
groups = self.check_parameters_for_validity(groups, "group", ('Genuine',))
#groups = self.check_parameters_for_validity(groups, "group", ('Genuine',))
# List of the clients
q = self.query(Client)
if groups:
"""if groups:
q = q.filter(Client.stype.in_(groups))
else:
q = q.filter(Client.stype.in_(['Genuine']))
q = q.filter(Client.stype.in_(['Genuine']))"""
q = q.order_by(Client.id)
return list(q)
......@@ -200,7 +200,6 @@ class Database(bob.db.verification.utils.SQLiteDatabase,bob.db.verification.util
if ('eval' in groups):
if('enrol' in purposes):
q = self.query(File).join(Client).join((ProtocolPurpose, File.protocolPurposes)).join(Protocol).\
filter(Client.stype.in_(['Genuine'])).\
filter(and_(Protocol.name.in_(protocol), ProtocolPurpose.sgroup.in_(groups), ProtocolPurpose.purpose == 'enrol'))
if model_ids:
q = q.filter(Client.subid.in_(model_ids))
......@@ -210,7 +209,6 @@ class Database(bob.db.verification.utils.SQLiteDatabase,bob.db.verification.util
if('probe' in purposes):
if('client' in classes):
q = self.query(File).join(Client).join((ProtocolPurpose, File.protocolPurposes)).join(Protocol).\
filter(Client.stype.in_(['Genuine'])).\
filter(and_(Protocol.name.in_(protocol), ProtocolPurpose.sgroup.in_(groups), ProtocolPurpose.purpose == 'probe'))
if model_ids:
q = q.filter(Client.subid.in_(model_ids))
......@@ -219,7 +217,6 @@ class Database(bob.db.verification.utils.SQLiteDatabase,bob.db.verification.util
if('impostor' in classes):
q = self.query(File).join(Client).join((ProtocolPurpose, File.protocolPurposes)).join(Protocol).\
filter(Client.stype.in_(['Impostor'])).\
filter(and_(Protocol.name.in_(protocol), ProtocolPurpose.sgroup.in_(groups), ProtocolPurpose.purpose == 'probe'))
if model_ids:
q = q.filter(Client.subid.in_(model_ids))
......
......@@ -29,10 +29,10 @@ version = open("version.txt").read().rstrip()
# parameters that define our package.
setup(
name='bob.db.atvskeystroke',
name='bob.db.KBOC16',
version=version,
description='KBOC16 Database Access API for Bob',
url='http://github.com/bioidiap/bob.db.KBOC16',
url='http://github.com/mgbarrero/bob.db.KBOC16',
license='GPLv3',
author='Marta Gomez-Barrero',
author_email='marta.barrero@uam.es',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment