Commit 0ced2385 authored by André Anjos's avatar André Anjos 💬

xbob -> bob

parent 25023f65
......@@ -25,8 +25,8 @@ install:
- "python bootstrap.py"
- "CFLAGS=-coverage ./bin/buildout"
script:
- "./bin/python -c 'from xbob.io.image import get_config; print(get_config())'"
- "./bin/coverage run --source=xbob.io.image ./bin/nosetests -sv"
- "./bin/python -c 'from bob.io.image import get_config; print(get_config())'"
- "./bin/coverage run --source=bob.io.image ./bin/nosetests -sv"
- "./bin/sphinx-build -b doctest doc sphinx"
- "./bin/sphinx-build -b html doc sphinx"
after_success:
......
include LICENSE README.rst bootstrap.py buildout.cfg
recursive-include doc conf.py *.rst
recursive-include xbob *.cpp *.h
recursive-include xbob/io/image/data *.*
recursive-include bob *.cpp *.h
recursive-include bob/io/image/data *.*
......@@ -2,16 +2,16 @@
.. Andre Anjos <andre.anjos@idiap.ch>
.. Thu 29 Aug 2013 16:07:57 CEST
.. image:: https://travis-ci.org/bioidiap/xbob.io.image.svg?branch=master
:target: https://travis-ci.org/bioidiap/xbob.io.image
.. image:: https://coveralls.io/repos/bioidiap/xbob.io.image/badge.png
:target: https://coveralls.io/r/bioidiap/xbob.io.image
.. image:: http://img.shields.io/github/tag/bioidiap/xbob.io.image.png
:target: https://github.com/bioidiap/xbob.io.image
.. image:: http://img.shields.io/pypi/v/xbob.io.image.png
:target: https://pypi.python.org/pypi/xbob.io.image
.. image:: http://img.shields.io/pypi/dm/xbob.io.image.png
:target: https://pypi.python.org/pypi/xbob.io.image
.. image:: https://travis-ci.org/bioidiap/bob.io.image.svg?branch=master
:target: https://travis-ci.org/bioidiap/bob.io.image
.. image:: https://coveralls.io/repos/bioidiap/bob.io.image/badge.png
:target: https://coveralls.io/r/bioidiap/bob.io.image
.. image:: http://img.shields.io/github/tag/bioidiap/bob.io.image.png
:target: https://github.com/bioidiap/bob.io.image
.. image:: http://img.shields.io/pypi/v/bob.io.image.png
:target: https://pypi.python.org/pypi/bob.io.image
.. image:: http://img.shields.io/pypi/dm/bob.io.image.png
:target: https://pypi.python.org/pypi/bob.io.image
===========================
Image I/O Support for Bob
......@@ -19,7 +19,7 @@
This package contains no bindings. By importing it, you activate a transparent
plugin that makes possible reading and writing to image files using
:py:mod:`xbob.io.base` functionality.
:py:mod:`bob.io.base` functionality.
Installation
------------
......@@ -85,18 +85,18 @@ Usage
In order to enable support for Matlab(R) file reading and writing in your
application, make sure to import this module, before calling
:py:func:`xbob.io.base.open` or similar::
:py:func:`bob.io.base.open` or similar::
>>> import xbob.io.base
>>> import xbob.io.image
>>> xbob.io.base.open('myfile.mat', 'r')
>>> import bob.io.base
>>> import bob.io.image
>>> bob.io.base.open('myfile.mat', 'r')
Testing
-------
You can run a set of tests using the nose test runner::
$ nosetests -sv xbob.io.image
$ nosetests -sv bob.io.image
.. warning::
......@@ -113,7 +113,7 @@ You can run our documentation tests using sphinx itself::
You can test overall test coverage with::
$ nosetests --with-coverage --cover-package=xbob.io.image
$ nosetests --with-coverage --cover-package=bob.io.image
The ``coverage`` egg must be installed for this to work properly.
......
......@@ -13,8 +13,8 @@ import sys
import numpy
import nose.tools
from xbob.io.base import load, test_utils
from xbob.io.base.test_file import transcode, array_readwrite, arrayset_readwrite
from bob.io.base import load, test_utils
from bob.io.base.test_file import transcode, array_readwrite, arrayset_readwrite
def test_all():
......
......@@ -9,9 +9,9 @@
#undef NO_IMPORT_ARRAY
#endif
#include <xbob.blitz/capi.h>
#include <xbob.blitz/cleanup.h>
#include <xbob.io.base/api.h>
#include <bob.blitz/capi.h>
#include <bob.blitz/cleanup.h>
#include <bob.io.base/api.h>
#include "file.h"
#include <jpeglib.h>
......@@ -25,7 +25,7 @@ PyDoc_STRVAR(module_docstr, "Image I/O support for Bob");
#if PY_VERSION_HEX >= 0x03000000
static PyModuleDef module_definition = {
PyModuleDef_HEAD_INIT,
XBOB_EXT_MODULE_NAME,
BOB_EXT_MODULE_NAME,
module_docstr,
-1,
module_methods,
......@@ -38,24 +38,24 @@ static PyObject* create_module (void) {
# if PY_VERSION_HEX >= 0x03000000
PyObject* m = PyModule_Create(&module_definition);
# else
PyObject* m = Py_InitModule3(XBOB_EXT_MODULE_NAME, module_methods, module_docstr);
PyObject* m = Py_InitModule3(BOB_EXT_MODULE_NAME, module_methods, module_docstr);
# endif
if (!m) return 0;
auto m_ = make_safe(m);
/* register some constants */
if (PyModule_AddStringConstant(m, "__version__", XBOB_EXT_MODULE_VERSION) < 0) return 0;
if (PyModule_AddStringConstant(m, "__version__", BOB_EXT_MODULE_VERSION) < 0) return 0;
/* imports dependencies */
if (import_xbob_blitz() < 0) {
if (import_bob_blitz() < 0) {
PyErr_Print();
PyErr_Format(PyExc_ImportError, "cannot import `%s'", XBOB_EXT_MODULE_NAME);
PyErr_Format(PyExc_ImportError, "cannot import `%s'", BOB_EXT_MODULE_NAME);
return 0;
}
if (import_xbob_io_base() < 0) {
if (import_bob_io_base() < 0) {
PyErr_Print();
PyErr_Format(PyExc_ImportError, "cannot import `%s'", XBOB_EXT_MODULE_NAME);
PyErr_Format(PyExc_ImportError, "cannot import `%s'", BOB_EXT_MODULE_NAME);
return 0;
}
......@@ -117,7 +117,7 @@ static PyObject* create_module (void) {
}
PyMODINIT_FUNC XBOB_EXT_ENTRY_NAME (void) {
PyMODINIT_FUNC BOB_EXT_ENTRY_NAME (void) {
# if PY_VERSION_HEX >= 0x03000000
return
# endif
......
......@@ -10,7 +10,7 @@
import os
import numpy
from xbob.io.base import load, write, test_utils
from bob.io.base import load, write, test_utils
# These are some global parameters for the test.
PNG_INDEXED_COLOR = test_utils.datafile('img_indexed_color.png', __name__)
......
......@@ -10,9 +10,9 @@
#ifdef NO_IMPORT_ARRAY
#undef NO_IMPORT_ARRAY
#endif
#include <xbob.blitz/capi.h>
#include <xbob.blitz/cleanup.h>
#include <xbob.io.base/api.h>
#include <bob.blitz/capi.h>
#include <bob.blitz/cleanup.h>
#include <bob.io.base/api.h>
#include <string>
#include <boost/preprocessor/stringize.hpp>
#include <boost/version.hpp>
......@@ -164,17 +164,17 @@ static PyObject* numpy_version() {
}
/**
* xbob.blitz c/c++ api version
* bob.blitz c/c++ api version
*/
static PyObject* xbob_blitz_version() {
return Py_BuildValue("{ss}", "api", BOOST_PP_STRINGIZE(XBOB_BLITZ_API_VERSION));
static PyObject* bob_blitz_version() {
return Py_BuildValue("{ss}", "api", BOOST_PP_STRINGIZE(BOB_BLITZ_API_VERSION));
}
/**
* xbob.io.base c/c++ api version
* bob.io.base c/c++ api version
*/
static PyObject* xbob_io_base_version() {
return Py_BuildValue("{ss}", "api", BOOST_PP_STRINGIZE(XBOB_IO_BASE_API_VERSION));
static PyObject* bob_io_base_version() {
return Py_BuildValue("{ss}", "api", BOOST_PP_STRINGIZE(BOB_IO_BASE_API_VERSION));
}
static PyObject* build_version_dictionary() {
......@@ -194,8 +194,8 @@ static PyObject* build_version_dictionary() {
if (!dict_steal(retval, "Python", python_version())) return 0;
if (!dict_steal(retval, "NumPy", numpy_version())) return 0;
if (!dict_set(retval, "Blitz++", BZ_VERSION)) return 0;
if (!dict_steal(retval, "xbob.blitz", xbob_blitz_version())) return 0;
if (!dict_steal(retval, "xbob.io.base", xbob_io_base_version())) return 0;
if (!dict_steal(retval, "bob.blitz", bob_blitz_version())) return 0;
if (!dict_steal(retval, "bob.io.base", bob_io_base_version())) return 0;
Py_INCREF(retval);
return retval;
......@@ -212,7 +212,7 @@ PyDoc_STRVAR(module_docstr,
#if PY_VERSION_HEX >= 0x03000000
static PyModuleDef module_definition = {
PyModuleDef_HEAD_INIT,
XBOB_EXT_MODULE_NAME,
BOB_EXT_MODULE_NAME,
module_docstr,
-1,
module_methods,
......@@ -225,26 +225,26 @@ static PyObject* create_module (void) {
# if PY_VERSION_HEX >= 0x03000000
PyObject* m = PyModule_Create(&module_definition);
# else
PyObject* m = Py_InitModule3(XBOB_EXT_MODULE_NAME, module_methods, module_docstr);
PyObject* m = Py_InitModule3(BOB_EXT_MODULE_NAME, module_methods, module_docstr);
# endif
if (!m) return 0;
auto m_ = make_safe(m); ///< protects against early returns
/* register version numbers and constants */
if (PyModule_AddStringConstant(m, "module", XBOB_EXT_MODULE_VERSION) < 0)
if (PyModule_AddStringConstant(m, "module", BOB_EXT_MODULE_VERSION) < 0)
return 0;
if (PyModule_AddObject(m, "externals", build_version_dictionary()) < 0) return 0;
/* imports dependencies */
if (import_xbob_blitz() < 0) {
if (import_bob_blitz() < 0) {
PyErr_Print();
PyErr_Format(PyExc_ImportError, "cannot import `%s'", XBOB_EXT_MODULE_NAME);
PyErr_Format(PyExc_ImportError, "cannot import `%s'", BOB_EXT_MODULE_NAME);
return 0;
}
if (import_xbob_io_base() < 0) {
if (import_bob_io_base() < 0) {
PyErr_Print();
PyErr_Format(PyExc_ImportError, "cannot import `%s'", XBOB_EXT_MODULE_NAME);
PyErr_Format(PyExc_ImportError, "cannot import `%s'", BOB_EXT_MODULE_NAME);
return 0;
}
......@@ -253,7 +253,7 @@ static PyObject* create_module (void) {
}
PyMODINIT_FUNC XBOB_EXT_ENTRY_NAME (void) {
PyMODINIT_FUNC BOB_EXT_ENTRY_NAME (void) {
# if PY_VERSION_HEX >= 0x03000000
return
# endif
......
......@@ -4,25 +4,25 @@
[buildout]
parts = scripts
eggs = xbob.io.image
extensions = xbob.buildout
eggs = bob.io.image
extensions = bob.buildout
mr.developer
auto-checkout = *
develop = src/xbob.extension
src/xbob.blitz
src/xbob.io.base
develop = src/bob.extension
src/bob.blitz
src/bob.io.base
.
; options for xbob.buildout extension
; options for bob.buildout extension
debug = true
verbose = true
prefixes = /idiap/group/torch5spro/releases/bob-2.0.0a3/install/linux-x86_64-release
prefixes = /idiap/group/torch5spro/releases/preview/install/linux-x86_64-release
/Users/andre/work/bob/b/dbg/
[sources]
xbob.extension = git https://github.com/bioidiap/xbob.extension branch=prototype
xbob.blitz = git https://github.com/bioidiap/xbob.blitz
xbob.io.base = git https://github.com/bioidiap/xbob.io.base
bob.extension = git https://github.com/bioidiap/bob.extension
bob.blitz = git https://github.com/bioidiap/bob.blitz
bob.io.base = git https://github.com/bioidiap/bob.io.base
[scripts]
recipe = xbob.buildout:scripts
recipe = bob.buildout:scripts
......@@ -58,12 +58,12 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'xbob.io.image'
project = u'bob.io.image'
import time
copyright = u'%s, Idiap Research Institute' % time.strftime('%Y')
# Grab the setup entry
distribution = pkg_resources.require('xbob.io.image')[0]
distribution = pkg_resources.require('bob.io.image')[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
......@@ -129,7 +129,7 @@ if sphinx.__version__ >= "1.0":
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = 'xbob_io_image'
#html_short_title = 'bob_io_image'
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
......@@ -187,7 +187,7 @@ html_favicon = 'img/favicon.ico'
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'xbob_io_image_doc'
htmlhelp_basename = 'bob_io_image_doc'
# -- Options for LaTeX output --------------------------------------------------
......@@ -201,7 +201,7 @@ 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', 'xbob_io_image.tex', u'Image I/O Support for Bob',
('index', 'bob_io_image.tex', u'Image I/O Support for Bob',
u'Biometrics Group, Idiap Research Institute', 'manual'),
]
......@@ -241,7 +241,7 @@ rst_epilog = """
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'xbob_io_image', u'Image I/O Support for Bob', [u'Idiap Research Institute'], 1)
('index', 'bob_io_image', u'Image I/O Support for Bob', [u'Idiap Research Institute'], 1)
]
# Default processing flags for sphinx
......
......@@ -5,8 +5,8 @@
.. testsetup:: *
import numpy
import xbob.io.base
import xbob.io.image
import bob.io.base
import bob.io.image
import tempfile
import os
......@@ -23,9 +23,9 @@ writing routines to load and save files using various image formats.
.. code-block:: python
>> import xbob.io.base
>> import xbob.io.image #under the hood: loads Bob plugin for image files
>> x = xbob.io.base.load('myfile.jpg')
>> import bob.io.base
>> import bob.io.image #under the hood: loads Bob plugin for image files
>> x = bob.io.base.load('myfile.jpg')
In the following example, an image generated randomly using the method `NumPy`
:py:meth:`numpy.random.random_integers`, is saved in JPEG format. The image
......@@ -34,8 +34,8 @@ must be of type ``uint8`` or ``uint16``:
.. doctest::
>>> my_image = numpy.random.random_integers(0,255,(3,256,256))
>>> xbob.io.base.save(my_image.astype('uint8'), 'testimage.jpg') # saving the image in jpeg format
>>> my_image_copy = xbob.io.base.load('testimage.jpg')
>>> bob.io.base.save(my_image.astype('uint8'), 'testimage.jpg') # saving the image in jpeg format
>>> my_image_copy = bob.io.base.load('testimage.jpg')
The loaded image files can be 3D arrays (for RGB format) or 2D arrays (for
greyscale) of type ``uint8`` or ``uint16``.
......
......@@ -10,9 +10,9 @@
.. todolist::
This module provides a plugin for :py:mod:`xbob.io.base` that allows |project|
to read and write images using its native API (:py:func:`xbob.io.base.load` and
:py:func:`xbob.io.base.save`).
This module provides a plugin for :py:mod:`bob.io.base` that allows |project|
to read and write images using its native API (:py:func:`bob.io.base.load` and
:py:func:`bob.io.base.save`).
At present, this plugin provides support for the following types of images:
......
......@@ -7,7 +7,7 @@
============
This section includes information for using the pure Python API of
``xbob.io.image``.
``bob.io.image``.
.. automodule:: xbob.io.image
.. automodule:: bob.io.image
......@@ -4,12 +4,12 @@
# Mon 16 Apr 08:18:08 2012 CEST
from setuptools import setup, find_packages, dist
dist.Distribution(dict(setup_requires=['xbob.blitz', 'xbob.io.base']))
from xbob.extension.utils import egrep, find_header, find_library
from xbob.blitz.extension import Extension
import xbob.io.base
dist.Distribution(dict(setup_requires=['bob.blitz', 'bob.io.base']))
from bob.extension.utils import egrep, find_header, find_library
from bob.blitz.extension import Extension
import bob.io.base
include_dirs = [xbob.io.base.get_include()]
include_dirs = [bob.io.base.get_include()]
packages = ['boost', 'bob-io >= 2.0.0a2', 'libpng']
version = '2.0.0a0'
......@@ -30,7 +30,7 @@ class jpeg:
"""
Searches for libjpeg in stock locations. Allows user to override.
If the user sets the environment variable XBOB_PREFIX_PATH, that prefixes
If the user sets the environment variable BOB_PREFIX_PATH, that prefixes
the standard path locations.
Parameters:
......@@ -122,7 +122,7 @@ class tiff:
"""
Searches for libtiff in stock locations. Allows user to override.
If the user sets the environment variable XBOB_PREFIX_PATH, that prefixes
If the user sets the environment variable BOB_PREFIX_PATH, that prefixes
the standard path locations.
Parameters:
......@@ -228,7 +228,7 @@ class gif:
"""
Searches for libgif in stock locations. Allows user to override.
If the user sets the environment variable XBOB_PREFIX_PATH, that prefixes
If the user sets the environment variable BOB_PREFIX_PATH, that prefixes
the standard path locations.
Parameters:
......@@ -314,7 +314,7 @@ class netpbm:
"""
Searches for netpbm in stock locations. Allows user to override.
If the user sets the environment variable XBOB_PREFIX_PATH, that prefixes
If the user sets the environment variable BOB_PREFIX_PATH, that prefixes
the standard path locations.
Parameters:
......@@ -394,10 +394,10 @@ define_macros = \
setup(
name='xbob.io.image',
name='bob.io.image',
version=version,
description='Image I/O support for Bob',
url='http://github.com/bioidiap/xbob.io.image',
url='http://github.com/bioidiap/bob.io.image',
license='BSD',
author='Andre Anjos',
author_email='andre.anjos@idiap.ch',
......@@ -409,19 +409,19 @@ setup(
install_requires=[
'setuptools',
'xbob.blitz',
'xbob.io.base',
'bob.blitz',
'bob.io.base',
],
namespace_packages=[
"xbob",
"xbob.io",
"bob",
"bob.io",
],
ext_modules = [
Extension("xbob.io.image.version",
Extension("bob.io.image.version",
[
"xbob/io/image/version.cpp",
"bob/io/image/version.cpp",
],
packages = packages,
boost_modules = ['system'],
......@@ -432,15 +432,15 @@ setup(
libraries = libraries,
define_macros = define_macros,
),
Extension("xbob.io.image._library",
Extension("bob.io.image._library",
[
"xbob/io/image/tiff.cpp",
"xbob/io/image/gif.cpp",
"xbob/io/image/png.cpp",
"xbob/io/image/jpeg.cpp",
"xbob/io/image/bmp.cpp",
"xbob/io/image/netpbm.cpp",
"xbob/io/image/main.cpp",
"bob/io/image/tiff.cpp",
"bob/io/image/gif.cpp",
"bob/io/image/png.cpp",
"bob/io/image/jpeg.cpp",
"bob/io/image/bmp.cpp",
"bob/io/image/netpbm.cpp",
"bob/io/image/main.cpp",
],
packages = packages,
boost_modules = ['filesystem'],
......
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