From ed45d3d9b550355d769a66ce9e04c8dcb74edcfc Mon Sep 17 00:00:00 2001 From: Andre Anjos Date: Fri, 20 Apr 2018 10:08:33 +0200 Subject: [PATCH] Initial port to conda-based CI/CD --- MANIFEST.in | 4 +- README.rst | 170 +- bootstrap-buildout.py | 189 -- conda/meta.yaml | 63 + buildout.cfg => develop.cfg | 3 +- doc/algorithms.rst | 4 +- doc/backend_api.rst | 43 +- doc/conf.py | 148 +- doc/dataformats.rst | 5 +- doc/develop.rst | 156 ++ doc/experiments.rst | 3 - doc/img/beat.png | Bin 3473 -> 0 bytes doc/img/beat.svg | 2035 ----------------- doc/img/execute.msc | 22 + doc/img/execute.png | Bin 0 -> 6101 bytes doc/img/execute.svg | 120 + doc/img/{beat.ico => favicon.ico} | Bin doc/img/logo.png | Bin 0 -> 13399 bytes doc/index.rst | 14 +- doc/introduction.rst | 4 +- doc/io.rst | 40 +- doc/libraries.rst | 5 +- doc/links.rst | 17 + doc/toolchains.rst | 1 - requirements.txt | 11 + .../compile_cxx_algorithms.sh | 0 .../pull_images.sh | 0 setup.py | 33 +- version.txt | 1 + 29 files changed, 530 insertions(+), 2561 deletions(-) delete mode 100644 bootstrap-buildout.py create mode 100644 conda/meta.yaml rename buildout.cfg => develop.cfg (95%) create mode 100644 doc/develop.rst delete mode 100644 doc/img/beat.png delete mode 100644 doc/img/beat.svg create mode 100644 doc/img/execute.msc create mode 100644 doc/img/execute.png create mode 100644 doc/img/execute.svg rename doc/img/{beat.ico => favicon.ico} (100%) create mode 100644 doc/img/logo.png create mode 100644 doc/links.rst create mode 100644 requirements.txt rename buildout_compile_cxx_algorithm.sh => scripts/compile_cxx_algorithms.sh (100%) rename buildout_pull_images.sh => scripts/pull_images.sh (100%) mode change 100755 => 100644 setup.py create mode 100644 version.txt diff --git a/MANIFEST.in b/MANIFEST.in index fa7a4cdd..b4cb2e45 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,6 @@ -include LICENSE.AGPL README.rst buildout.cfg bootstrap-buildout.py +include LICENSE.AGPL README.rst version.txt requirements.txt +include buildout.cfg develop.cfg +recursive-include scripts *.sh recursive-include doc conf.py *.rst *.png *.svg *.ico *.odg *.pdf *.dot recursive-include beat/core/schema *.json recursive-include beat/core/prototypes *.json *.py diff --git a/README.rst b/README.rst index 840b4e77..3cbc3ca3 100644 --- a/README.rst +++ b/README.rst @@ -20,159 +20,45 @@ .. You should have received a copy of the GNU Affero Public License along .. .. with the BEAT platform. If not, see http://www.gnu.org/licenses/. .. +.. image:: https://img.shields.io/badge/docs-stable-yellow.svg + :target: https://www.idiap.ch/software/beat/docs/beat/beat.core/stable/index.html +.. image:: https://img.shields.io/badge/docs-latest-orange.svg + :target: https://www.idiap.ch/software/beat/docs/beat/beat.core/master/index.html +.. image:: https://gitlab.idiap.ch/beat/beat.core/badges/master/build.svg + :target: https://gitlab.idiap.ch/beat/beat.core/commits/master +.. image:: https://gitlab.idiap.ch/beat/beat.core/badges/master/coverage.svg + :target: https://gitlab.idiap.ch/beat/beat.core/commits/master +.. image:: https://img.shields.io/badge/gitlab-project-0000c0.svg + :target: https://gitlab.idiap.ch/beat/beat.core +.. image:: https://img.shields.io/pypi/v/beat.core.svg + :target: https://pypi.python.org/pypi/beat.core -============================================ - Biometrics Evaluation and Testing Platform -============================================ -This package contains the source code for the core components of the BEAT -platform. +========================== + Core Components for BEAT +========================== + +This package part of BEAT_, an open-source evaluation platform for data science +algorithms and workflows. It contains the source code for its core components. Installation ------------ -Really easy, with ``zc.buildout``:: - - $ python bootstrap-buildout.py - $ ./bin/buildout - -These 2 commands should download and install all non-installed dependencies and -get you a fully operational test and development environment. - -.. note:: - - The python shell used in the first line of the previous command set - determines the python interpreter that will be used for all scripts developed - inside this package. - - If you are on the Idiap filesystem, you may use - ``/idiap/project/beat/beat.env.deploy/usr/bin/python`` to bootstrap this - package instead. It contains the same setup deployed at the final BEAT - machinery. - - -Docker -====== - -This package depends on Docker_ and uses it to run user algorithms in a -container with the required software stack. You must install the Docker_ engine -and make sure the user running tests has access to it. - -In particular, this package controls memory and CPU utilisation of the -containers it launches. You must make sure to enable those functionalities on -your installation. - - -Docker Setup -============ +Complete BEAT's `installation`_ instructions. Then, to install this package, +run:: -Make sure you have the ``docker`` command available on your system. For certain -operating systems, it is necessary to install ``docker`` via an external -virtual machine (a.k.a. the *docker machine*). Follow the instructions at `the -docker website ` before trying to -execute algorithms or experiments. + $ conda install beat.backend.python -We use specific docker images to run user algorithms. Download the following -base images before you try to run tests or experiments on your computer:: - $ docker pull docker.idiap.ch/beat/beat.env.system.python:1.1.2 - $ docker pull docker.idiap.ch/beat/beat.env.db.examples:1.1.1 - $ docker pull docker.idiap.ch/beat/beat.env.client:1.2.0 - $ docker pull docker.idiap.ch/beat/beat.env.cxx:1.0.2 - -Optionally, also download the following images to be able to re-run experiments -downloaded from the BEAT platform (not required for unit testing):: - - $ docker pull docker.idiap.ch/beat/beat.env.python:0.0.4 - $ docker pull docker.idiap.ch/beat/beat.env.python:1.0.0 - $ docker pull docker.idiap.ch/beat/beat.env.db:1.2.2 - - -Documentation -------------- - -To build the documentation, just do:: - - $ ./bin/sphinx-apidoc --separate -d 2 --output=doc/api beat beat/core/test beat/core/scripts - $ ./bin/sphinx-build doc sphinx - - -Testing +Contact ------- -After installation, it is possible to run our suite of unit tests. To do so, -use ``nose``:: - - $ ./bin/nosetests -sv - - -.. note:: - - Some of the tests for our command-line toolkit require a running BEAT - platform web-server, with a compatible ``beat.core`` installed (preferably - the same). By default, these tests will be skipped. If you want to run - them, you must setup a development web server and set the environment - variable ``BEAT_CORE_TEST_PLATFORM`` to point to that address. For example:: - - $ export BEAT_CORE_TEST_PLATFORM="http://example.com/platform/" - $ ./bin/nosetests -sv - - It is **not** adviseable to run tests against a production web server. - -If you want to skip slow tests (at least those pulling stuff from our servers) -or executing lengthy operations, just do:: - - $ ./bin/nosetests -sv -a '!slow' - -To measure the test coverage, do the following:: - - $ ./bin/nosetests -sv --with-coverage --cover-package=beat.core - -To produce an HTML test coverage report, at the directory `./htmlcov`, do the -following:: - - $ ./bin/nosetests -sv --with-coverage --cover-package=beat.core --cover-html --cover-html-dir=htmlcov - -Our documentation is also interspersed with test units. You can run them using -sphinx:: - - $ ./bin/sphinx -b doctest doc sphinx - - -Development ------------ - -Indentation -=========== - -You can enforce PEP8_ compliance using the application ``autopep8``. For -example, to enforce compliance on a single file and edit it in place, do:: - - $ ./bin/autopep8 --indent-size=2 --in-place beat/core/utils.py - -We normally use 2-space indentation. If ever, you can easily change the -indentation to 4 spaces like this:: - - $ ./bin/autopep8 --indent-size=4 --in-place beat/core/utils.py - - -Profiling -========= - -In order to profile the test code, try the following:: - - $ ./bin/python -mcProfile -oprof.data ./bin/nosetests -sv ... - -This will dump the profiling data at ``prof.data``. You can dump its contents -in different ways using another command:: - - $ ./bin/python -mpstats prof.data - -This will allow you to dump and print the profiling statistics as you may find -fit. +For questions or reporting issues to this software package, contact our +development `mailing list`_. -.. References go here -.. _pep8: https://www.python.org/dev/peps/pep-0008/ -.. _docker: https://www.docker.com/ +.. Place your references here: +.. _beat: https://www.idiap.ch/software/beat +.. _installation: https://www.idiap.ch/software/beat/install +.. _mailing list: https://www.idiap.ch/software/beat/discuss diff --git a/bootstrap-buildout.py b/bootstrap-buildout.py deleted file mode 100644 index a6295667..00000000 --- a/bootstrap-buildout.py +++ /dev/null @@ -1,189 +0,0 @@ -############################################################################## -# -# Copyright (c) 2006 Zope Foundation and Contributors. -# All Rights Reserved. -# -# This software is subject to the provisions of the Zope Public License, -# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED -# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS -# FOR A PARTICULAR PURPOSE. -# -############################################################################## -"""Bootstrap a buildout-based project - -Simply run this script in a directory containing a buildout.cfg. -The script accepts buildout command-line options, so you can -use the -c option to specify an alternate configuration file. -""" - -import os -import shutil -import sys -import tempfile - -from optparse import OptionParser - -tmpeggs = tempfile.mkdtemp() - -usage = '''\ -[DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options] - -Bootstraps a buildout-based project. - -Simply run this script in a directory containing a buildout.cfg, using the -Python that you want bin/buildout to use. - -Note that by using --find-links to point to local resources, you can keep -this script from going over the network. -''' - -parser = OptionParser(usage=usage) -parser.add_option("-v", "--version", help="use a specific zc.buildout version") - -parser.add_option("-t", "--accept-buildout-test-releases", - dest='accept_buildout_test_releases', - action="store_true", default=False, - help=("Normally, if you do not specify a --version, the " - "bootstrap script and buildout gets the newest " - "*final* versions of zc.buildout and its recipes and " - "extensions for you. If you use this flag, " - "bootstrap and buildout will get the newest releases " - "even if they are alphas or betas.")) -parser.add_option("-c", "--config-file", - help=("Specify the path to the buildout configuration " - "file to be used.")) -parser.add_option("-f", "--find-links", - help=("Specify a URL to search for buildout releases")) -parser.add_option("--allow-site-packages", - action="store_true", default=False, - help=("Let bootstrap.py use existing site packages")) -parser.add_option("--setuptools-version", - help="use a specific setuptools version") - - -options, args = parser.parse_args() - -###################################################################### -# load/install setuptools - -try: - if options.allow_site_packages: - import setuptools - import pkg_resources - from urllib.request import urlopen -except ImportError: - from urllib2 import urlopen - -ez = {} -exec(urlopen('https://bootstrap.pypa.io/ez_setup.py').read(), ez) - -if not options.allow_site_packages: - # ez_setup imports site, which adds site packages - # this will remove them from the path to ensure that incompatible versions - # of setuptools are not in the path - import site - # inside a virtualenv, there is no 'getsitepackages'. - # We can't remove these reliably - if hasattr(site, 'getsitepackages'): - for sitepackage_path in site.getsitepackages(): - sys.path[:] = [x for x in sys.path if sitepackage_path not in x] - -setup_args = dict(to_dir=tmpeggs, download_delay=0) - -if options.setuptools_version is not None: - setup_args['version'] = options.setuptools_version - -ez['use_setuptools'](**setup_args) -import setuptools -import pkg_resources - -# This does not (always?) update the default working set. We will -# do it. -for path in sys.path: - if path not in pkg_resources.working_set.entries: - pkg_resources.working_set.add_entry(path) - -###################################################################### -# Install buildout - -ws = pkg_resources.working_set - -cmd = [sys.executable, '-c', - 'from setuptools.command.easy_install import main; main()', - '-mZqNxd', tmpeggs] - -find_links = os.environ.get( - 'bootstrap-testing-find-links', - options.find_links or - ('http://downloads.buildout.org/' - if options.accept_buildout_test_releases else None) - ) -if find_links: - cmd.extend(['-f', find_links]) - -setuptools_path = ws.find( - pkg_resources.Requirement.parse('setuptools')).location - -requirement = 'zc.buildout' -version = options.version -if version is None and not options.accept_buildout_test_releases: - # Figure out the most recent final version of zc.buildout. - import setuptools.package_index - _final_parts = '*final-', '*final' - - def _final_version(parsed_version): - try: - return not parsed_version.is_prerelease - except AttributeError: - # Older setuptools - for part in parsed_version: - if (part[:1] == '*') and (part not in _final_parts): - return False - return True - - index = setuptools.package_index.PackageIndex( - search_path=[setuptools_path]) - if find_links: - index.add_find_links((find_links,)) - req = pkg_resources.Requirement.parse(requirement) - if index.obtain(req) is not None: - best = [] - bestv = None - for dist in index[req.project_name]: - distv = dist.parsed_version - if _final_version(distv): - if bestv is None or distv > bestv: - best = [dist] - bestv = distv - elif distv == bestv: - best.append(dist) - if best: - best.sort() - version = best[-1].version -if version: - requirement = '=='.join((requirement, version)) -cmd.append(requirement) - -import subprocess -if subprocess.call(cmd, env=dict(os.environ, PYTHONPATH=setuptools_path)) != 0: - raise Exception( - "Failed to execute command:\n%s" % repr(cmd)[1:-1]) - -###################################################################### -# Import and run buildout - -ws.add_entry(tmpeggs) -ws.require(requirement) -import zc.buildout.buildout - -if not [a for a in args if '=' not in a]: - args.append('bootstrap') - -# if -c was provided, we push it back into args for buildout' main function -if options.config_file is not None: - args[0:0] = ['-c', options.config_file] - -zc.buildout.buildout.main(args) -shutil.rmtree(tmpeggs) diff --git a/conda/meta.yaml b/conda/meta.yaml new file mode 100644 index 00000000..a81663e7 --- /dev/null +++ b/conda/meta.yaml @@ -0,0 +1,63 @@ +{% set name = 'beat.core' %} +{% set project_dir = environ.get('RECIPE_DIR') + '/..' %} + +package: + name: {{ name }} + version: {{ environ.get('BOB_PACKAGE_VERSION', '0.0.1') }} + +build: + entry_points: + - worker = beat.core.scripts.worker:main + number: {{ environ.get('BOB_BUILD_NUMBER', 0) }} + run_exports: + - {{ pin_subpackage(name) }} + script: + - cd {{ project_dir }} + {% if environ.get('BUILD_EGG') %} + - python setup.py sdist --formats=zip + {% endif %} + - python setup.py install --single-version-externally-managed --record record.txt + +requirements: + host: + - python {{ python }} + - setuptools {{ setuptools }} + run: + - python + - setuptools + - docker + - docopt + - graphviz + - jsonschema + - numpy + - pip + - pyzmq + - simplejson + - six + - beat.backend.python + +test: + requires: + - beat-devel {{ beat_devel }}.* + - bob.extension + - nose + - coverage + - sphinx + - sphinx_rtd_theme + + imports: + - {{ name }} + + commands: + - worker --help + - nosetests --with-coverage --cover-package={{ name }} -sv {{ name }} + - sphinx-build -aEW {{ project_dir }}/doc {{ project_dir }}/sphinx + - sphinx-build -aEb doctest {{ project_dir }}/doc sphinx + - conda inspect linkages -p $PREFIX {{ name }} # [not win] + - conda inspect objects -p $PREFIX {{ name }} # [osx] + +about: + home: https://www.idiap.ch/software/beat/ + license: AGPLv3 + summary: Python Backend for the BEAT Platform + license_family: AGPL diff --git a/buildout.cfg b/develop.cfg similarity index 95% rename from buildout.cfg rename to develop.cfg index 3c933355..a5f011e5 100644 --- a/buildout.cfg +++ b/develop.cfg @@ -7,7 +7,6 @@ develop = . newest = false eggs = beat.core beat.backend.python - ipdb [sources] beat.backend.python = git https://gitlab.idiap.ch/beat/beat.backend.python branch=1.5.x @@ -18,7 +17,7 @@ recipe = bob.buildout:scripts [docker_images] recipe = collective.recipe.cmd cmds = ./buildout_pull_images.sh -uninstall_cmds = +uninstall_cmds = on_install = true on_update = true diff --git a/doc/algorithms.rst b/doc/algorithms.rst index dfca30c8..1268fb76 100644 --- a/doc/algorithms.rst +++ b/doc/algorithms.rst @@ -882,6 +882,4 @@ the data block on the output. return True -.. Place your references here - -.. _json: http://en.wikipedia.org/wiki/JSON +.. include:: links.rst diff --git a/doc/backend_api.rst b/doc/backend_api.rst index ad53a092..b7879d10 100644 --- a/doc/backend_api.rst +++ b/doc/backend_api.rst @@ -154,10 +154,10 @@ Further to those files, it is prudent to include: Message Passing --------------- -The BEAT infrastructure communicates with the ``bin/execute`` process via -`Zero Message Queue`_ or 0MQ for short. `0MQ`_ provides a portable -bidirectional communication layer between the BEAT infrastructure and the -target backend, with many `language bindings`_, including `python bindings`_. +The BEAT infrastructure communicates with the ``bin/execute`` process via `Zero +Message Queue`_ or ZMQ for short. ZMQ_ provides a portable bidirectional +communication layer between the BEAT infrastructure and the target backend, +with many `language bindings`_, including `python bindings`_. The user process, which manages the data readout of a given algorithm, sends commands back to the infrastructure for requesting data when needed. @@ -187,26 +187,10 @@ The next diagram represents some possible states between the BEAT infrastructure and the ``execute`` process in case of a successful execution: -.. msc:: +.. _beat-core-backend-msc: +.. figure:: ./img/execute.* - hscale = "2.0"; - - io [label="BEAT Infrastructure (language agnostic)"], up [label="Execute (user code)"]; - - up->io [ label = "nxt channel" ]; - io->up [ label = "2 name1 name2 " ]; - up->io [ label = "hmd channel name" ]; - io->up [ label = "tru" ]; - up->io [ label = "oic name" ]; - io->up [ label = "tru" ]; - up->io [ label = "wrt out sz " ]; - io->up [ label = "ack" ]; - ...; - up->io [ label = "hmd channel name" ]; - io->up [ label = "fal" ]; - up->io [ label = "don" ]; - ...; - io->up [ label = "ack" ]; + Message Sequence Chart between BEAT agents and user containers/algorithms In the remainder of this section, we describe the various commands, which are @@ -437,15 +421,4 @@ indicating a problem with the infrastructure was detected and that system administrators were informed. -.. Place your references from this point onwards - -.. _beat.env.python27: http://gitlab.idiap.ch/biometric/beat.env.python27 -.. _beat.backend.python: http://gitlab.idiap.ch/biometric/beat.backend.python -.. _python 2.7: http://www.python.org -.. _0mq: http://zeromq.org -.. _zmq: http://zeromq.org -.. _zero message queue: http://zeromq.org -.. _language bindings: http://zeromq.org/bindings:_start -.. _python bindings: http://zeromq.org/bindings:python -.. _markdown: http://daringfireball.net/projects/markdown/ -.. _restructuredtext: http://docutils.sourceforge.net/rst.html +.. include:: links.rst diff --git a/doc/conf.py b/doc/conf.py index 0065278b..f9538296 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -25,16 +25,11 @@ # # ############################################################################### - import os import sys import glob import pkg_resources -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) # -- General configuration ----------------------------------------------------- @@ -44,25 +39,38 @@ needs_sphinx = '1.3' # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ - 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.ifconfig', 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.doctest', - 'sphinx.ext.intersphinx', 'sphinx.ext.graphviz', + 'sphinx.ext.intersphinx', 'sphinx.ext.napoleon', 'sphinx.ext.viewcode', - 'sphinxcontrib.mscgen', + 'sphinx.ext.mathjax', + #'matplotlib.sphinxext.plot_directive' ] -import sphinx -if sphinx.__version__ >= "1.4.1": - extensions.append('sphinx.ext.imgmath') -else: - extensions.append('sphinx.ext.pngmath') +# Be picky about warnings +nitpicky = True + +# Ignores stuff we can't easily resolve on other project's sphinx manuals +nitpick_ignore = [] + +# Allows the user to override warnings from a separate file +if os.path.exists('nitpick-exceptions.txt'): + for line in open('nitpick-exceptions.txt'): + if line.strip() == "" or line.startswith("#"): + continue + dtype, target = line.split(None, 1) + target = target.strip() + try: # python 2.x + target = unicode(target) + except NameError: + pass + nitpick_ignore.append((dtype, target)) # Always includes todos todo_include_todos = True @@ -118,10 +126,7 @@ release = distribution.version # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. -exclude_patterns = [ - 'api/modules.rst', - 'api/beat.rst', - ] +exclude_patterns = ['links.rst'] # The reST default role (used for this markup: `text`) to use for all documents. #default_role = None @@ -145,7 +150,7 @@ pygments_style = 'sphinx' # Some variables which are useful for generated material project_variable = project.replace('.', '_') -short_description = u'Biometrics Evaluation and Testing Platform (Core Modules)' +short_description = u'Core modules and definitions for the BEAT platform' owner = [u'Idiap Research Institute'] @@ -173,12 +178,12 @@ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # The name of an image file (relative to this directory) to place at the top # of the sidebar. -#html_logo = 'img/beat.svg' +html_logo = 'img/logo.png' # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. -html_favicon = 'img/beat.ico' +html_favicon = 'img/favicon.ico' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, @@ -230,67 +235,15 @@ html_favicon = 'img/beat.ico' htmlhelp_basename = project_variable + u'_doc' -# -- Options for LaTeX output -------------------------------------------------- - -# The paper size ('letter' or 'a4'). -latex_paper_size = 'a4' - -# The font size ('10pt', '11pt' or '12pt'). -latex_font_size = '10pt' - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, author, documentclass [howto/manual]). -latex_documents = [( - 'index', - project_variable + '.tex', - short_description, - owner[0], - 'manual', - )] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -latex_logo = '' - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -#latex_use_parts = False - -# If true, show page references after internal links. -#latex_show_pagerefs = False - -# If true, show URL addresses after external links. -#latex_show_urls = False - -# Additional stuff for the LaTeX preamble. -#latex_preamble = '' - -# Documents to append as an appendix to all manuals. -#latex_appendices = [] - -# If false, no module index is generated. -#latex_domain_indices = True +# -- Post configuration -------------------------------------------------------- # Included after all input documents rst_epilog = """ .. |project| replace:: BEAT -.. |url| replace:: https://www.beat-eu.org/platform/ .. |version| replace:: %s .. |current-year| date:: %%Y """ % (version,) -# -- Options for manual page output -------------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [( - 'index', - project_variable, - short_description, - owner, - 1, - )] - # Default processing flags for sphinx autoclass_content = 'class' autodoc_member_order = 'bysource' @@ -300,19 +253,40 @@ autodoc_default_flags = [ 'show-inheritance', ] -python_version = '.'.join(str(k) for k in sys.version_info[0:2]) -python_link = 'http://docs.python.org/' + python_version + '/' -numpy_link = 'http://docs.scipy.org/doc/numpy/' -intersphinx_mapping = dict( - python=(python_link, None), - numpy=(numpy_link, None), - ) +# For inter-documentation mapping: +from bob.extension.utils import link_documentation, load_requirements +sphinx_requirements = "extra-intersphinx.txt" +if os.path.exists(sphinx_requirements): + intersphinx_mapping = link_documentation( + additional_packages=['python','numpy'] + \ + load_requirements(sphinx_requirements) + ) +else: + intersphinx_mapping = link_documentation() + +# Adds simplejson, pyzmq links +intersphinx_mapping['http://simplejson.readthedocs.io/en/stable/'] = None +intersphinx_mapping['http://pyzmq.readthedocs.io/en/stable/'] = None +intersphinx_mapping['http://six.readthedocs.io'] = None +intersphinx_mapping['http://python-jsonschema.readthedocs.io/en/stable/'] = None +intersphinx_mapping['https://docker-py.readthedocs.io/en/stable/'] = None + +# We want to remove all private (i.e. _. or __.__) members +# that are not in the list of accepted functions +accepted_private_functions = ['__array__'] + +def member_function_test(app, what, name, obj, skip, options): + # test if we have a private function + if len(name) > 1 and name[0] == '_': + # test if this private function should be allowed + if name not in accepted_private_functions: + # omit privat functions that are not in the list of accepted private functions + return skip + else: + # test if the method is documented + if not hasattr(obj, '__doc__') or not obj.__doc__: + return skip + return False def setup(app): - pass - -# If True, ANSI colour sequences in program output are interpreted. To use this -# feature, the extension sphinxcontrib.ansi must be enabled and configured. If -# missing or False, these sequences are not interpreted, but appear in -# documentation unchanged. -programoutput_use_ansi = True + app.connect('autodoc-skip-member', member_function_test) diff --git a/doc/dataformats.rst b/doc/dataformats.rst index 6d4e418c..d89ebc00 100644 --- a/doc/dataformats.rst +++ b/doc/dataformats.rst @@ -355,8 +355,5 @@ they receive and produce data. Here is just a simple illustrative example: }) -.. Place your references here +.. include:: links.rst -.. _numpy safe-casting rules: http://docs.scipy.org/doc/numpy/reference/generated/numpy.can_cast.html -.. _zen of python: https://www.python.org/dev/peps/pep-0020/ -.. _json: http://en.wikipedia.org/wiki/JSON diff --git a/doc/develop.rst b/doc/develop.rst new file mode 100644 index 00000000..e6188020 --- /dev/null +++ b/doc/develop.rst @@ -0,0 +1,156 @@ +.. vim: set fileencoding=utf-8 : + +.. Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/ .. +.. Contact: beat.support@idiap.ch .. +.. .. +.. This file is part of the beat.core module of the BEAT platform. .. +.. .. +.. Commercial License Usage .. +.. Licensees holding valid commercial BEAT licenses may use this file in .. +.. accordance with the terms contained in a written agreement between you .. +.. and Idiap. For further information contact tto@idiap.ch .. +.. .. +.. Alternatively, this file may be used under the terms of the GNU Affero .. +.. Public License version 3 as published by the Free Software and appearing .. +.. in the file LICENSE.AGPL included in the packaging of this file. .. +.. The BEAT platform is distributed in the hope that it will be useful, but .. +.. WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY .. +.. or FITNESS FOR A PARTICULAR PURPOSE. .. +.. .. +.. You should have received a copy of the GNU Affero Public License along .. +.. with the BEAT platform. If not, see http://www.gnu.org/licenses/. .. + + +=================== + Local Development +=================== + +Go through the following sequence of commands: + + +.. code-block:: sh + + $ git co https://gitlab.idiap.ch/bob/bob.admin + $ #install miniconda (version 4.4 or above required) + $ conda activate base + $ cd beat.backend.python #cd into this package's sources + $ ../bob.admin/conda/conda-bootstrap.py --overwrite --python=2.7 beat-core-dev + $ conda activate beat-core-dev + $ #n.b.: docker must be installed on your system (see next section) + $ buildout -c develop.cfg + +These commands should download and install all non-installed dependencies and +get you a fully operational test and development environment. + + +Docker +------ + +This package depends on Docker_ and may use it to run user algorithms in a +container with the required software stack. You must install the Docker_ engine +and make sure the user running tests has access to it. + +In particular, this package controls memory and CPU utilisation of the +containers it launches. You must make sure to enable those functionalities on +your installation. + + +Docker Setup +============ + +Make sure you have the ``docker`` command available on your system. For certain +operating systems, it is necessary to install ``docker`` via an external +virtual machine (a.k.a. the *docker machine*). Follow the instructions at `the +docker website ` before trying to +execute algorithms or experiments. + +We use specific docker images to run user algorithms. Download the following +base images before you try to run tests or experiments on your computer:: + + $ docker pull docker.idiap.ch/beat/beat.env.system.python:1.1.2 + $ docker pull docker.idiap.ch/beat/beat.env.db.examples:1.1.1 + $ docker pull docker.idiap.ch/beat/beat.env.client:1.2.0 + $ docker pull docker.idiap.ch/beat/beat.env.cxx:1.0.2 + +Optionally, also download the following images to be able to re-run experiments +downloaded from the BEAT platform (not required for unit testing):: + + $ docker pull docker.idiap.ch/beat/beat.env.python:0.0.4 + $ docker pull docker.idiap.ch/beat/beat.env.python:1.0.0 + $ docker pull docker.idiap.ch/beat/beat.env.db:1.2.2 + + +Documentation +------------- + +To build the documentation, just do: + +.. code-block:: sh + + $ ./bin/sphinx-build doc sphinx + + +Testing +------- + +After installation, it is possible to run our suite of unit tests. To do so, +use ``nose``: + +.. code-block:: sh + + $ ./bin/nosetests -sv + + +.. note:: + + Some of the tests for our command-line toolkit require a running BEAT + platform web-server, with a compatible ``beat.core`` installed (preferably + the same). By default, these tests will be skipped. If you want to run + them, you must setup a development web server and set the environment + variable ``BEAT_CORE_TEST_PLATFORM`` to point to that address. For example:: + + $ export BEAT_CORE_TEST_PLATFORM="http://example.com/platform/" + $ ./bin/nosetests -sv + + .. warning:: + + Do **NOT** run tests against a production web server. + + +If you want to skip slow tests (at least those pulling stuff from our servers) +or executing lengthy operations, just do:: + + $ ./bin/nosetests -sv -a '!slow' + + +To measure the test coverage, do the following:: + + $ ./bin/nosetests -sv --with-coverage --cover-package=beat.core + + +Our documentation is also interspersed with test units. You can run them using +sphinx:: + + $ ./bin/sphinx -b doctest doc sphinx + + +Other bits +---------- + +Profiling +========= + +In order to profile the test code, try the following:: + + $ ./bin/python -mcProfile -oprof.data ./bin/nosetests -sv ... + +This will dump the profiling data at ``prof.data``. You can dump its contents +in different ways using another command:: + + $ ./bin/python -mpstats prof.data + +This will allow you to dump and print the profiling statistics as you may find +fit. + + +.. _docker: https://www.docker.com/ diff --git a/doc/experiments.rst b/doc/experiments.rst index ca628d92..61c8ee0d 100644 --- a/doc/experiments.rst +++ b/doc/experiments.rst @@ -197,6 +197,3 @@ declaration. For instance: ... } - - - diff --git a/doc/img/beat.png b/doc/img/beat.png deleted file mode 100644 index 5357f0a68c90385e0c7f5f9b4caf15dae940e185..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3473 zcmV;C4Q}#@P)!jeRm6d?)-6pG|dfI7Ao zg$F(Xi&*4Scq&$n3bpow`iQoEK?;Jn04`xBCX%qEY_bKENXRD1B#@0PlgxH!yQhC7 z6NZo=wt>|Cp65I>=RNQHp7;IT_bm4U{e+8qMoIh2*Fb~m4<}Qnf-`Zg`TgPRCkey* zF*AMptDj1H<V(>xxBFKy3@*Y^{3*4>(vx)CLC#WA@|^Z|?8F?T}Zu}AeLLSSCuv?kYf=8ktPDiWz8qT3;xlO0jNhgmfyVPuw zyPuqQVOGRMp}MC(p66G{>v5_j+0*5tjyQr&{CIu`e@Z)Q&q7a zsCcuXR4J0MWC6;s&qV)+m!R-LH$4olBMj;@#nBZ%8*?Q=rG%BlK;U`)EC3Avoxxx@ z*WU^LD`0yQ>U27G~a3lJx6hqcHWlXHm;&gG&pYaXyiL3vj7#Vc&;`_VmVnm07 zyX^_&!2&qRF7dmMmTq33{7HDIZRVhG^ZxrX8XpBZAAleTH2@-g%&GyD0x$!p0I=0y zFjN6RdU|>aA!H5!b@v>Ev=c%O?c2BSRL}W&o*(P+cr3ZOx#a+mk&%%kisBOhSHYo!3dJ+W~~B^8QSzq=e>F!Q0Ibwh?KU)b@vFiWsgDd80GHl=?6Qbr|0 ztqDS8WF(r}o$wt8z!6S1f=1q#BeRi{uWdZ_Orv%3)$;PnD*#YZQbH3G6T<;) zY}mHS%1T>&e7u}eI-C#^4PX&~@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{NaLIyL~iDW&^GQ9PNOn``{RN$vpptQ67DI<2fa&?<@$H&rjr@{_sqs;{ZB^*|g< zRt{4})ZzZbtG(Jf-3;BHA1i#2>v#A{bGQygnZjFzxDXeU{FU3yJQxvT-7{r={Urc| zVVJi8Focl5Qc5!o2E%}Vkm{3^%OxQZY^zLTv_-1J<<`9>yT3wkad2BGwi*0!;M5RI zN{&ZD3_*0TOAOOc+tp@PJYT_bCrZSUi$>W7PvMI<7>D z^8us~LgwoAdi@>G_BQc@?>>{B`O{jJ()q^sje#&;Q({HR=Xm>I5@5RqYHI}-6b()p zY;Y@Mb48cE*2B^w~?OH$&N zZ60=SOw-Zk4rN4ur3z0^KY-++4fy160@mzGf}8k(y6sd9iktTK%IJ|c(4GC*kLe1Gg)X@M41_j%TV?rCtC#KX7t};ps%<-K^ z?YME{B&C-%YhK?vVaP5+Y|LHDs2|Yl@`+opS*@M;{nr#^WJRL}m5qU@Y}A0-T0m{h zAOwIS6x7}fMixAK+uSWX{S_|9&=||h_s(kEc9(PLcl25*GgFN(MFm?%dMiY5v7jCg z;BkXc3Ta>zKv*!GqRjn3M}EQSK||(0@qNt8e@iL2+X>tW+*BzKuYY0EjFDHqYO%;v zl?|O0QrQ@Yrd9^j){G#v2#+Eh9VP*A+1~XWTDzh*$3JECs1!<4hcv#bkUCX@v$H}v z_Y@8gU69K}#14{zV?}^r0ap26Q5ijP11T@Ow{q3k*rw@TBCam_i;CB+;r06o=8k81)E1`Ygg9Lc{1l>5p^$CjSP>Fd1jCX8*s|Pp zE9XB|bdxe8xhOL_$Py*EIMkaI=2ol1;w1*ue_V=1Fs%!=~v{e)r%3RdPee(>8SyF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/img/execute.msc b/doc/img/execute.msc new file mode 100644 index 00000000..67f1452d --- /dev/null +++ b/doc/img/execute.msc @@ -0,0 +1,22 @@ +# use mscgen to create a diagram from this representation: +# $ mscgen -T png -o img/execute.png -i img/execute.msc +msc { + hscale = "2.0"; + + io [label="BEAT Infrastructure (language agnostic)"], up [label="Execute (user code)"]; + + up->io [ label = "nxt channel" ]; + io->up [ label = "2 name1 name2 " ]; + up->io [ label = "hmd channel name" ]; + io->up [ label = "tru" ]; + up->io [ label = "oic name" ]; + io->up [ label = "tru" ]; + up->io [ label = "wrt out sz " ]; + io->up [ label = "ack" ]; + ...; + up->io [ label = "hmd channel name" ]; + io->up [ label = "fal" ]; + up->io [ label = "don" ]; + ...; + io->up [ label = "ack" ]; +} diff --git a/doc/img/execute.png b/doc/img/execute.png new file mode 100644 index 0000000000000000000000000000000000000000..0beaba032289cfd1418a20c3559608823680b1fc GIT binary patch literal 6101 zcmds5dpy+Xzkg~_v?&+DAmdHqg*ob&r*p7DCd>-#+4&*$^Ld_L!Y zw6k6%r6L6YShaVLB>@2Oy8s|+QAoIhbCOtuUn>LlI0XS9^Hlgjq-~N>1wb)zujS4I z#LThYV<9B@!kGqK&9k-t2>nMj;oY-`?dSiY~~P9)VaL^+{f z3;=TEq9P6fpX-5&gX`Xv|KpWpWlyg8Jyj2V&}*JM@5BvM$S>P%6daLRKR?ql{&tKNc|L0H~yDt-@54`{$-|ylWav)bW}&h#0x=BX^8*Y>u&3PrHod_jnbniE;SA>q8+0d z^r5;fW(`O1hh0dE6a5VlbK#i_a@}E{=*oS5xECZ!CsknjAv0rpkATHBNC%AL3k}3= z&12DX35jQ(o-l)Es4WUw9l%Py(;R4Y`TakvXEr)*8@@4bV6cSK)#OH_DJ z=2$F6v&R03qEAFy!wJXc_f(yaIX?}3MD}iN6ugfvsW&35uifqV@ZF0m28-o^<2QWM z`^rLCoa!~vfiXYC8x&YD+_*Pd=T}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?4wz`mVy>x&~UBDP4I5JQi^!*B} zUV*>XP`b`^$~6M&1T=IQO7izH?HFJLgKIA3*{hF zL>NZGHIKfz$BiHMc`KMmBiOD^W0-61#v-Zv;{pU9$t=nhO9`IaHO9^&8WK&3|wsIhq1%qXW#Olzz zrH)Gc4vhrkE`0U2;WEHl7LD_hNlz{p3b!r8E&CZ?S7deSbS+z9UqJ>se~uNDeJkWB8@QDxZA$DnC%E47D?4;)he9 zQUemB5=|%AG$(mhO)kfEGhiXD-O_xArpHS=>H&d4udviw~ z>q-v}3bHjaTz_L4DN1HuisWb3!-knfa;IpxRxq>Oz5!7XmYCYb*W0ZM7Q~9J-S8yR z3#!jpAj|M%EU;V+xx)sJ=1;&l1 z(L!6^k3Lz%;g@wf+l-WN2{#5H4}*SkF4K-y>O4C&^=gJB?E8p8CnwRP9=9*Z5Wuf5 z^`xM0>rWa|%Yz31wx3{+M2x^oUZla$k^Hw^_doY5+0sTkKb4gU0MAkgNkWq@G}@;u ztB)zU8LbCNQ_67OMWky_**^PGMqK3OhMxThc^oSg!v+ubET^BJl)f3ndt~l zbec4R@hrUwq+~%xbcU6?H~ELUvv0K?=pVrQyr%A($MZq2p)CGCaCYX#A~wW+84-Fp*f@1aG~=1>Td5L&_dz(w7?;XV zJ*H%Kd?ANh`01%T#$e{snOlVA(o3Y@$GTf(rl&UZeUGS{sW+9BsnfM5b*YQh zM!=~T!^4yE8^nekCdHr2gK34GuwF2W#Jg(9h~}*oSy literal 0 HcmV?d00001 diff --git a/doc/img/execute.svg b/doc/img/execute.svg new file mode 100644 index 00000000..07a4d1c3 --- /dev/null +++ b/doc/img/execute.svg @@ -0,0 +1,120 @@ + + + + + +BEAT Infrastructure (language agnostic) + + + + +Execute (user code) + + + + + + + +nxt channel + + + + + + + +2 name1 <bin1> name2 <bin2> + + + + + + + +hmd channel name + + + + + + + +tru + + + + + + + +oic name + + + + + + + +tru + + + + + + + +wrt out sz <bin> + + + + + + + +ack + + + + + + + + + +hmd channel name + + + + + + + +fal + + + + + + + +don + + + + + + + + + +ack + + + + diff --git a/doc/img/beat.ico b/doc/img/favicon.ico similarity index 100% rename from doc/img/beat.ico rename to doc/img/favicon.ico diff --git a/doc/img/logo.png b/doc/img/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..180021b7d25cf7bee47a4c38039562462265c8ab GIT binary patch literal 13399 zcmbVThdY)3`#;J!_7)*CA}fTwYa!8fp)T39b_$5C~!=ML8|_vk89rAaUV$EaDXz_ygMwrKE#| zmmktR5Wm!Jusq;r?och`2ZboVrKwLo}!dh*#g+POV9bGG1f za<$6Xki3pSFe8-YWOcmWu4noh>5SGM2HI`beiaa!;{PgFi+p+IM?^x<&T)EryhhqTW4GRTa4?Pu7%9)%=eaNU|9E|qSX-VBDnONt zs*DsrrKcb#Zyg;S-Ocv&mD}J?#nfYIhZz=;JpE$Y+7l;rFsAJH-=_BO{v#AYXqWjj zF0>Hp!GmlhG4XkNm-!pN83&5m=A-vW>^o_ys(O0Yu!8>k@4p~;c@GQ>Y)fJa@o;g4 zeHxptA-=Y?*%%vVA%X&md1;P~Sh78@`sIwS-W0OxC;I&9Q`zIkk89g++X<#6deln= z^d$3QLL(xqkipC^#2AF~)w6F9B8rNNsCjxw1c=z&-Q80?*T%MuU0h0Wn!>U_Kdl#G z=H(?WY1nz`@YaLwFWnaF0xtqfG^yS%H2x%Q{I9;{2lK^cZK^W`qd<4^lrlsZ5wZ+0)zgqpd zj(i%ksIko~b##7e`!oh57?&{VY4lm{zLR4u_$9`7*%{AfFP(i>ak{oPo(&AH7YYcNVLTO{#skI6!ek@GmuIg z=3*FR0;YU6vtm1SoK39Hwziy=^z>334>zXM`!YmJMpxX~CJYO7x)*-^5|PMMEB^d> zO;KJR=eKL^s7FdtQde+D2qjvp;B38mR>bqgizF;X8#}uv>6w{Qh1J!fi2K=AnZ?C? z6jW4HTE@oG`Sta_d99|Mk+HGKb#Zo;6I2MUr%#_sogS>8I%sPrU_bCD(OkV`bc0Lb zeNyF|nVES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zgU|0?08VUrON`P^~bixm17n5Q-;YEts}rXKNdKhiE~_`%`C1 zw9+-dkXACX8#gYVXR779oUV1G-)#z=8OnU)F{$q7Q?4G5_UY%O^eq0c4yOnQDh!3e+Yuy; zuK8WNTw}kCbjj5@?wYfJpbUUX^+9VXaXkCwW$UMoWI>XU+_-DH=>3Z9O1RlKDh5_c z%Ry`zQPGsBsHo!wc*E~Gxc8b=87mEA00cDC172-5WtgSPsE_ISl=L%~wNTITynMnMZ*(@^v z*Vfit{0}JaxY34_W6O5hL05-CeTy!C9w^F_bwt9Mc zmBY5@(B=DaJDB;~QQ0LInmN>+5*48F`0%=umNb;@z6S}#*IS^1 zFM-cm73r5gt3~Am`I7Krc5A%0pUoccF7wYcc)M+aUfYbw-xrcBBt z?bkWE4;;j#uD;&nRb-?hQ|!7Y;%IexrXn(OHrPop%^ZyB%SQK=L9&d#aPT009c?c> zO5rzY`UyYSAcIH3FeX|>(%}+2>E+G`HQc=yeSmubfaQQ{%M2*ws=GKnwyc(sNd8DzJDG7WxM0e=F1C*b^EO4`e`@E z#+o~Y|7v_4lbN{?2*oEQSyUMoMG>{FZRIzzvR1e8w=Roq{0CvKw}i(U^g6rnS=MK0 z0zl;U0qWx%twb}?(jGxq)PxWp|Bm|a6IRxyEtM^3CvS8Xd(;}OZ=5AN<}8b;kzuo3 zZq2t{JCjnEmk*OK87;YXO^Gs%Cr|iE88ecXp#wi_Lp7q!C06SsBr2;A(x+aX3Qd@o zL;`8dZX;hx&jyW8{d553{S7%iN^Of?DXU<4#`$Kqu4V&ySo&ZSP0qVD)H(Bu?93t>T PKnNvyHMwGxY4HC5CQyi4 literal 0 HcmV?d00001 diff --git a/doc/index.rst b/doc/index.rst index d86978bb..2b94fd59 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -21,9 +21,13 @@ .. with the BEAT platform. If not, see http://www.gnu.org/licenses/. .. -==================== -Core BEAT components -==================== +====================== + Core BEAT components +====================== + +This user guide contains information about BEAT core components, defining +experiments, toolchains and user algorithms among others. + .. toctree:: @@ -36,7 +40,9 @@ Core BEAT components databases io backend_api - api/beat.core + develop + api + Indices and tables ================== diff --git a/doc/introduction.rst b/doc/introduction.rst index 049d354f..f9bfcc55 100644 --- a/doc/introduction.rst +++ b/doc/introduction.rst @@ -205,6 +205,4 @@ those building blocks, their relationships and how to use such a command-line interface to interact with the platform efficiently. -.. Place your links here - -.. _reproducible research: http://reproducibleresearch.net +.. include:: links.rst diff --git a/doc/io.rst b/doc/io.rst index 7185a9ab..8fe05ead 100644 --- a/doc/io.rst +++ b/doc/io.rst @@ -48,10 +48,9 @@ Therefore, we decided to rely on our own binary format. Binary Format ------------- -Our binary format does *not* contains information about the format -of the data itself, and it is hence necessary to know this format -a priori. This means that the format cannot be inferred from the -content of a file. +Our binary format does *not* contains information about the format of the data +itself, and it is hence necessary to know this format a priori. This means that +the format cannot be inferred from the content of a file. We rely on the following fundamental C-style formats: @@ -70,25 +69,24 @@ We rely on the following fundamental C-style formats: * bool (written as a byte) * string -An element of such a basic format is written in the C-style way, -using little-endian byte ordering. +An element of such a basic format is written in the C-style way, using +little-endian byte ordering. -Besides, dataformats always consist of arrays or dictionary of such -fundamental formats or compound formats. +Besides, dataformats always consist of arrays or dictionary of such fundamental +formats or compound formats. -An array of elements is saved as followed. First, the shape of -the array is saved using an *uint64* value for each dimension. Next, -the elements of the arrays are saved in C-style order. +An array of elements is saved as followed. First, the shape of the array is +saved using an *uint64* value for each dimension. Next, the elements of the +arrays are saved in C-style order. -A dictionary of elements is saved as followed. First, the key are -ordered according to the lexicographic ordering. Then, the values -associated to each of these keys are saved following this ordering. +A dictionary of elements is saved as followed. First, the key are ordered +according to the lexicographic ordering. Then, the values associated to each of +these keys are saved following this ordering. -The platform is data-driven and always processes chunks of data. -Therefore, data are always written by chunks, each chunk being -preceded by a text-formated header indicated the start- and end- -indices followed by the size (in bytes) of the chunck. +The platform is data-driven and always processes chunks of data. Therefore, +data are always written by chunks, each chunk being preceded by a text-formated +header indicated the start- and end- indices followed by the size (in bytes) of +the chunck. - -Considering the Python backend of the platform, this binary format -has been successfully implemented using the ``struct`` module. +Considering the Python backend of the platform, this binary format has been +successfully implemented using the ``struct`` module. diff --git a/doc/libraries.rst b/doc/libraries.rst index 7f232584..4e6c1f87 100644 --- a/doc/libraries.rst +++ b/doc/libraries.rst @@ -112,7 +112,4 @@ sufficient to: array_processed = mylib.simple_function(array) - -.. Place your references here - -.. _json: http://en.wikipedia.org/wiki/JSON +.. include:: links.rst diff --git a/doc/links.rst b/doc/links.rst new file mode 100644 index 00000000..7cd86ba3 --- /dev/null +++ b/doc/links.rst @@ -0,0 +1,17 @@ +.. Place your links here + +.. _beat: https://www.idiap.ch/software/beat +.. _docker: https://www.docker.com/ +.. _reproducible research: http://reproducibleresearch.net +.. _numpy safe-casting rules: http://docs.scipy.org/doc/numpy/reference/generated/numpy.can_cast.html +.. _zen of python: https://www.python.org/dev/peps/pep-0020/ +.. _json: http://en.wikipedia.org/wiki/JSON +.. _beat.env.python27: http://gitlab.idiap.ch/biometric/beat.env.python27 +.. _beat.backend.python: http://gitlab.idiap.ch/biometric/beat.backend.python +.. _python 2.7: http://www.python.org +.. _zero message queue: http://zeromq.org +.. _zmq: http://zeromq.org +.. _language bindings: http://zeromq.org/bindings:_start +.. _python bindings: http://zeromq.org/bindings:python +.. _markdown: http://daringfireball.net/projects/markdown/ +.. _restructuredtext: http://docutils.sourceforge.net/rst.html diff --git a/doc/toolchains.rst b/doc/toolchains.rst index 93f4e84c..faac7938 100644 --- a/doc/toolchains.rst +++ b/doc/toolchains.rst @@ -498,4 +498,3 @@ The following example describes the toolchain visible at ] } - diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..57340b8c --- /dev/null +++ b/requirements.txt @@ -0,0 +1,11 @@ +beat.backend.python +docker +docopt +graphviz +jsonschema +numpy +pip +pyzmq +setuptools +simplejson +six diff --git a/buildout_compile_cxx_algorithm.sh b/scripts/compile_cxx_algorithms.sh similarity index 100% rename from buildout_compile_cxx_algorithm.sh rename to scripts/compile_cxx_algorithms.sh diff --git a/buildout_pull_images.sh b/scripts/pull_images.sh similarity index 100% rename from buildout_pull_images.sh rename to scripts/pull_images.sh diff --git a/setup.py b/setup.py old mode 100755 new mode 100644 index 0deaff9b..3f41db1b --- a/setup.py +++ b/setup.py @@ -28,48 +28,27 @@ from setuptools import setup, find_packages -requires = [ - "beat.backend.python", - "docopt", - "graphviz", - "jsonschema", - "numpy", - "pip", - "setuptools", - "simplejson", - "six", - "sphinx<1.7", - "sphinxcontrib-mscgen", - "sphinx-rtd-theme", - "matplotlib>=1.4", - "pyzmq", - "docker", -] +def load_requirements(f): + retval = [str(k.strip()) for k in open(f, 'rt')] + return [k for k in retval if k and k[0] not in ('#', '-')] # The only thing we do in this file is to call the setup() function with all # parameters that define our package. setup( name='beat.core', - version='1.5.1', - description='Biometrics Evaluation and Testing Platform (Core Modules)', + version=open("version.txt").read().rstrip(), + description='Core modules and definitions for the BEAT platform', url='https://gitlab.idiap.ch/beat/beat.core', license='AGPLv3', author='Idiap Research Institute', author_email='beat.support@idiap.ch', long_description=open('README.rst').read(), - # This line is required for any distutils based packaging. packages=find_packages(), include_package_data=True, zip_safe=False, - - namespace_packages=[ - "beat", - ], - - install_requires=requires, - + install_requires=load_requirements('requirements.txt'), entry_points={ 'console_scripts': [ 'worker = beat.core.scripts.worker:main', diff --git a/version.txt b/version.txt new file mode 100644 index 00000000..3357d065 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +1.6.0b0 -- 2.21.0