From e262ea2b01ac0f29a66469074c22a05e2bd30c38 Mon Sep 17 00:00:00 2001
From: Guillaume HEUSCH <guillaume.heusch@idiap.ch>
Date: Tue, 4 Sep 2018 12:26:50 +0200
Subject: [PATCH] [generic] went through the procedure for new packages (conda
 recipe, README, buildout)

---
 MANIFEST.in      |  2 +-
 README.rst       | 34 +++++++++++------------
 conda/meta.yaml  | 72 ++++++++++++++++++++++++++++++++++++++++++++++++
 develop.cfg      | 35 -----------------------
 doc/conf.py      |  9 +-----
 requirements.txt | 15 ++++++++--
 6 files changed, 103 insertions(+), 64 deletions(-)
 create mode 100644 conda/meta.yaml
 delete mode 100644 develop.cfg

diff --git a/MANIFEST.in b/MANIFEST.in
index a1c5876..6377bbe 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1 +1 @@
-include LICENSE README.rst bootstrap-buildout.py buildout.cfg develop.cfg version.txt
+include LICENSE README.rst buildout.cfg develop.cfg version.txt
diff --git a/README.rst b/README.rst
index afc2515..3da55be 100644
--- a/README.rst
+++ b/README.rst
@@ -1,38 +1,36 @@
 .. vim: set fileencoding=utf-8 :
-.. Thu 22 Dec 09:54:50 CET 2016
+.. Tue  4 Sep 12:20:34 CEST 2018
 
-.. image:: http://img.shields.io/badge/docs-stable-yellow.png
-   :target: http://pythonhosted.org/bob.db.fargo/index.html
-.. image:: http://img.shields.io/badge/docs-latest-orange.png
-   :target: https://www.idiap.ch/software/bob/docs/latest/bob/bob.db.fargo/master/index.html
+.. image:: https://img.shields.io/badge/docs-stable-yellow.svg
+   :target: https://www.idiap.ch/software/bob/docs/bob/bob.db.fargo/stable/index.html
+.. image:: https://img.shields.io/badge/docs-latest-orange.svg
+   :target: https://www.idiap.ch/software/bob/docs/bob/bob.db.fargo/master/index.html
 .. image:: https://gitlab.idiap.ch/bob/bob.db.fargo/badges/master/build.svg
    :target: https://gitlab.idiap.ch/bob/bob.db.fargo/commits/master
+.. image:: https://gitlab.idiap.ch/bob/bob.db.fargo/badges/master/coverage.svg
+   :target: https://gitlab.idiap.ch/bob/bob.db.fargo/commits/master
 .. image:: https://img.shields.io/badge/gitlab-project-0000c0.svg
    :target: https://gitlab.idiap.ch/bob/bob.db.fargo
-.. image:: http://img.shields.io/pypi/v/bob.db.fargo.png
-   :target: https://pypi.python.org/pypi/bob.db.fargo
-.. image:: http://img.shields.io/pypi/dm/bob.db.fargo.png
+.. image:: https://img.shields.io/pypi/v/bob.db.fargo.svg
    :target: https://pypi.python.org/pypi/bob.db.fargo
 
 
-==================================
- FARGO Database Access API for Bob
-==================================
+=================================
+FARGO Database Access API for Bob
+=================================
 
 This package is part of the signal-processing and machine learning toolbox
-Bob_. It contains an interface for the evaluation protocols of the FARGO 
-Database. Notice this package does not contain the raw data files from this
-dataset.
+Bob_. It contains an interface for the evaluation protocols of the `FARGO <https://www.idiap.ch/dataset/fargo>`_ Database. 
+Notice this package does not contain the raw data files from this dataset, which need to be obtained through the link above. 
 
 
 Installation
 ------------
 
-Follow our `installation`_ instructions. Then, using the Python interpreter
-provided by the distribution, bootstrap and buildout this package::
+Complete Bob's `installation`_ instructions. Then, to install this package,
+run::
 
-  $ python bootstrap-buildout.py
-  $ ./bin/buildout
+  $ conda install bob.db.fargo
 
 
 Contact
