Commit f27b6449 authored by Manuel Günther's avatar Manuel Günther
Browse files

Removed Client and updated documentation

parent f8970c90
Pipeline #11846 passed with stages
in 10 minutes and 10 seconds
......@@ -2,8 +2,7 @@ from .file import BioFile
from .file import BioFileSet
from .database import BioDatabase
from .database import ZTBioDatabase
from .filelist.query import FileListBioDatabase
from .filelist.models import Client
from .filelist import FileListBioDatabase
from . import filelist
# gets sphinx autodoc done right - don't remove it
......@@ -27,7 +26,6 @@ __appropriate__(
BioFileSet,
BioDatabase,
ZTBioDatabase,
FileListBioDatabase,
Client,
FileListBioDatabase
)
__all__ = [_ for _ in dir() if not _.startswith('_')]
......@@ -5,21 +5,24 @@ import bob.db.base
class BioFile(bob.db.base.File):
"""A simple base class that defines basic properties of File object for the use in verification experiments"""
"""A simple base class that defines basic properties of File object for the use in verification experiments
def __init__(self, client_id, path, file_id=None):
"""**Constructor Documentation**
Parameters
----------
client_id : object
The id of the client this file belongs to.
Its type depends on your implementation.
If you use an SQL database, this should be an SQL type like Integer or String.
Initialize the File object with the minimum required data.
file_id : object
see :py:class:`bob.db.base.File` constructor
Parameters:
path : object
see :py:class:`bob.db.base.File` constructor
"""
client_id : various type
The id of the client this file belongs to.
Its type depends on your implementation.
If you use an SQL database, this should be an SQL type like Integer or String.
For path and file_id, please refer to :py:class:`bob.db.base.File` constructor
"""
def __init__(self, client_id, path, file_id=None):
bob.db.base.File.__init__(self, path, file_id)
# just copy the information
......@@ -34,18 +37,18 @@ class BioFileSet(BioFile):
type :py:class:`bob.bio.base.database.BioFile` of the same client.
The file set id can be anything hashable, but needs to be unique all over the database.
**Parameters:**
Parameters
----------
file_set_id : str or int
A unique ID that identifies the file set.
files : [:py:class:`bob.bio.base.database.BioFile`]
A non-empty list of BioFile objects that should be stored inside this file.
All files of that list need to have the same client ID.
"""
def __init__(self, file_set_id, files, path=None):
"""The list of :py:class:`bob.bio.base.database.BioFile` objects stored in this file set"""
# don't accept empty file lists
assert len(files), "Cannot create an empty BioFileSet"
......
from .models import ListReader, Client, FileListFile
from .models import FileListFile
from .query import FileListBioDatabase
from .driver import Interface
......@@ -20,8 +20,6 @@ def __appropriate__(*args):
__appropriate__(
ListReader,
Client,
FileListFile,
FileListBioDatabase,
Interface,
......
......@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
This file defines simple Client and File interfaces that are comparable with other bob.db databases.
This file defines a simple interface that are comparable with other bob.db databases.
"""
import os
......@@ -26,16 +26,6 @@ import fileinput
import re
class Client(object):
"""
The clients of this database contain ONLY client ids. Nothing special.
"""
def __init__(self, client_id):
self.id = client_id
"""The ID of the client, which is stored as a :py:class:`str` object."""
class FileListFile(object):
"""
Initialize the File object with the minimum required data.
......@@ -43,16 +33,19 @@ class FileListFile(object):
If the ``model_id`` is not specified, ``model_id`` and ``client_id`` are identical.
If the ``claimed_id`` is not specified, it is expected to be the ``client_id``.
**Parameters**
Parameters
----------
client_id : various type
The id of the client, this file belongs to.
The type of it is dependent on your implementation.
If you use an SQL database, this should be an SQL type like Integer or String.
path : str
The path of this file, relative to the basic directory.
If you use an SQL database, this should be the SQL type String.
Please do not specify any file extensions.
file_id : various type
The id of the file.
The type of it is dependent on your implementation.
......
This diff is collapsed.
......@@ -28,8 +28,10 @@ Implementations
bob.bio.base.algorithm.LDA
bob.bio.base.algorithm.PLDA
bob.bio.base.algorithm.BIC
bob.bio.base.database.BioFile
bob.bio.base.database.BioDatabase
bob.bio.base.database.ZTBioDatabase
bob.bio.base.database.FileListBioDatabase
Preprocessors
......
Supports Markdown
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