Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.bio.base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.bio.base
Commits
a4d08ea2
There was a problem fetching the pipeline summary.
Commit
a4d08ea2
authored
8 years ago
by
Pavel KORSHUNOV
Browse files
Options
Downloads
Patches
Plain Diff
Harmonized sphinx references
parent
1656a5c7
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!76
Fixing sphinx warnings
Pipeline
#
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
bob/bio/base/database/filelist/query.py
+12
-12
12 additions, 12 deletions
bob/bio/base/database/filelist/query.py
bootstrap-buildout.py
+15
-36
15 additions, 36 deletions
bootstrap-buildout.py
with
27 additions
and
48 deletions
bob/bio/base/database/filelist/query.py
+
12
−
12
View file @
a4d08ea2
...
@@ -393,7 +393,7 @@ class FileListBioDatabase(ZTBioDatabase):
...
@@ -393,7 +393,7 @@ class FileListBioDatabase(ZTBioDatabase):
"
The given T-norm model id
'
%s
'
cannot be found in one of the groups
'
%s
'"
%
(
t_model_id
,
groups
))
"
The given T-norm model id
'
%s
'
cannot be found in one of the groups
'
%s
'"
%
(
t_model_id
,
groups
))
def
clients
(
self
,
protocol
=
None
,
groups
=
None
):
def
clients
(
self
,
protocol
=
None
,
groups
=
None
):
"""
Returns a list of :py:class:`Client` objects for the specific query by the user.
"""
Returns a list of :py:class:`
bob.bio.base.database.
Client` objects for the specific query by the user.
Keyword Parameters:
Keyword Parameters:
...
@@ -403,7 +403,7 @@ class FileListBioDatabase(ZTBioDatabase):
...
@@ -403,7 +403,7 @@ class FileListBioDatabase(ZTBioDatabase):
groups : str or [str] or ``None``
groups : str or [str] or ``None``
The groups to which the clients belong (
"
dev
"
,
"
eval
"
,
"
world
"
,
"
optional_world_1
"
,
"
optional_world_2
"
).
The groups to which the clients belong (
"
dev
"
,
"
eval
"
,
"
world
"
,
"
optional_world_1
"
,
"
optional_world_2
"
).
Returns: A list containing all the :py:class:`Client` objects which have the given properties.
Returns: A list containing all the :py:class:`
bob.bio.base.database.
Client` objects which have the given properties.
"""
"""
protocol
=
protocol
or
self
.
protocol
protocol
=
protocol
or
self
.
protocol
...
@@ -411,7 +411,7 @@ class FileListBioDatabase(ZTBioDatabase):
...
@@ -411,7 +411,7 @@ class FileListBioDatabase(ZTBioDatabase):
return
[
Client
(
id
)
for
id
in
client_ids
]
return
[
Client
(
id
)
for
id
in
client_ids
]
def
tclients
(
self
,
protocol
=
None
,
groups
=
None
):
def
tclients
(
self
,
protocol
=
None
,
groups
=
None
):
"""
Returns a list of T-Norm :py:class:`Client` objects for the specific query by the user.
"""
Returns a list of T-Norm :py:class:`
bob.bio.base.database.
Client` objects for the specific query by the user.
Keyword Parameters:
Keyword Parameters:
...
@@ -421,7 +421,7 @@ class FileListBioDatabase(ZTBioDatabase):
...
@@ -421,7 +421,7 @@ class FileListBioDatabase(ZTBioDatabase):
groups : str or [str] or ``None``
groups : str or [str] or ``None``
The groups to which the clients belong (
"
dev
"
,
"
eval
"
).
The groups to which the clients belong (
"
dev
"
,
"
eval
"
).
Returns: A list containing all the T-Norm :py:class:`Client` objects which have the given properties.
Returns: A list containing all the T-Norm :py:class:`
bob.bio.base.database.
Client` objects which have the given properties.
"""
"""
protocol
=
protocol
or
self
.
protocol
protocol
=
protocol
or
self
.
protocol
tclient_ids
=
self
.
tclient_ids
(
protocol
,
groups
)
tclient_ids
=
self
.
tclient_ids
(
protocol
,
groups
)
...
@@ -559,7 +559,7 @@ class FileListBioDatabase(ZTBioDatabase):
...
@@ -559,7 +559,7 @@ class FileListBioDatabase(ZTBioDatabase):
return
self
.
__model_id_list__
(
groups
,
'
for_tnorm
'
,
protocol
)
return
self
.
__model_id_list__
(
groups
,
'
for_tnorm
'
,
protocol
)
def
objects
(
self
,
groups
=
None
,
protocol
=
None
,
purposes
=
None
,
model_ids
=
None
,
classes
=
None
,
**
kwargs
):
def
objects
(
self
,
groups
=
None
,
protocol
=
None
,
purposes
=
None
,
model_ids
=
None
,
classes
=
None
,
**
kwargs
):
"""
Returns a set of :py:class:`BioFile` objects for the specific query by the user.
"""
Returns a set of :py:class:`
bob.bio.base.database.
BioFile` objects for the specific query by the user.
Keyword Parameters:
Keyword Parameters:
...
@@ -587,7 +587,7 @@ class FileListBioDatabase(ZTBioDatabase):
...
@@ -587,7 +587,7 @@ class FileListBioDatabase(ZTBioDatabase):
default), it is considered the same as a tuple with all possible values.
default), it is considered the same as a tuple with all possible values.
Note: classes are not allowed to be specified when the
'
probes_filename
'
is used.
Note: classes are not allowed to be specified when the
'
probes_filename
'
is used.
Returns: A list of :py:class:`BioFile` objects considering all the filtering criteria.
Returns: A list of :py:class:`
bob.bio.base.database.
BioFile` objects considering all the filtering criteria.
"""
"""
protocol
=
protocol
or
self
.
protocol
protocol
=
protocol
or
self
.
protocol
...
@@ -669,7 +669,7 @@ class FileListBioDatabase(ZTBioDatabase):
...
@@ -669,7 +669,7 @@ class FileListBioDatabase(ZTBioDatabase):
return
self
.
_make_bio
(
retval
)
return
self
.
_make_bio
(
retval
)
def
tobjects
(
self
,
groups
=
None
,
protocol
=
None
,
model_ids
=
None
,
**
kwargs
):
def
tobjects
(
self
,
groups
=
None
,
protocol
=
None
,
model_ids
=
None
,
**
kwargs
):
"""
Returns a list of :py:class:`BioFile` objects for enrolling T-norm models for score normalization.
"""
Returns a list of :py:class:`
bob.bio.base.database.
BioFile` objects for enrolling T-norm models for score normalization.
Keyword Parameters:
Keyword Parameters:
...
@@ -684,7 +684,7 @@ class FileListBioDatabase(ZTBioDatabase):
...
@@ -684,7 +684,7 @@ class FileListBioDatabase(ZTBioDatabase):
groups : str or [str] or ``None``
groups : str or [str] or ``None``
The groups to which the models belong (
"
dev
"
,
"
eval
"
).
The groups to which the models belong (
"
dev
"
,
"
eval
"
).
Returns: A list of :py:class:`BioFile` objects considering all the filtering criteria.
Returns: A list of :py:class:`
bob.bio.base.database.
BioFile` objects considering all the filtering criteria.
"""
"""
protocol
=
protocol
or
self
.
protocol
protocol
=
protocol
or
self
.
protocol
groups
=
self
.
check_parameters_for_validity
(
groups
,
"
group
"
,
self
.
groups
(
protocol
,
add_world
=
False
))
groups
=
self
.
check_parameters_for_validity
(
groups
,
"
group
"
,
self
.
groups
(
protocol
,
add_world
=
False
))
...
@@ -704,7 +704,7 @@ class FileListBioDatabase(ZTBioDatabase):
...
@@ -704,7 +704,7 @@ class FileListBioDatabase(ZTBioDatabase):
return
self
.
_make_bio
(
retval
)
return
self
.
_make_bio
(
retval
)
def
zobjects
(
self
,
groups
=
None
,
protocol
=
None
,
**
kwargs
):
def
zobjects
(
self
,
groups
=
None
,
protocol
=
None
,
**
kwargs
):
"""
Returns a list of :py:class:`BioFile` objects to perform Z-norm score normalization.
"""
Returns a list of :py:class:`
bob.bio.base.database.
BioFile` objects to perform Z-norm score normalization.
Keyword Parameters:
Keyword Parameters:
...
@@ -737,8 +737,8 @@ class FileListBioDatabase(ZTBioDatabase):
...
@@ -737,8 +737,8 @@ class FileListBioDatabase(ZTBioDatabase):
Keyword parameters:
Keyword parameters:
file
:
:py:class:`bob.bio.base.database.BioFile`
file :py:class:`bob.bio.base.database.BioFile`
The
:py:class:`
BioFile
`
object for which the annotations should be read.
The BioFile object for which the annotations should be read.
Return value
Return value
The annotations as a dictionary: {
'
reye
'
:(re_y,re_x),
'
leye
'
:(le_y,le_x)}
The annotations as a dictionary: {
'
reye
'
:(re_y,re_x),
'
leye
'
:(le_y,le_x)}
...
@@ -764,7 +764,7 @@ class FileListBioDatabase(ZTBioDatabase):
...
@@ -764,7 +764,7 @@ class FileListBioDatabase(ZTBioDatabase):
**Keyword parameters**
**Keyword parameters**
file
:
:py:class:`bob.bio.base.database.BioFile`
file :py:class:`bob.bio.base.database.BioFile`
The BioFile object for which the file name should be returned.
The BioFile object for which the file name should be returned.
check_existence : bool
check_existence : bool
...
...
This diff is collapsed.
Click to expand it.
bootstrap-buildout.py
+
15
−
36
View file @
a4d08ea2
...
@@ -25,10 +25,7 @@ import tempfile
...
@@ -25,10 +25,7 @@ import tempfile
from
optparse
import
OptionParser
from
optparse
import
OptionParser
__version__
=
'
2015-07-01
'
tmpeggs
=
tempfile
.
mkdtemp
()
# See zc.buildout's changelog if this version is up to date.
tmpeggs
=
tempfile
.
mkdtemp
(
prefix
=
'
bootstrap-
'
)
usage
=
'''
\
usage
=
'''
\
[DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options]
[DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options]
...
@@ -43,9 +40,8 @@ this script from going over the network.
...
@@ -43,9 +40,8 @@ this script from going over the network.
'''
'''
parser
=
OptionParser
(
usage
=
usage
)
parser
=
OptionParser
(
usage
=
usage
)
parser
.
add_option
(
"
--version
"
,
parser
.
add_option
(
"
-v
"
,
"
--version
"
,
help
=
"
use a specific zc.buildout version
"
)
action
=
"
store_true
"
,
default
=
False
,
help
=
(
"
Return bootstrap.py version.
"
))
parser
.
add_option
(
"
-t
"
,
"
--accept-buildout-test-releases
"
,
parser
.
add_option
(
"
-t
"
,
"
--accept-buildout-test-releases
"
,
dest
=
'
accept_buildout_test_releases
'
,
dest
=
'
accept_buildout_test_releases
'
,
action
=
"
store_true
"
,
default
=
False
,
action
=
"
store_true
"
,
default
=
False
,
...
@@ -63,32 +59,24 @@ parser.add_option("-f", "--find-links",
...
@@ -63,32 +59,24 @@ parser.add_option("-f", "--find-links",
parser
.
add_option
(
"
--allow-site-packages
"
,
parser
.
add_option
(
"
--allow-site-packages
"
,
action
=
"
store_true
"
,
default
=
False
,
action
=
"
store_true
"
,
default
=
False
,
help
=
(
"
Let bootstrap.py use existing site packages
"
))
help
=
(
"
Let bootstrap.py use existing site packages
"
))
parser
.
add_option
(
"
--buildout-version
"
,
help
=
"
Use a specific zc.buildout version
"
)
parser
.
add_option
(
"
--setuptools-version
"
,
parser
.
add_option
(
"
--setuptools-version
"
,
help
=
"
Use a specific setuptools version
"
)
help
=
"
use a specific setuptools version
"
)
parser
.
add_option
(
"
--setuptools-to-dir
"
,
help
=
(
"
Allow for re-use of existing directory of
"
"
setuptools versions
"
))
options
,
args
=
parser
.
parse_args
()
if
options
.
version
:
print
(
"
bootstrap.py version %s
"
%
__version__
)
sys
.
exit
(
0
)
options
,
args
=
parser
.
parse_args
()
######################################################################
######################################################################
# load/install setuptools
# load/install setuptools
try
:
try
:
if
options
.
allow_site_packages
:
import
setuptools
import
pkg_resources
from
urllib.request
import
urlopen
from
urllib.request
import
urlopen
except
ImportError
:
except
ImportError
:
from
urllib2
import
urlopen
from
urllib2
import
urlopen
ez
=
{}
ez
=
{}
if
os
.
path
.
exists
(
'
ez_setup.py
'
):
exec
(
open
(
'
ez_setup.py
'
).
read
(),
ez
)
else
:
exec
(
urlopen
(
'
https://bootstrap.pypa.io/ez_setup.py
'
).
read
(),
ez
)
exec
(
urlopen
(
'
https://bootstrap.pypa.io/ez_setup.py
'
).
read
(),
ez
)
if
not
options
.
allow_site_packages
:
if
not
options
.
allow_site_packages
:
...
@@ -100,19 +88,12 @@ if not options.allow_site_packages:
...
@@ -100,19 +88,12 @@ if not options.allow_site_packages:
# We can't remove these reliably
# We can't remove these reliably
if
hasattr
(
site
,
'
getsitepackages
'
):
if
hasattr
(
site
,
'
getsitepackages
'
):
for
sitepackage_path
in
site
.
getsitepackages
():
for
sitepackage_path
in
site
.
getsitepackages
():
# Strip all site-packages directories from sys.path that
sys
.
path
[:]
=
[
x
for
x
in
sys
.
path
if
sitepackage_path
not
in
x
]
# are not sys.prefix; this is because on Windows
# sys.prefix is a site-package directory.
if
sitepackage_path
!=
sys
.
prefix
:
sys
.
path
[:]
=
[
x
for
x
in
sys
.
path
if
sitepackage_path
not
in
x
]
setup_args
=
dict
(
to_dir
=
tmpeggs
,
download_delay
=
0
)
setup_args
=
dict
(
to_dir
=
tmpeggs
,
download_delay
=
0
)
if
options
.
setuptools_version
is
not
None
:
if
options
.
setuptools_version
is
not
None
:
setup_args
[
'
version
'
]
=
options
.
setuptools_version
setup_args
[
'
version
'
]
=
options
.
setuptools_version
if
options
.
setuptools_to_dir
is
not
None
:
setup_args
[
'
to_dir
'
]
=
options
.
setuptools_to_dir
ez
[
'
use_setuptools
'
](
**
setup_args
)
ez
[
'
use_setuptools
'
](
**
setup_args
)
import
setuptools
import
setuptools
...
@@ -129,12 +110,7 @@ for path in sys.path:
...
@@ -129,12 +110,7 @@ for path in sys.path:
ws
=
pkg_resources
.
working_set
ws
=
pkg_resources
.
working_set
setuptools_path
=
ws
.
find
(
pkg_resources
.
Requirement
.
parse
(
'
setuptools
'
)).
location
# Fix sys.path here as easy_install.pth added before PYTHONPATH
cmd
=
[
sys
.
executable
,
'
-c
'
,
cmd
=
[
sys
.
executable
,
'
-c
'
,
'
import sys; sys.path[0:0] = [%r];
'
%
setuptools_path
+
'
from setuptools.command.easy_install import main; main()
'
,
'
from setuptools.command.easy_install import main; main()
'
,
'
-mZqNxd
'
,
tmpeggs
]
'
-mZqNxd
'
,
tmpeggs
]
...
@@ -147,8 +123,11 @@ find_links = os.environ.get(
...
@@ -147,8 +123,11 @@ find_links = os.environ.get(
if
find_links
:
if
find_links
:
cmd
.
extend
([
'
-f
'
,
find_links
])
cmd
.
extend
([
'
-f
'
,
find_links
])
setuptools_path
=
ws
.
find
(
pkg_resources
.
Requirement
.
parse
(
'
setuptools
'
)).
location
requirement
=
'
zc.buildout
'
requirement
=
'
zc.buildout
'
version
=
options
.
buildout_
version
version
=
options
.
version
if
version
is
None
and
not
options
.
accept_buildout_test_releases
:
if
version
is
None
and
not
options
.
accept_buildout_test_releases
:
# Figure out the most recent final version of zc.buildout.
# Figure out the most recent final version of zc.buildout.
import
setuptools.package_index
import
setuptools.package_index
...
@@ -188,7 +167,7 @@ if version:
...
@@ -188,7 +167,7 @@ if version:
cmd
.
append
(
requirement
)
cmd
.
append
(
requirement
)
import
subprocess
import
subprocess
if
subprocess
.
call
(
cmd
)
!=
0
:
if
subprocess
.
call
(
cmd
,
env
=
dict
(
os
.
environ
,
PYTHONPATH
=
setuptools_path
)
)
!=
0
:
raise
Exception
(
raise
Exception
(
"
Failed to execute command:
\n
%s
"
%
repr
(
cmd
)[
1
:
-
1
])
"
Failed to execute command:
\n
%s
"
%
repr
(
cmd
)[
1
:
-
1
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment