Preparing release

parent bbaadf7b
Pipeline #4196 failed with stages
in 4 minutes and 17 seconds
......@@ -29,11 +29,17 @@ variables:
- git clean -ffdx
- curl --silent https://gitlab.idiap.ch/bob/bob/snippets/7/raw | tr -d '\r' > bootstrap-conda.sh
- chmod 755 ./bootstrap-conda.sh
- sed 1d -i requirements.txt # GAMBIT to remove pillow<3
- ./bootstrap-conda.sh ${CONDA_FOLDER} ${PYTHON_VER} ${CONDA_PREFIX}
variables: &build_variables
BOB_DOCUMENTATION_SERVER: "http://www.idiap.ch/software/bob/docs/latest/bob/%s/master/"
script:
- ./bin/buildout
- ./bin/buildout -c buildout-before-patch.cfg
- wget https://www.idiap.ch/software/bob/databases/latest/PythonFaceEvaluation.tar.bz2
- mkdir PythonFaceEvaluation
- tar -xjf PythonFaceEvaluation.tar.bz2 -C PythonFaceEvaluation
- ./bin/patch_CSU.py PythonFaceEvaluation
- ./bin/buildout buildout:csu-dir=./PythonFaceEvaluation
- if [ -x ./bin/bob_dbmanage.py ]; then ./bin/bob_dbmanage.py all download --force; fi
- ./bin/sphinx-build doc sphinx
- ./bin/python setup.py bdist_wheel --python-tag ${WHEEL_TAG}
......@@ -45,6 +51,7 @@ variables:
- bootstrap-conda.sh
- dist/
- sphinx/
- PythonFaceEvaluation/
# Template for building on a Linux machine
......@@ -74,11 +81,14 @@ variables:
.test_template: &test_job
stage: test
before_script:
- sed 1d -i requirements.txt # GAMBIT to remove pillow<3
- ./bootstrap-conda.sh ${CONDA_FOLDER} ${PYTHON_VER} ${CONDA_PREFIX}
- source ${CONDA_FOLDER}/bin/activate ${CONDA_PREFIX}
- pip install --use-wheel --no-index --pre dist/*.whl
- conda install --yes -c conda-forge -p ${CONDA_PREFIX} jpeg==9b opencv==2.4.12
- pip install --use-wheel --no-index --pre dist/*.whl
script:
- cd ${CONDA_PREFIX}
- cd ${CONDA_PREFIX}
- export PYTHONPATH="../PythonFaceEvaluation/src:$PYTHONPATH"
- python -c "from ${CI_PROJECT_NAME} import get_config; print(get_config())"
- coverage run --source=${CI_PROJECT_NAME} ./bin/nosetests -sv ${CI_PROJECT_NAME}
- coverage report
......@@ -137,118 +147,17 @@ test_linux_27:
tags:
- conda-linux
wheels_linux_27:
<<: *wheels_job
docs_linux_27:
<<: *docs_job
dependencies:
- build_linux_27
tags:
- conda-linux
# Linux + Python 3.4: Builds and tests
build_linux_34:
<<: *linux_build_job
variables: &linux_34_build_variables
<<: *linux_build_variables
PYTHON_VER: "3.4"
WHEEL_TAG: "py3"
tags:
- conda-linux
test_linux_34:
<<: *test_job
variables: *linux_34_build_variables
dependencies:
- build_linux_34
tags:
- conda-linux
# Linux + Python 3.5: Builds, tests, uploads wheel
build_linux_35:
<<: *linux_build_job
variables: &linux_35_build_variables
<<: *linux_build_variables
PYTHON_VER: "3.5"
WHEEL_TAG: "py3"
tags:
- conda-linux
test_linux_35:
<<: *test_job
variables: *linux_35_build_variables
dependencies:
- build_linux_35
tags:
- conda-linux
wheels_linux_35:
wheels_linux_27:
<<: *wheels_job
dependencies:
- build_linux_35
tags:
- conda-linux
docs_linux_35:
<<: *docs_job
dependencies:
- build_linux_35
- build_linux_27
tags:
- conda-linux
# Mac OSX + Python 2.7: Builds and tests
build_macosx_27:
<<: *macosx_build_job
variables: &macosx_27_build_variables
<<: *macosx_build_variables
PYTHON_VER: "2.7"
WHEEL_TAG: "py27"
tags:
- conda-macosx
test_macosx_27:
<<: *test_job
variables: *macosx_27_build_variables
dependencies:
- build_macosx_27
tags:
- conda-macosx
# Mac OSX + Python 3.4: Builds and tests
build_macosx_34:
<<: *macosx_build_job
variables: &macosx_34_build_variables
<<: *macosx_build_variables
PYTHON_VER: "3.4"
WHEEL_TAG: "py3"
tags:
- conda-macosx
test_macosx_34:
<<: *test_job
variables: *macosx_34_build_variables
dependencies:
- build_macosx_34
tags:
- conda-macosx
# Mac OSX + Python 3.5: Builds and tests
build_macosx_35:
<<: *macosx_build_job
variables: &macosx_35_build_variables
<<: *macosx_build_variables
PYTHON_VER: "3.5"
WHEEL_TAG: "py3"
tags:
- conda-macosx
test_macosx_35:
<<: *test_job
variables: *macosx_35_build_variables
dependencies:
- build_macosx_35
tags:
- conda-macosx
\ No newline at end of file
......@@ -7,7 +7,7 @@ import bob.bio.base
from .. import utils
class LDAIR (bob.bio.base.algorithm.Algorithm):
"""This class defines a wrapper for the :py:class:`facerec2010.baseline.lda.LRLDA` class to be used as an image :py:class:`bob.bio.base.algorithm.Algorithm`.
"""This class defines a wrapper for the `facerec2010.baseline.lda.LRLDA` class to be used as an image :py:class:`bob.bio.base.algorithm.Algorithm`.
**Parameters:**
......@@ -66,12 +66,12 @@ class LDAIR (bob.bio.base.algorithm.Algorithm):
**Parameters:**
enroll_features : [:py:class:`facerec2010.baseline.common.FaceRecord`]
enroll_features : [`facerec2010.baseline.common.FaceRecord`]
The features used to enroll the model.
**Returns:**
model : [:py:class:`facerec2010.baseline.common.FaceRecord`]
model : [`facerec2010.baseline.common.FaceRecord`]
The model, which is identical to the ``enroll_features``.
"""
[self._check_feature(f) for f in enroll_features]
......@@ -85,7 +85,7 @@ class LDAIR (bob.bio.base.algorithm.Algorithm):
**Parameters:**
model : [:py:class:`facerec2010.baseline.common.FaceRecord`]
model : [`facerec2010.baseline.common.FaceRecord`]
The model to be written.
model_file : str
......@@ -107,7 +107,7 @@ class LDAIR (bob.bio.base.algorithm.Algorithm):
**Returns:**
model : [:py:class:`facerec2010.baseline.common.FaceRecord`]
model : [`facerec2010.baseline.common.FaceRecord`]
The model read from file.
"""
# just read the model from .pkl file
......@@ -123,10 +123,10 @@ class LDAIR (bob.bio.base.algorithm.Algorithm):
**Parameters:**
model : [:py:class:`facerec2010.baseline.common.FaceRecord`]
model : [`facerec2010.baseline.common.FaceRecord`]
The model to compare, which is actually a list of extracted features.
probe : :py:class:`facerec2010.baseline.common.FaceRecord`
probe : `facerec2010.baseline.common.FaceRecord`
The probe to compare.
**Returns**:
......
......@@ -9,7 +9,7 @@ from .. import utils
class LRPCA (bob.bio.base.algorithm.Algorithm):
"""This class defines a wrapper for the :py:class:`facerec2010.baseline.lda.LRPCA` class to be used as an image :py:class:`bob.bio.base.algorithm.Algorithm`.
"""This class defines a wrapper for the `facerec2010.baseline.lda.LRPCA` class to be used as an image :py:class:`bob.bio.base.algorithm.Algorithm`.
**Parameters:**
......@@ -58,7 +58,7 @@ class LRPCA (bob.bio.base.algorithm.Algorithm):
**Returns:**
model : [:py:class:`facerec2010.baseline.pca.FaceRecord`]
model : [`facerec2010.baseline.pca.FaceRecord`]
The model, which a collection of face records, storing the given ``enroll_features``.
"""
# no rule to enroll features in the LRPCA setup, so we just store all features
......@@ -76,7 +76,7 @@ class LRPCA (bob.bio.base.algorithm.Algorithm):
**Parameters:**
model : [:py:class:`facerec2010.baseline.pca.FaceRecord`]
model : [`facerec2010.baseline.pca.FaceRecord`]
The model to be written.
model_file : str
......@@ -98,7 +98,7 @@ class LRPCA (bob.bio.base.algorithm.Algorithm):
**Returns:**
model : [:py:class:`facerec2010.baseline.pca.FaceRecord`]
model : [`facerec2010.baseline.pca.FaceRecord`]
The model read from file.
"""
# just read the model from .pkl file
......@@ -112,7 +112,7 @@ class LRPCA (bob.bio.base.algorithm.Algorithm):
**Parameters:**
model : [:py:class:`facerec2010.baseline.pca.FaceRecord`]
model : [`facerec2010.baseline.pca.FaceRecord`]
The model to compare, which is actually a list of extracted features.
probe : :py:class:`numpy.ndarray`
......
......@@ -13,7 +13,7 @@ logger = logging.getLogger("bob.bio.csu")
from .. import utils
class LDAIR (bob.bio.base.extractor.Extractor):
"""This class defines a wrapper for the :py:class:`facerec2010.baseline.lda.LRLDA` class to be used as an image :py:class:`bob.bio.base.extractor.Extractor`.
"""This class defines a wrapper for the `facerec2010.baseline.lda.LRLDA` class to be used as an image :py:class:`bob.bio.base.extractor.Extractor`.
**Parameters:**
......@@ -127,7 +127,7 @@ class LDAIR (bob.bio.base.extractor.Extractor):
**Returns:**
extracted : :py:class:`facerec2010.baseline.common.FaceRecord`
extracted : `facerec2010.baseline.common.FaceRecord`
The extracted image feature.
"""
self._check_image(image)
......@@ -144,7 +144,7 @@ class LDAIR (bob.bio.base.extractor.Extractor):
**Parameters:**
feature : :py:class:`facerec2010.baseline.common.FaceRecord`
feature : `facerec2010.baseline.common.FaceRecord`
The extracted feature to be written.
feature_file : str or :py:class:`bob.io.base.HDF5File`
......@@ -167,7 +167,7 @@ class LDAIR (bob.bio.base.extractor.Extractor):
**Returns:**
feature : :py:class:`facerec2010.baseline.common.FaceRecord`
feature : `facerec2010.baseline.common.FaceRecord`
The read feature.
"""
# read the feature from .pkl file
......
......@@ -13,7 +13,7 @@ import logging
logger = logging.getLogger("bob.bio.csu")
class LRPCA (bob.bio.base.extractor.Extractor):
"""This class defines a wrapper for the :py:class:`facerec2010.baseline.lda.LRPCA` class to be used as an image :py:class:`bob.bio.base.extractor.Extractor`.
"""This class defines a wrapper for the `facerec2010.baseline.lda.LRPCA` class to be used as an image :py:class:`bob.bio.base.extractor.Extractor`.
**Parameters:**
......
......@@ -8,7 +8,7 @@ import bob.bio.base
import bob.bio.face
class LDAIR (bob.bio.face.preprocessor.FaceCrop):
"""This class defines a wrapper for the :py:class:`facerec2010.baseline.lda.LRLDA` class to be used as an image :py:class:`bob.bio.base.preprocessor.Preprocessor`.
"""This class defines a wrapper for the `facerec2010.baseline.lda.LRLDA` class to be used as an image :py:class:`bob.bio.base.preprocessor.Preprocessor`.
**Parameters:**
......@@ -24,11 +24,12 @@ class LDAIR (bob.bio.face.preprocessor.FaceCrop):
"""
def __init__(self, REGION_ARGS = facerec2010.baseline.lda.CohortLDA_REGIONS, REGION_KEYWORDS = facerec2010.baseline.lda.CohortLDA_KEYWORDS, face_detector = None):
bob.bio.base.preprocessor.Preprocessor.__init__(self, REGION_ARGS=str(REGION_ARGS), REGION_KEYWORDS=str(REGION_KEYWORDS), face_detector=str(face_detector))
bob.bio.base.preprocessor.Preprocessor.__init__(self, REGION_ARGS=str(REGION_ARGS), REGION_KEYWORDS=str(REGION_KEYWORDS), face_detector=str(face_detector), read_original_data=self.read_original_data)
self.ldair = facerec2010.baseline.lda.LRLDA(REGION_ARGS, **REGION_KEYWORDS)
self.layers = len(REGION_ARGS)
self.face_detector = bob.bio.face.preprocessor.utils.load_cropper(face_detector)
if self.face_detector is not None:
assert isinstance(self.face_detector, bob.bio.face.preprocessor.FaceDetect)
# asign ourself to be the face cropper that should be used after face detection
......
......@@ -22,7 +22,7 @@ class LRPCA (bob.bio.face.preprocessor.FaceCrop):
"""
def __init__(self, TUNING = facerec2010.baseline.lrpca.GBU_TUNING, face_detector = None):
bob.bio.base.preprocessor.Preprocessor.__init__(self, TUNING=str(TUNING), face_detector=str(face_detector))
bob.bio.base.preprocessor.Preprocessor.__init__(self, TUNING=str(TUNING), face_detector=str(face_detector), read_original_data=self.read_original_data)
self.lrpca = facerec2010.baseline.lrpca.LRPCA(**TUNING)
self.face_detector = bob.bio.face.preprocessor.utils.load_cropper(face_detector)
......
#!/usr/bin/env bash
# Wed 21 Sep 2016 13:08:05 CEST
source $(dirname ${0})/functions.sh
run_cmd ./bin/buildout -c buildout-before-patch.cfg
run_cmd wget https://www.idiap.ch/software/bob/databases/latest/PythonFaceEvaluation.tar.bz2
run_cmd mkdir PythonFaceEvaluation
run_cmd tar -xjf PythonFaceEvaluation.tar.bz2 -C PythonFaceEvaluation
run_cmd ./bin/patch_CSU.py PythonFaceEvaluation
run_cmd ./bin/buildout buildout:csu-dir=./PythonFaceEvaluation
export PYTHONPATH="PythonFaceEvaluation:$PYTHONPATH"
if [ -x ./bin/bob_dbmanage.py ]; then
run_cmd ./bin/bob_dbmanage.py all download --force;
fi
if [ -d ./doc ]; then
run_cmd ./bin/sphinx-build -n doc sphinx
fi
if [ -z "${WHEEL_TAG}" ]; then
# C/C++ extensions
run_cmd ./bin/python setup.py bdist_wheel
else
# Python-only packages
run_cmd ./bin/python setup.py bdist_wheel --python-tag ${WHEEL_TAG}
fi
......@@ -4,11 +4,17 @@
[buildout]
parts = scripts
develop = .
${buildout:csu-dir}
eggs = bob.bio.csu
PythonFaceEvaluation
extensions = bob.buildout
newest = false
verbose = true
csu-dir = [PATH_TO_YOUR_CSU_COPY]
[scripts]
recipe = bob.buildout:scripts
dependent-scripts = true
\ No newline at end of file
dependent-scripts = true
......@@ -30,7 +30,6 @@ develop = src/bob.extension
src/bob.learn.em
src/bob.measure
src/bob.db.base
src/bob.bio.db
src/bob.db.atnt
src/bob.bio.base
src/bob.learn.boosting
......@@ -64,7 +63,6 @@ bob.learn.linear = git https://gitlab.idiap.ch/bob/bob.learn.linear
bob.learn.em = git https://gitlab.idiap.ch/bob/bob.learn.em
bob.measure = git https://gitlab.idiap.ch/bob/bob.measure
bob.db.base = git https://gitlab.idiap.ch/bob/bob.db.base
bob.bio.db = git https://gitlab.idiap.ch/bob/bob.bio.db
bob.db.atnt = git https://gitlab.idiap.ch/bob/bob.db.atnt
bob.bio.base = git https://gitlab.idiap.ch/bob/bob.bio.base
bob.learn.boosting = git https://gitlab.idiap.ch/bob/bob.learn.boosting
......
......@@ -37,7 +37,7 @@ If you haven't patched it yet, please follow the set of instructions:
$ ./bin/patch_CSU.py [PATH_TO_YOUR_CSU_COPY]
If you get any error message, the sources of the CSU might have changed (the latest test was done in December 2012).
Please file a bug report in `our GitHub page <http://www.github.com/bioidiap/xfacereclib.extension.CSU>`_ to inform us so that we can provide a new patch.
Please file a bug report in `our google groups page <https://groups.google.com/forum/#!forum/bob-devel>`_ to inform us so that we can provide a new patch.
4. Update the CSU toolkit path in the *buildout.cfg* file by setting the ``csu-dir`` variable via replacing the ``[PATH_TO_YOUR_CSU_COPY]`` with your actual directory:
......
......@@ -20,8 +20,8 @@ setup(
url = 'https://gitlab.idiap.ch/bob/bob.bio.csu',
license = 'BSD',
author = 'Amir Mohammadi',
author_email = 'amir.mohammadi@idiap.ch',
author = 'Manuel Gunther',
author_email = 'siebenkopf@googlemail.com',
keywords = 'bob',
# If you have a better, long description of your package, place it on the
......
#!/usr/bin/env bash
# Wed 21 Sep 2016 13:08:05 CEST
source $(dirname ${0})/functions.sh
run_cmd cd ${PREFIX}
run_cmd export PYTHONPATH=\"../PythonFaceEvaluation/src:$PYTHONPATH\"
# The tests:
run_cmd ${PREFIX}/bin/python ${BOB_PREFIX_PATH}/bin/coverage run --source=${CI_PROJECT_NAME} ${BOB_PREFIX_PATH}/bin/nosetests -sv ${CI_PROJECT_NAME}
run_cmd ${PREFIX}/bin/python ${BOB_PREFIX_PATH}/bin/coverage report
run_cmd ${PREFIX}/bin/python ${BOB_PREFIX_PATH}/bin/sphinx-build -b doctest ${CI_PROJECT_DIR}/doc ${CI_PROJECT_NAME}/sphinx
run_cmd cd ${CI_PROJECT_DIR}
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