Commit 5b1f769d authored by Manuel Günther's avatar Manuel Günther

New README and documentation strategy.

parent 99d9da2c
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
*.swp *.swp
*.pyc *.pyc
*.so *.so
*.so.* *.dylib
CMakeLists.txt
bin bin
eggs eggs
parts parts
...@@ -18,4 +17,3 @@ dist ...@@ -18,4 +17,3 @@ dist
build build
*.egg *.egg
src/ src/
opsnr.stt
...@@ -9,6 +9,7 @@ matrix: ...@@ -9,6 +9,7 @@ matrix:
- SCIPYSPEC===0.12.0 - SCIPYSPEC===0.12.0
- secure: WxnAQRmA61mfHCw7wkzp+77ia2RKh111lZPm3kzeVlgARXWMWDlUp3jiTkFb5SagcTBh3TOVI+5/HUddjKLjRQJz4yvA3LkfoJ2PzBz7jGG6nvr16cknkJemD6kPZbqJC3AhGcgUKlbQXsQvu9dN6bQCDU5SolEFSNUY+QV/ozw= - secure: WxnAQRmA61mfHCw7wkzp+77ia2RKh111lZPm3kzeVlgARXWMWDlUp3jiTkFb5SagcTBh3TOVI+5/HUddjKLjRQJz4yvA3LkfoJ2PzBz7jGG6nvr16cknkJemD6kPZbqJC3AhGcgUKlbQXsQvu9dN6bQCDU5SolEFSNUY+QV/ozw=
- secure: P5pPcavMSCel03a00r63dbO6lx/YFMxxLuGHXVpIvjPuN8WiXDyTI/0aKVGXORvSmvtyqRK07DSdzP/qyoUa2CtpVtbYEQDWJj2uXlufnE6L3rzR8R2oUt1v4zF8LHJ6gqzUKqi4YCg4KCzE6V6ANjsrJKKiiXCIdwfFYmRzpPU= - secure: P5pPcavMSCel03a00r63dbO6lx/YFMxxLuGHXVpIvjPuN8WiXDyTI/0aKVGXORvSmvtyqRK07DSdzP/qyoUa2CtpVtbYEQDWJj2uXlufnE6L3rzR8R2oUt1v4zF8LHJ6gqzUKqi4YCg4KCzE6V6ANjsrJKKiiXCIdwfFYmRzpPU=
- BOB_DOCUMENTATION_SERVER=https://www.idiap.ch/software/bob/docs/latest/bioidiap/%s/master
- python: 3.2 - python: 3.2
env: env:
- NUMPYSPEC===1.8.0 - NUMPYSPEC===1.8.0
...@@ -20,7 +21,7 @@ matrix: ...@@ -20,7 +21,7 @@ matrix:
before_install: before_install:
- sudo add-apt-repository -y ppa:biometrics/bob - sudo add-apt-repository -y ppa:biometrics/bob
- sudo apt-get update -qq - sudo apt-get update -qq
- sudo apt-get install -qq --force-yes libboost-all-dev libblitz1-dev libatlas-dev libatlas-base-dev liblapack-dev gfortran - sudo apt-get install -qq --force-yes libboost-all-dev libblitz1-dev libatlas-dev libatlas-base-dev liblapack-dev gfortran texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
- pip install --upgrade pip setuptools - pip install --upgrade pip setuptools
- if [ -n "${NUMPYSPEC}" ]; then pip install --find-links http://wheels.astropy.org/ --find-links http://wheels2.astropy.org/ --use-wheel numpy$NUMPYSPEC; fi - if [ -n "${NUMPYSPEC}" ]; then pip install --find-links http://wheels.astropy.org/ --find-links http://wheels2.astropy.org/ --use-wheel numpy$NUMPYSPEC; fi
- pip install --find-links http://wheels.astropy.org/ --find-links http://wheels2.astropy.org/ --use-wheel scipy$SCIPYSPEC sphinx nose==1.3.0 jinja2==2.6 cpp-coveralls - pip install --find-links http://wheels.astropy.org/ --find-links http://wheels2.astropy.org/ --use-wheel scipy$SCIPYSPEC sphinx nose==1.3.0 jinja2==2.6 cpp-coveralls
......
...@@ -2,79 +2,34 @@ ...@@ -2,79 +2,34 @@
.. Andre Anjos <andre.anjos@idiap.ch> .. Andre Anjos <andre.anjos@idiap.ch>
.. Thu 30 Jan 08:46:53 2014 CET .. Thu 30 Jan 08:46:53 2014 CET
.. image:: https://travis-ci.org/bioidiap/bob.ap.svg?branch=master .. image:: http://img.shields.io/badge/docs-stable-yellow.png
:target: https://travis-ci.org/bioidiap/bob.ap :target: http://pythonhosted.org/bob.sp/index.html
.. image:: http://img.shields.io/badge/docs-latest-orange.png .. image:: http://img.shields.io/badge/docs-latest-orange.png
:target: https://www.idiap.ch/software/bob/docs/latest/bioidiap/bob.ap/master/index.html :target: https://www.idiap.ch/software/bob/docs/latest/bioidiap/bob.ap/master/index.html
.. image:: https://travis-ci.org/bioidiap/bob.ap.svg?branch=master
:target: https://travis-ci.org/bioidiap/bob.ap
.. image:: https://coveralls.io/repos/bioidiap/bob.ap/badge.png .. image:: https://coveralls.io/repos/bioidiap/bob.ap/badge.png
:target: https://coveralls.io/r/bioidiap/bob.ap :target: https://coveralls.io/r/bioidiap/bob.ap
.. image:: http://img.shields.io/github/tag/bioidiap/bob.ap.png
:target: https://github.com/bioidiap/bob.ap
.. image:: http://img.shields.io/pypi/v/bob.ap.png .. image:: http://img.shields.io/pypi/v/bob.ap.png
:target: https://pypi.python.org/pypi/bob.ap :target: https://pypi.python.org/pypi/bob.ap
.. image:: http://img.shields.io/pypi/dm/bob.ap.png .. image:: http://img.shields.io/pypi/dm/bob.ap.png
:target: https://pypi.python.org/pypi/bob.ap :target: https://pypi.python.org/pypi/bob.ap
============================= ==========================
Python bindings for bob.ap Audio Processing for Bob
============================= ==========================
This package contains a set of Pythonic bindings for Bob's signal processing This package contains Bob's audio processing package and functionality.
package and functionality.
Installation 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>`_.
Install it through normal means, via PyPI or use ``zc.buildout`` to bootstrap For Bob_ to be able to work properly, some dependent packages are required to be installed.
the package and run test units. Please make sure that you have read the `Dependencies <https://github.com/idiap/bob/wiki/Dependencies>`_ for your operating system.
Documentation Documentation
------------- -------------
For further documentation on this package, please read the `Stable Version <http://pythonhosted.org/bob.ap/index.html>`_ or the `Latest Version <https://www.idiap.ch/software/bob/docs/latest/bioidiap/bob.ap/master/index.html>`_ of the documentation.
For a list of tutorials on this or the other packages ob Bob_, or information on submitting issues, asking questions and starting discussions, please visit its website.
The latest version of the documentation can be found `here <https://www.idiap.ch/software/bob/docs/latest/bioidiap/bob.ap/master/index.html>`_. .. _bob: https://www.idiap.ch/software/bob
Otherwise, you can generate the documentation for this package yourself, after installation, using Sphinx::
$ sphinx-build -b html doc sphinx
This shall place in the directory ``sphinx``, the current version for the
documentation of the package.
Testing
-------
You can run a set of tests using the nose test runner::
$ nosetests -sv
.. warning::
If Bob <= 1.2.1 is installed on your python path, nose will automatically
load the old version of the insulate plugin available in Bob, which will
trigger the loading of incompatible shared libraries (from Bob itself), in
to your working binary. This will cause a stack corruption. Either remove
the centrally installed version of Bob, or build your own version of Python
in which Bob <= 1.2.1 is not installed.
You can run our documentation tests using sphinx itself::
$ sphinx-build -b doctest doc sphinx
You can test overall test coverage with::
$ nosetests --with-coverage --cover-package=bob.ap
The ``coverage`` egg must be installed for this to work properly.
Development
-----------
To develop this package, install using ``zc.buildout``, using the buildout
configuration found on the root of the package::
$ python bootstrap.py
...
$ ./bin/buildout
Tweak the options in ``buildout.cfg`` to disable/enable verbosity and debug
builds.
...@@ -17,6 +17,7 @@ develop = src/bob.extension ...@@ -17,6 +17,7 @@ develop = src/bob.extension
; options for bob.buildout extension ; options for bob.buildout extension
debug = true debug = true
verbose = true verbose = true
newest = false
[sources] [sources]
bob.extension = git https://github.com/bioidiap/bob.extension bob.extension = git https://github.com/bioidiap/bob.extension
......
...@@ -249,36 +249,10 @@ autoclass_content = 'both' ...@@ -249,36 +249,10 @@ autoclass_content = 'both'
autodoc_member_order = 'bysource' autodoc_member_order = 'bysource'
autodoc_default_flags = ['members', 'undoc-members', 'inherited-members', 'show-inheritance'] autodoc_default_flags = ['members', 'undoc-members', 'inherited-members', 'show-inheritance']
def smaller_than(v1, v2):
"""Compares scipy/numpy version numbers"""
c1 = v1.split('.')
c2 = v2.split('.')[:len(c1)] #clip to the compared version
for i, k in enumerate(c2):
n1 = c1[i]
n2 = c2[i]
try:
n1 = int(n1)
n2 = int(n2)
except ValueError:
n1 = str(n1)
n2 = str(n2)
if n1 > n2: return False
return True
# Some name mangling to find the correct sphinx manuals for some packages
numpy_version = __import__('numpy').version.version
if smaller_than(numpy_version, '1.5.z'):
numpy_version = '.'.join(numpy_version.split('.')[:-1]) + '.x'
else:
numpy_version = '.'.join(numpy_version.split('.')[:-1]) + '.0'
numpy_manual = 'http://docs.scipy.org/doc/numpy-%s/' % numpy_version
# For inter-documentation mapping: # For inter-documentation mapping:
intersphinx_mapping = { from bob.extension.utils import link_documentation
'http://docs.python.org/%d.%d/' % sys.version_info[:2]: None, intersphinx_mapping = link_documentation(['python', 'numpy', 'scipy', 'pysox'])
numpy_manual: None,
}
def setup(app): def setup(app):
pass pass
...@@ -36,9 +36,9 @@ Below are 3 examples on how to read a wavefile and how to compute Linear frequen ...@@ -36,9 +36,9 @@ Below are 3 examples on how to read a wavefile and how to compute Linear frequen
Reading audio files Reading audio files
~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
The usual native formats can be read with **scipy.io.wavfile** module. Other The usual native formats can be read with :py:mod:`scipy.io.wavfile` module. Other
wave formats can be found in some other python modules like **pysox**. An wave formats can be found in some other python modules like :py:mod:`pysox`. An
example of wave file can be found here **bob/ap/test/data/sample.wav** example of wave file can be found here ``bob/ap/test/data/sample.wav``
.. doctest:: aptest .. doctest:: aptest
:options: +NORMALIZE_WHITESPACE :options: +NORMALIZE_WHITESPACE
...@@ -66,7 +66,7 @@ LFCC and MFCC Extraction ...@@ -66,7 +66,7 @@ LFCC and MFCC Extraction
~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~
The LFCC and MFCC coefficients can be extracted from a audio signal by using The LFCC and MFCC coefficients can be extracted from a audio signal by using
:py:func:`bob.ap.Ceps`. To do so, several parameters can be precised by the :py:class:`bob.ap.Ceps`. To do so, several parameters can be precised by the
user. Typically, these are precised in a configuration file. The following user. Typically, these are precised in a configuration file. The following
values are the default ones: values are the default ones:
...@@ -84,7 +84,7 @@ values are the default ones: ...@@ -84,7 +84,7 @@ values are the default ones:
>>> dct_norm = True # A factor by which the cepstral coefficients are multiplied >>> dct_norm = True # A factor by which the cepstral coefficients are multiplied
>>> mel_scale = True # Tell whether cepstral features are extracted on a linear (LFCC) or Mel (MFCC) scale >>> mel_scale = True # Tell whether cepstral features are extracted on a linear (LFCC) or Mel (MFCC) scale
Once the parameters are precised, :py:func:`bob.ap.Ceps` can be called as Once the parameters are precised, :py:class:`bob.ap.Ceps` can be called as
follows: follows:
.. doctest:: aptest .. doctest:: aptest
......
...@@ -18,7 +18,7 @@ setup( ...@@ -18,7 +18,7 @@ setup(
name='bob.ap', name='bob.ap',
version=version, version=version,
description='Bindings for Bob\'s audio processing utilities', description='Bob\'s audio processing utilities',
url='http://github.com/bioidiap/bob.ap', url='http://github.com/bioidiap/bob.ap',
license='BSD', license='BSD',
author='Andre Anjos', author='Andre Anjos',
...@@ -75,7 +75,8 @@ setup( ...@@ -75,7 +75,8 @@ setup(
}, },
classifiers = [ classifiers = [
'Development Status :: 3 - Alpha', 'Framework :: Bob',
'Development Status :: 4 - Beta',
'Intended Audience :: Developers', 'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License', 'License :: OSI Approved :: BSD License',
'Natural Language :: English', 'Natural Language :: English',
......
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