Shared Functions

The central computation team and the scientific computing team at IHME maintain several packages that Cascade-AT relies on. These are not open source, so we can’t use them in Travis CI, or in building the docs. In order to get around this, there is a class that wraps a module and will only use it if its importable.

class cascade_at.core.db.ModuleProxy(module_name)[source]

This class acts like a module. It’s meant to be imported into an init. This exists in order to actively turn off modules during testing. Ensure tests that claim not to use database functions really don’t use them, so that their tests also pass outside IHME.

Examples

>>> # db-queries and db-tools are IHME internal packages
>>>
>>> db_queries = ModuleProxy("db_queries")
>>> ezfuncs = ModuleProxy("db_tools.ezfuncs")
__init__(module_name)[source]

Initialize self. See help(type(self)) for accurate signature.

__dir__()[source]

Default dir() implementation.