diff --git a/conda/meta.yaml b/conda/meta.yaml
new file mode 100644
index 0000000..660b42f
--- /dev/null
+++ b/conda/meta.yaml
@@ -0,0 +1,72 @@
+{% set name = 'bob.db.fargo' %}
+{% set project_dir = environ.get('RECIPE_DIR') + '/..' %}
+
+package:
+  name: {{ name }}
+  version: {{ environ.get('BOB_PACKAGE_VERSION', '0.0.1') }}
+
+build:
+  <ENTRY_POINTS>
+   entry_points:
+    - extract_images_frontal.py = bob.db.fargo.scripts.extract_images_frontal:main
+    - extract_eyes_center.py = bob.db.fargo.scripts.extract_eyes_center: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 }}
+    - bob.extension
+    - bob.io.base
+    - bob.io.image
+    - bob.io.video
+    - bob.bio.base
+    - bob.bio.face
+    - bob.ip.facedetect
+    - bob.ip.color
+    - bob.ip.draw
+    - bob.db.base
+    - docopt
+    - numpy
+    - json
+setuptools
+  run:
+    - python
+    - setuptools
+    - numpy
+    - json
+    - docopt
+    - gridtk
+    - matplotlib
+    - opencv
+test:
+  imports:
+    - {{ name }}
+  commands:
+    - bob_db_fargo_extract_images_frontal.py --help
+    - bob_db_fargo_extract_eyes_center.py --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]
+  requires:
+    - bob-devel {{ bob_devel }}.*
+    - nose
+    - coverage
+    - sphinx
+    - sphinx_rtd_theme
+
+about:
+  home: https://www.idiap.ch/software/bob/
+  summary: Bob Database interface for the FARGO database 
+  license: BSD 
+  license_family: BSD
diff --git a/develop.cfg b/develop.cfg
deleted file mode 100644
index 50e64ff..0000000
--- a/develop.cfg
+++ /dev/null
@@ -1,35 +0,0 @@
-; vim: set fileencoding=utf-8 :
-; Guillaume Heusch <guillaume.heusch@idiap.ch>
-; Tue Jan 3 10:20:14 CEST 2017
-
-[buildout]
-parts = scripts
-eggs = bob.db.fargo
-extensions = bob.buildout
-             mr.developer
-auto-checkout = *          
-
-develop = src/bob.io.base
-          src/bob.io.image
-          src/bob.db.base
-          src/bob.bio.base
-          src/bob.bio.face
-          .
-
-
-
-; options for bob.buildout extension
-debug = false
-verbose = true
-newest = false
-
-[sources]
-bob.io.base = git https://gitlab.idiap.ch/bob/bob.io.base
-bob.io.image = git https://gitlab.idiap.ch/bob/bob.io.image
-bob.db.base = git https://gitlab.idiap.ch/bob/bob.db.base
-bob.bio.base = git https://gitlab.idiap.ch/bob/bob.bio.base
-bob.bio.face = git https://gitlab.idiap.ch/bob/bob.bio.face
-
-[scripts]
-recipe = bob.buildout:scripts
-dependent-scripts=true
diff --git a/doc/conf.py b/doc/conf.py
index 7524dfd..ae53552 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -25,16 +25,10 @@ extensions = [
     'sphinx.ext.intersphinx',
     'sphinx.ext.napoleon',
     'sphinx.ext.viewcode',
+    'sphinx.ext.mathjax',
     #'matplotlib.sphinxext.plot_directive'
     ]
 
-import sphinx
-if sphinx.__version__ >= "1.4.1":
-    extensions.append('sphinx.ext.imgmath')
-    imgmath_image_format = 'svg'
-else:
-    extensions.append('sphinx.ext.pngmath')
-
 # Be picky about warnings
 nitpicky = True
 
@@ -232,7 +226,6 @@ autodoc_member_order = 'bysource'
 autodoc_default_flags = [
   'members',
   'undoc-members',
-  'inherited-members',
   'show-inheritance',
   ]
 
diff --git a/requirements.txt b/requirements.txt
index 8232b42..90e8032 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,6 +1,17 @@
-setuptools
+bob.extension
 bob.io.base
 bob.io.image
-bob.db.base
+bob.io.video
 bob.bio.base
 bob.bio.face
+bob.ip.facedetect
+bob.ip.color
+bob.ip.draw
+bob.db.base
+gridtk
+matplotlib
+docopt
+numpy
+opencv
+json
+setuptools
-- 
GitLab