eskapade package

Subpackages

Submodules

eskapade.entry_points module

Project: Eskapade - A python-based package for data analysis.

Created: 2017-08-08

Description:
Collection of eskapade entry points
Authors:
KPMG Advanced Analytics & Big Data team, Amstelveen, The Netherlands

Redistribution and use in source and binary forms, with or without modification, are permitted according to the terms listed in the file LICENSE.

eskapade.entry_points.eskapade_bootstrap()

Generate Eskapade project structure.

Generate Eskapade link.

By default does not create init file.

eskapade.entry_points.eskapade_generate_macro()

Generate Eskapade macro.

eskapade.entry_points.eskapade_generate_notebook()

Generate Eskapade notebook.

eskapade.entry_points.eskapade_ignite()

Log info message.

eskapade.entry_points.eskapade_run()

Run Eskapade.

Top-level entry point for an Eskapade run started from the command line. Arguments specified by the user are parsed and converted to settings in the configuration object. Optionally, an interactive Python session is started when the run is finished.

eskapade.entry_points.eskapade_trial()

Run Eskapade tests.

We will keep this here until we’ve completed switch to pytest or nose and tox. We could also keep it, but I don’t like the fact that packages etc. are hard coded. Gotta come up with a better solution.

eskapade.exceptions module

Project: Eskapade - A python-based package for data analysis.

Created: 2017/03/31

Description:
Eskapade exceptions
Authors:
KPMG Advanced Analytics & Big Data team, Amstelveen, The Netherlands

Redistribution and use in source and binary forms, with or without modification, are permitted according to the terms listed in the file LICENSE.

exception eskapade.exceptions.MissingPackageError(message='', required_by='')

Bases: Exception

Exception raised if third-party package is missing.

__init__(message='', required_by='')

Set missing-package arguments.

Parameters:
  • message (str) – message to show when raised
  • required_by (str) – info on component that requires the package

eskapade.helpers module

Project: Eskapade - A python-based package for data analysis.

Module: helpers

Created: 2017/05/17

Description:
Helper functions for Eskapade
Authors:
KPMG Advanced Analytics & Big Data team, Amstelveen, The Netherlands

Redistribution and use in source and binary forms, with or without modification, are permitted according to the terms listed in the file LICENSE.

eskapade.helpers.apply_transform_funcs(obj, trans_funcs, func_args=None, func_kwargs=None)

Transform object by applying transformation functions.

Transformation functions are applied sequentially to the output of the previous function, starting with the specified object. The final resulting object is returned.

Functions are specified with the “trans_funcs” argument. This is an iterable of either the functions themselves or (function, positional arguments, keyword arguments) combinations. The function arguments can also be specified by the “func_args” and “func_kwargs” arguments. The functions are called with the object to be transformed as a first argument, followed by the specified positional and keyword arguments.

A specified function can be either a callable object or a string. The latter is interpreted as a method of the type of the object on which the function is applied.

Parameters:
  • obj – object to transform
  • trans_funcs (iterable) – functions to apply, specified the function or a (function, args, kwargs) tuple
  • func_args (dict) – function positional arguments, specified as (function, arguments tuple) pairs
  • func_kwargs (dict) – function keyword arguments, specified as (function, kwargs dict) pairs
Returns:

transformed object

eskapade.helpers.obj_repr(obj)

Get generic string representation of object.

eskapade.helpers.process_transform_funcs(trans_funcs, func_args=None, func_kwargs=None)

Process input of the apply_transform_funcs function.

Parameters:
  • trans_funcs (iterable) – functions to apply, specified the function or a (function, args, kwargs) tuple
  • func_args (dict) – function positional arguments, specified as (function, arguments tuple) pairs
  • func_kwargs (dict) – function keyword arguments, specified as (function, kwargs dict) pairs
Returns:

transformation functions for apply_transform_funcs function

Return type:

list

eskapade.resources module

Project: Eskapade - A python-based package for data analysis.

Created: 2017/08/23

Description:
Collection of helper functions to get fixtures, i.e. test data, ROOT/RooFit libs, and tutorials. These are mostly used by the (integration) tests.
Authors:
KPMG Advanced Analytics & Big Data team, Amstelveen, The Netherlands

Redistribution and use in source and binary forms, with or without modification, are permitted according to the terms listed in the file LICENSE.

eskapade.resources.config(name: str) → str

Return the absolute path of a config.

Parameters:name (str) – The name of the config.
Returns:The absolute path of the config.
Raises:FileNotFoundError – If the config cannot be found.
eskapade.resources.fixture(name: str) → str

Return the full path filename of a fixture data set.

Parameters:name (str) – The name of the fixture.
Returns:The full path filename of the fixture data set.
Return type:str
Raises:FileNotFoundError – If the fixture cannot be found.
eskapade.resources.lib(name: str) → str

Return the full path filename of a library.

Parameters:name (str) – The name of the library.
Returns:The full path filename of the library.
Return type:str
Raises:FileNotFoundError – If the library cannot be found.
eskapade.resources.template(name: str) → str

Return the full path filename of a tutorial.

Parameters:name (str) – The name of the template.
Returns:The full path filename of the tutorial.
Return type:str
Raises:FileNotFoundError – If the template cannot be found.
eskapade.resources.tutorial(name: str) → str

Return the full path filename of a tutorial.

Parameters:name (str) – The name of the tutorial.
Returns:The full path filename of the tutorial.
Return type:str
Raises:FileNotFoundError – If the tutorial cannot be found.

eskapade.utils module

Project: Eskapade - A python-based package for data analysis.

Created: 2016/11/08

Description:
Utility functions to collect Eskapade python modules e.g. functions to get correct Eskapade file paths and env variables
Authors:
KPMG Advanced Analytics & Big Data team, Amstelveen, The Netherlands

Redistribution and use in source and binary forms, with or without modification, are permitted according to the terms listed in the file LICENSE.

eskapade.utils.collect_python_modules()

Collect Eskapade Python modules.

eskapade.utils.get_env_var(key)

Retrieve Eskapade-specific environment variables.

Parameters:key (str) – Eskapade-specific key to variable
Returns:environment variable value
Return type:str
eskapade.utils.set_matplotlib_backend(backend=None, batch=None, silent=True)

Set Matplotlib backend.

Parameters:
  • backend (str) – backend to set
  • batch (bool) – require backend to be non-interactive
  • silent (bool) – do not raise exception if backend cannot be set
Raises:

RuntimeError

eskapade.version module

THIS FILE IS AUTO-GENERATED BY ESKAPADE SETUP.PY.

Module contents