Skip to content

bob.db.base depends on bob.io.image without declaring that in the requirements.txt

When creating a database from scratch using bob_db_manage.py, I have the problem that bob.io.image is required, but it is not declared in the requirements.txt.

The reason is as follows:

  1. While test cases are usually not part of the package, setup.py https://gitlab.idiap.ch/bob/bob.db.base/blob/15998f2dab6de6da677125c3eb19c42d61172c52/setup.py#L38 links the test database.
  2. While bob_db_manage.py parses all databases, it tries to import the test database.
  3. The test database requires bob.io.image to be present: https://gitlab.idiap.ch/bob/bob.db.base/blob/15998f2dab6de6da677125c3eb19c42d61172c52/bob/db/base/tests/sample/models.py#L14
  • Quick fix: move the import bob.io.image into the function, where it is actually required.
  • Real fix (includes the quick fix): add bob.io.image to the test requirements