Preparing release

parent bbaadf7b
Pipeline #4121 failed
# This build file is defined in two parts: 1) a generic set of instructions you # This build file heavily uses template features from YAML so it is generic
# probably **don't** need to change and 2) a part you may have to tune to your # enough for any Bob project. Don't modify it unless you know what you're
# project. It heavily uses template features from YAML to help you in only # doing.
# changing a minimal part of it and avoid code duplication to a maximum while
# still providing a nice pipeline display on your package.
# 1) Generic instructions (only change if you know what you're doing)
# -------------------------------------------------------------------
# Definition of our build pipeline # Definition of our build pipeline
stages: stages:
- build - build
- test - test
- docs - docs
- wheels - wheels
- deploy
# Global variables # ---------
variables: # Templates
CONDA_PREFIX: env # ---------
# Template for the build stage # Template for the build stage
# Needs to run on all supported architectures, platforms and python versions # Needs to run on all supported architectures, platforms and python versions
...@@ -27,104 +22,104 @@ variables: ...@@ -27,104 +22,104 @@ variables:
stage: build stage: build
before_script: before_script:
- git clean -ffdx - git clean -ffdx
- curl --silent https://gitlab.idiap.ch/bob/bob/snippets/7/raw | tr -d '\r' > bootstrap-conda.sh - mkdir _ci
- chmod 755 ./bootstrap-conda.sh - curl --silent "https://gitlab.idiap.ch/bob/bob.admin/raw/master/gitlab/install.sh" > _ci/install.sh
- ./bootstrap-conda.sh ${CONDA_FOLDER} ${PYTHON_VER} ${CONDA_PREFIX} - chmod 755 _ci/install.sh
variables: &build_variables - ./_ci/install.sh _ci #updates
BOB_DOCUMENTATION_SERVER: "http://www.idiap.ch/software/bob/docs/latest/bob/%s/master/" - ./_ci/before_build.sh
script: script:
- ./bin/buildout - wget https://www.idiap.ch/software/bob/databases/latest/PythonFaceEvaluation.tar.bz2
- if [ -x ./bin/bob_dbmanage.py ]; then ./bin/bob_dbmanage.py all download --force; fi - tar -xjf PythonFaceEvaluation.tar.bz2 -C PythonFaceEvaluation
- ./bin/sphinx-build doc sphinx - ./bin/patch_CSU.py PythonFaceEvaluation
- ./bin/python setup.py bdist_wheel --python-tag ${WHEEL_TAG} - $ bin/buildout buildout:csu-dir=PythonFaceEvaluation
- ./bin/python setup.py bdist_wheel
- ./bin/python setup.py bdist_wheel
#- ./_ci/build.sh
after_script: after_script:
- rm -rf ${CONDA_PREFIX} - ./_ci/after_build.sh
artifacts: artifacts:
expire_in: 1 day expire_in: 1 week
paths: paths:
- bootstrap-conda.sh - _ci/
- dist/ - dist/
- sphinx/ - sphinx/
# Template for building on a Linux machine # Template for the test stage - re-installs from uploaded wheels
.build_linux_template: &linux_build_job
<<: *build_job
variables: &linux_build_variables
<<: *build_variables
CONDA_FOLDER: "/local/conda"
CFLAGS: "-D_GLIBCXX_USE_CXX11_ABI=0 -coverage"
CXXFLAGS: "-D_GLIBCXX_USE_CXX11_ABI=0 -coverage"
# Template for building on a Mac OSX machine
.build_mac_template: &macosx_build_job
<<: *build_job
variables: &macosx_build_variables
<<: *build_variables
CONDA_FOLDER: "/opt/conda"
MACOSX_DEPLOYMENT_TARGET: "10.9"
CFLAGS: "-pthread -coverage"
CXXFLAGS: "-pthread -coverage"
LDFLAGS: "-lpthread"
# Template for the test stage - re-install from uploaded wheels
# Needs to run on all supported architectures, platforms and python versions # Needs to run on all supported architectures, platforms and python versions
.test_template: &test_job .test_template: &test_job
stage: test stage: test
before_script: before_script:
- ./bootstrap-conda.sh ${CONDA_FOLDER} ${PYTHON_VER} ${CONDA_PREFIX} - ./_ci/install.sh _ci #updates
- source ${CONDA_FOLDER}/bin/activate ${CONDA_PREFIX} - ./_ci/before_test.sh
- pip install --use-wheel --no-index --pre dist/*.whl
script: script:
- cd ${CONDA_PREFIX} - ./_ci/test.sh
- 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
- sphinx-build -b doctest ../doc ../sphinx
after_script: after_script:
- rm -rf ${CONDA_PREFIX} - ./_ci/after_test.sh
# Template for the wheel uploading stage # Template for the wheel uploading stage
# Needs to run against one combination of python 2.x and 3.x if it is a python # Needs to run against one supported architecture, platform and python version
# only package, otherwise, needs to run in both pythons to all supported
# architectures (Linux and Mac OSX 64-bit)
.wheels_template: &wheels_job .wheels_template: &wheels_job
stage: wheels stage: wheels
environment: intranet
only: only:
- master - master
- tags - /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags)
before_script: before_script:
- curl --silent https://gitlab.idiap.ch/bob/bob/snippets/8/raw | tr -d '\r' > upload-wheel.sh - ./_ci/install.sh _ci #updates
- chmod 755 upload-wheel.sh - ./_ci/before_wheels.sh
script: script:
- ./upload-wheel.sh - ./_ci/wheels.sh
after_script:
- ./_ci/after_wheels.sh
# Template for (latest) documentation upload stage # Template for (latest) documentation upload stage
# Only one real job needs to do this # Only one real job needs to do this
.docs_template: &docs_job .docs_template: &docs_job
stage: docs stage: docs
environment: intranet
only: only:
- master - master
before_script: before_script:
- curl --silent https://gitlab.idiap.ch/bob/bob/snippets/9/raw | tr -d '\r' > upload-sphinx.sh - ./_ci/install.sh _ci #updates
- chmod 755 upload-sphinx.sh - ./_ci/before_docs.sh
script:
- ./_ci/docs.sh
after_script:
- ./_ci/after_docs.sh
# Template for the deployment stage - re-installs from uploaded wheels
# Needs to run on a single architecture only
# Will deploy your package to PyPI and other required services
# Only runs for tags
.deploy_template: &deploy_job
stage: deploy
environment: internet
only:
- /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags)
except:
- branches
before_script:
- ./_ci/install.sh _ci #updates
- ./_ci/before_deploy.sh
script: script:
- ./upload-sphinx.sh - ./_ci/deploy.sh
after_script:
- ./_ci/after_deploy.sh
# 2) Package specific instructions (you may tune this if needed) # -------------
# -------------------------------------------------------------- # Build Targets
# -------------
# Linux + Python 2.7: Builds, tests, uploads wheel # Linux + Python 2.7: Builds, tests, uploads wheel and deploys (if needed)
build_linux_27: build_linux_27:
<<: *linux_build_job <<: *build_job
variables: &linux_27_build_variables variables: &linux_27_build_variables
<<: *linux_build_variables PYTHON_VERSION: "2.7"
PYTHON_VER: "2.7"
WHEEL_TAG: "py27" WHEEL_TAG: "py27"
tags: tags:
- conda-linux - conda-linux
...@@ -139,116 +134,25 @@ test_linux_27: ...@@ -139,116 +134,25 @@ test_linux_27:
wheels_linux_27: wheels_linux_27:
<<: *wheels_job <<: *wheels_job
variables: *linux_27_build_variables
dependencies: dependencies:
- build_linux_27 - build_linux_27
tags: tags:
- conda-linux - conda-linux
deploy_linux_27:
# Linux + Python 3.4: Builds and tests <<: *deploy_job
build_linux_34: variables: *linux_27_build_variables
<<: *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_job
dependencies: dependencies:
- build_linux_35 - build_linux_27
tags: tags:
- conda-linux - conda-linux
docs_linux_35: docs_linux_27:
<<: *docs_job <<: *docs_job
variables: *linux_35_build_variables
dependencies: dependencies:
- build_linux_35 - build_linux_27
tags: tags:
- conda-linux - 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
...@@ -24,11 +24,12 @@ class LDAIR (bob.bio.face.preprocessor.FaceCrop): ...@@ -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): 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.ldair = facerec2010.baseline.lda.LRLDA(REGION_ARGS, **REGION_KEYWORDS)
self.layers = len(REGION_ARGS) self.layers = len(REGION_ARGS)
self.face_detector = bob.bio.face.preprocessor.utils.load_cropper(face_detector) self.face_detector = bob.bio.face.preprocessor.utils.load_cropper(face_detector)
if self.face_detector is not None: if self.face_detector is not None:
assert isinstance(self.face_detector, bob.bio.face.preprocessor.FaceDetect) assert isinstance(self.face_detector, bob.bio.face.preprocessor.FaceDetect)
# asign ourself to be the face cropper that should be used after face detection # 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): ...@@ -22,7 +22,7 @@ class LRPCA (bob.bio.face.preprocessor.FaceCrop):
""" """
def __init__(self, TUNING = facerec2010.baseline.lrpca.GBU_TUNING, face_detector = None): 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.lrpca = facerec2010.baseline.lrpca.LRPCA(**TUNING)
self.face_detector = bob.bio.face.preprocessor.utils.load_cropper(face_detector) self.face_detector = bob.bio.face.preprocessor.utils.load_cropper(face_detector)
......
...@@ -30,7 +30,6 @@ develop = src/bob.extension ...@@ -30,7 +30,6 @@ develop = src/bob.extension
src/bob.learn.em src/bob.learn.em
src/bob.measure src/bob.measure
src/bob.db.base src/bob.db.base
src/bob.bio.db
src/bob.db.atnt src/bob.db.atnt
src/bob.bio.base src/bob.bio.base
src/bob.learn.boosting src/bob.learn.boosting
...@@ -64,7 +63,6 @@ bob.learn.linear = git https://gitlab.idiap.ch/bob/bob.learn.linear ...@@ -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.learn.em = git https://gitlab.idiap.ch/bob/bob.learn.em
bob.measure = git https://gitlab.idiap.ch/bob/bob.measure bob.measure = git https://gitlab.idiap.ch/bob/bob.measure
bob.db.base = git https://gitlab.idiap.ch/bob/bob.db.base 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.db.atnt = git https://gitlab.idiap.ch/bob/bob.db.atnt
bob.bio.base = git https://gitlab.idiap.ch/bob/bob.bio.base bob.bio.base = git https://gitlab.idiap.ch/bob/bob.bio.base
bob.learn.boosting = git https://gitlab.idiap.ch/bob/bob.learn.boosting 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: ...@@ -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] $ ./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). 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: 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( ...@@ -20,8 +20,8 @@ setup(
url = 'https://gitlab.idiap.ch/bob/bob.bio.csu', url = 'https://gitlab.idiap.ch/bob/bob.bio.csu',
license = 'BSD', license = 'BSD',
author = 'Amir Mohammadi', author = 'Manuel Gunther',
author_email = 'amir.mohammadi@idiap.ch', author_email = 'siebenkopf@googlemail.com',
keywords = 'bob', keywords = 'bob',
# If you have a better, long description of your package, place it on the # If you have a better, long description of your package, place it on the
......
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