Commit 8baabf74 authored by Guillaume HEUSCH's avatar Guillaume HEUSCH
Browse files

[migration] changed README, MANIFEST, bootstrap-buildout, doc stuff and setup...

[migration] changed README, MANIFEST, bootstrap-buildout, doc stuff and setup as per migration instruction
parent aa0edbc8
This diff is collapsed.
Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/
Written by Guillaume Heusch <guillaume.heusch@idiap.ch>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
include README.rst bootstrap-buildout.py buildout.cfg COPYING version.txt requirements.txt
include README.rst bootstrap-buildout.py buildout.cfg develop.cfg COPYING version.txt requirements.txt
recursive-include doc doc/plot *.py *.rst *.png *.ico
recursive-include bob/ip/skincolorfilter/data *.jpg
.. Guillaume HEUSCH <guillaume.heusch@idiap.ch>
.. Wed 30 Mar 15:09:35 CEST 2016
.. vim: set fileencoding=utf-8 :
.. Mon 05 Sep 2016 11:50:02 CEST
.. image:: http://img.shields.io/badge/docs-stable-yellow.png
:target: http://pythonhosted.org/bob.ip.skincolorfilter/index.html
.. image:: http://img.shields.io/badge/docs-latest-orange.png
:target: https://www.idiap.ch/software/bob/docs/latest/bioidiap/bob.ip.skincolorfilter/master/index.html
.. image:: https://travis-ci.org/bioidiap/bob.ip.skincolorfilter.svg?branch=master
:target: https://travis-ci.org/bioidiap/bob.ip.skincolorfilter?branch=master
.. image:: https://coveralls.io/repos/bioidiap/bob.ip.skincolorfilter/badge.svg?branch=master
:target: https://coveralls.io/r/bioidiap/bob.ip.skincolorfilter?branch=master
.. image:: https://img.shields.io/badge/github-master-0000c0.png
:target: https://github.com/bioidiap/bob.ip.skincolorfilter/tree/master
:target: https://www.idiap.ch/software/bob/docs/latest/bob/bob.ip.skincolorfilter/master/index.html
.. image:: https://gitlab.idiap.ch/bob/bob.ip.skincolorfilter/badges/master/build.svg
:target: https://gitlab.idiap.ch/bob/bob.ip.skincolorfilter/commits/master
.. image:: https://img.shields.io/badge/gitlab-project-0000c0.svg
:target: https://gitlab.idiap.ch/bob/bob.ip.skincolorfilter
.. image:: http://img.shields.io/pypi/v/bob.ip.skincolorfilter.png
:target: https://pypi.python.org/pypi/bob.ip.skincolorfilter
.. image:: http://img.shields.io/pypi/dm/bob.ip.skincolorfilter.png
......@@ -21,20 +19,28 @@
Skin Color Filter
=================
This package implements the skin color filter described in "Adaptive skin segmentation via feature-based face detection", M.J. Taylor and T. Morris, Proc SPIE Photonics Europe, 2014.
This package is part of the signal-processing and machine learning toolbox
Bob_. It implements the skin color filter described in "Adaptive skin segmentation via feature-based face detection", M.J. Taylor and T. Morris, Proc SPIE Photonics Europe, 2014.
Installation
------------
To install this package -- alone or together with other `Packages of Bob <https://github.com/idiap/bob/wiki/Packages>`_ -- please read the `Installation Instructions <https://github.com/idiap/bob/wiki/Installation>`_.
For Bob_ to be able to work properly, some dependent packages are required to be installed.
Please make sure that you have read the `Dependencies <https://github.com/idiap/bob/wiki/Dependencies>`_ for your operating system.
Follow our `installation`_ instructions. Then, using the Python interpreter
provided by the distribution, bootstrap and buildout this package::
Documentation and Further Information
-------------------------------------
$ python bootstrap-buildout.py
$ ./bin/buildout
For further documentation on this package, please read the `Stable Version <http://pythonhosted.org/bob.ip.skincolorfilter/index.html>`_ or the `Latest Version <https://www.idiap.ch/software/bob/docs/latest/bioidiap/bob.ip.skincolorfilter/master/index.html>`_ of the documentation.
For a list of tutorials on this or the other packages of Bob_, or information on submitting issues, asking questions and starting discussions, please visit its website.
.. _bob: https://www.idiap.ch/software/bob
Contact
-------
For questions or reporting issues to this software package, contact our
development `mailing list`_.
.. Place your references here:
.. _bob: https://www.idiap.ch/software/bob
.. _installation: https://gitlab.idiap.ch/bob/bob/wikis/Installation
.. _mailing list: https://groups.google.com/forum/?fromgroups#!forum/bob-devel
......@@ -25,7 +25,10 @@ import tempfile
from optparse import OptionParser
tmpeggs = tempfile.mkdtemp()
__version__ = '2015-07-01'
# See zc.buildout's changelog if this version is up to date.
tmpeggs = tempfile.mkdtemp(prefix='bootstrap-')
usage = '''\
[DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options]
......@@ -40,8 +43,9 @@ 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("--version",
action="store_true", default=False,
help=("Return bootstrap.py version."))
parser.add_option("-t", "--accept-buildout-test-releases",
dest='accept_buildout_test_releases',
action="store_true", default=False,
......@@ -59,25 +63,33 @@ parser.add_option("-f", "--find-links",
parser.add_option("--allow-site-packages",
action="store_true", default=False,
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",
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)
######################################################################
# 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 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)
if not options.allow_site_packages:
# ez_setup imports site, which adds site packages
......@@ -88,12 +100,19 @@ if not options.allow_site_packages:
# 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]
# Strip all site-packages directories from sys.path that
# 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)
if options.setuptools_version is not None:
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)
import setuptools
......@@ -110,7 +129,12 @@ for path in sys.path:
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',
'import sys; sys.path[0:0] = [%r]; ' % setuptools_path +
'from setuptools.command.easy_install import main; main()',
'-mZqNxd', tmpeggs]
......@@ -123,11 +147,8 @@ find_links = os.environ.get(
if find_links:
cmd.extend(['-f', find_links])
setuptools_path = ws.find(
pkg_resources.Requirement.parse('setuptools')).location
requirement = 'zc.buildout'
version = options.version
version = options.buildout_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
......@@ -167,7 +188,7 @@ if version:
cmd.append(requirement)
import subprocess
if subprocess.call(cmd, env=dict(os.environ, PYTHONPATH=setuptools_path)) != 0:
if subprocess.call(cmd) != 0:
raise Exception(
"Failed to execute command:\n%s" % repr(cmd)[1:-1])
......
# Guillaume HEUSCH <guillaume.heusch@idiap.ch>
# Wed 30 Mar 14:24:00 CEST 2016
; vim: set fileencoding=utf-8 :
; Mon 5 Sep 11:38:11 CEST 2016
[buildout]
parts = scripts
develop = .
eggs = bob.ip.skincolorfilter
bob.extension
extensions = bob.buildout
auto-checkout = *
develop = .
; options for bob.buildout
debug = true
verbose = true
newest = false
verbose = true
[scripts]
recipe = bob.buildout:scripts
dependent-scripts = false
dependent-scripts = true
\ No newline at end of file
# Guillaume HEUSCH <guillaume.heusch@idiap.ch>
# Wed 30 Mar 14:24:00 CEST 2016
[buildout]
parts = scripts
eggs = bob.ip.skincolorfilter
bob.extension
extensions = bob.buildout
auto-checkout = *
develop = .
; options for bob.buildout
debug = true
verbose = true
newest = false
[scripts]
recipe = bob.buildout:scripts
dependent-scripts = false
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Guillaume Heusch <guillaume.heusch@idiap.ch>
# Mon Apr 4 14:24:42 CET 2016
#
# Copyright (C) 2011-2016 Idiap Research Institute, Martigny, Switzerland
import os
import sys
......@@ -11,38 +7,41 @@ 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 -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
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.pngmath',
'sphinx.ext.ifconfig',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'matplotlib.sphinxext.plot_directive',
]
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.ifconfig',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.doctest',
'sphinx.ext.graphviz',
'sphinx.ext.intersphinx',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
]
# The viewcode extension appeared only on Sphinx >= 1.0.0
import sphinx
if sphinx.__version__ >= "1.0":
extensions.append('sphinx.ext.viewcode')
if sphinx.__version__ >= "1.4.1":
extensions.append('sphinx.ext.imgmath')
else:
extensions.append('sphinx.ext.pngmath')
# Always includes todos
todo_include_todos = True
# Generates auto-summary automatically
autosummary_generate = True
# Create numbers on figures with captions
numfig = True
# If we are on OSX, the 'dvipng' path maybe different
dvipng_osx = '/opt/local/libexec/texlive/binaries/dvipng'
if os.path.exists(dvipng_osx): pngmath_dvipng = dvipng_osx
......@@ -60,12 +59,12 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'Skin color filter using Bob'
project = u'bob.ip.skincolorfilter'
import time
copyright = u'%s, Idiap Research Institute' % time.strftime('%Y')
# Grab the setup entry
distribution = pkg_resources.require('bob.ip.skincolorfilter')[0]
distribution = pkg_resources.require(project)[0]
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
......@@ -110,15 +109,18 @@ pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# Included after all input documents
rst_epilog = ''
# Some variables which are useful for generated material
project_variable = project.replace('.', '_')
short_description = u'Skin color filter in the rg colorspace'
owner = [u'Idiap Research Institute']
# -- Options for HTML output ---------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
......@@ -126,14 +128,14 @@ html_theme = 'default'
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
#html_short_title = project_variable
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
......@@ -147,7 +149,7 @@ 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,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']
#html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
......@@ -191,63 +193,48 @@ html_favicon = 'img/favicon.ico'
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'bob_ip_skincolorfilter_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', 'bob_ip_skincolorfilter.tex', u'Documentation for the skin color filter',
u'Biometrics Group, Idiap Research Institute', 'manual'),
]
htmlhelp_basename = project_variable + u'_doc'
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# -- Post configuration --------------------------------------------------------
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output --------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'bob.ip.skincolorfilter', u'Documentation for the skin color filter', [u'Idiap Research Institute'], 1)
]
# Included after all input documents
rst_epilog = """
.. |project| replace:: Bob
.. |version| replace:: %s
.. |current-year| date:: %%Y
""" % (version,)
# Default processing flags for sphinx
autoclass_content = 'both'
autoclass_content = 'class'
autodoc_member_order = 'bysource'
autodoc_default_flags = ['members', 'undoc-members', 'inherited-members', 'show-inheritance']
autodoc_default_flags = [
'members',
'undoc-members',
'inherited-members',
'show-inheritance',
]
# For inter-documentation mapping:
from bob.extension.utils import link_documentation
#intersphinx_mapping = link_documentation(['python', 'numpy', 'scipy', 'matplotlib', 'bob.db.verification.utils'])
intersphinx_mapping = link_documentation(['bob.ip.facedetect'])
intersphinx_mapping = link_documentation()
# 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
app.connect('autodoc-skip-member', member_function_test)
\ No newline at end of file
doc/img/logo.png

11 KB | W: | H:

doc/img/logo.png

6.12 KB | W: | H:

doc/img/logo.png
doc/img/logo.png
doc/img/logo.png
doc/img/logo.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -56,8 +56,8 @@ setup(
version = open("version.txt").read().rstrip(),
description = 'Skin color filter in the rg colorspace',
url = 'https://www.github.com/bioidiap/bob.ip.skincolorfilter',
license = 'GPLv3',
url = 'https://www.gitlab.idiap.ch/bob/bob.ip.skincolorfilter',
license = 'BSD',
author = 'Guillaume Heusch',
author_email = 'guillaume.heusch@idiap.ch',
keywords = 'bob',
......@@ -101,7 +101,7 @@ setup(
'Framework :: Bob',
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Programming Language :: Python',
],
......
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