plainbox.impl.providers.special – various special providers

Warning

THIS MODULE DOES NOT HAVE STABLE PUBLIC API

exception plainbox.impl.providers.special.CheckBoxNotFound[source]

Exception used to report that CheckBox cannot be located

class plainbox.impl.providers.special.CheckBoxSrcProvider[source]

A provider for checkbox jobs when used in development mode.

This provider is only likely to be used when developing checkbox inside a virtualenv environment. It assumes the particular layout of code and data (relative to the code directory) directories.

Unlike normal v1 providers it has two legacy quirks that should not be changed before we can stop using the old checkbox codebase.

  1. The location for provider-specific executables is ‘$base/scripts’. This is implemented by custom bin_dir.
  2. The location for whitelists is ‘$base/data/whitelists’. This is implemented by custom whitelists_dir.

It also has some quirks which might be revisited and dropped:

  1. To ensure that old checkbox library codebase can be imported (whitout installing or developing checkbox) it implements extra_PYTHONPATH.
  2. It has an utility method called exists() that makes one piece of code shorter (save the time it takes to create CheckBoxSrcProvider and catch-ignore ProviderNotFound).
bin_dir[source]

Return an absolute path of the scripts directory

Note

The scripts may not work without setting PYTHONPATH and CHECKBOX_SHARE.

static exists()[source]

Check if the source provider exists and can be actually used

extra_PYTHONPATH[source]

Return additional entry for PYTHONPATH

This entry is required for CheckBox scripts to import the correct CheckBox python libraries.

whitelists_dir[source]

Return an absolute path of the whitelist directory

class plainbox.impl.providers.special.StubBoxProvider[source]

A provider for stub, dummy and otherwise non-production jobs.

The stubbox provider is useful for various kinds of testing where you don’t want to pull in a volume of data, just a bit of each kind of jobs that we need to support.

Previous topic

plainbox.impl.providers – providers package

Next topic

plainbox.impl.providers.v1 – Implementation of V1 provider

This Page