Module Expr Str Import alias ImportFrom alias ImportFrom alias Import alias Import alias Import alias TryExcept body Import alias identifier handlers ExceptHandler type NameLoad body Import alias Import alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Str ListLoad body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr BinOpAdd NameLoad ListLoad NameLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr BinOpMod Str Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad Expr Call AttributeLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Str attr ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str body If CompareNotIn NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str NameLoad If CompareIs NameLoad NameLoad body Print BinOpMod Str AttributeLoad NameLoad attr orelse If NameLoad body Assign NameStore NameLoad Print BinOpMod Str AttributeLoad NameLoad attr orelse If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore NameLoad Print BinOpMod Str AttributeLoad NameLoad attr If NameLoad body If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr orelse Assign NameStore Dict Expr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Print BinOpMod Str AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr If CompareIs SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad body Expr Call AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A 
This module contains the :class:`Analysis` class, which is used for creating
optimized, repeatable data processing workflows. An analysis can be created
from a function or any other callable object. Dependent analyses can then be
created using the :meth:`Analysis.then` method. Each function must accept a
``data`` argument, which is a :class:`dict` of data to be persisted between
analyses. Modifications made to ``data`` in the scope of one analysis will be
propagated to all dependent analyses.
 N/A bz2 copy deepcopy glob glob N/A hashlib N/A inspect N/A os N/A N/A N/A cPickle pickle N/A N/A N/A ImportError N/A N/A pickle N/A six Cache N/A object N/A N/A 
    Utility class for managing cached data.
     __init__ N/A N/A self cache_path N/A N/A N/A N/A self _cache_path cache_path N/A N/A self _data None N/A check N/A N/A self N/A N/A N/A 
        Cache if a cache file exists.
         N/A N/A N/A N/A os path exists N/A self _cache_path N/A get N/A N/A self N/A N/A N/A 
        Get cached data from memory or disk.
         N/A N/A N/A self _data None N/A N/A f N/A N/A bz2 BZ2File N/A self _cache_path N/A N/A self _data N/A N/A pickle loads N/A N/A f read N/A N/A N/A f close N/A N/A deepcopy N/A self _data N/A set N/A N/A self data N/A N/A N/A 
        Set cached data and write to disk.
         N/A N/A self _data data N/A f N/A N/A bz2 BZ2File N/A self _cache_path w N/A N/A N/A f write N/A N/A pickle dumps N/A self _data N/A N/A N/A f close N/A N/A never_cache N/A N/A func N/A N/A N/A 
    Decorator to flag that a given analysis function should never be cached.
     N/A N/A func never_cache True N/A func N/A Analysis N/A object N/A N/A 
    An Analysis is a function whose source code fingerprint and output can be
    serialized to disk. When it is invoked again, if it's code has not changed
    the serialized output will be used rather than executing the code again.

    Implements a callback-like API so that Analyses can depend on one another.
    If a parent analysis changes then it and all it's children will be
    refreshed.

    :param func: A callable that implements the analysis. Must accept a `data`
        argument that is the state inherited from its ancestors analysis.
    :param cache_dir: Where to stored the cache files for this analysis.
    :param _trace: The ancestors this analysis, if any. For internal use
        only.
     __init__ N/A N/A self func cache_dir _trace N/A .proof N/A N/A N/A N/A self _name N/A func __name__ N/A N/A self _func func N/A N/A self _cache_dir cache_dir N/A N/A self _trace N/A _trace N/A self N/A N/A self _child_analyses N/A N/A N/A self _cache_path N/A N/A N/A os path join N/A self _cache_dir N/A %s.cache N/A N/A self _fingerprint N/A N/A self _cache N/A Cache N/A self _cache_path N/A N/A self _registered_cache_paths N/A N/A N/A N/A N/A N/A N/A self _trace N/A 0 _registered_cache_paths append N/A self _cache_path N/A _fingerprint N/A N/A self N/A N/A N/A 
        Generate a fingerprint for this analysis function.
         N/A hasher N/A N/A hashlib md5 N/A history N/A N/A join N/A N/A analysis _name N/A analysis N/A self _trace N/A N/A six PY3 N/A N/A history N/A N/A history encode utf-8 N/A N/A N/A hasher update history N/A source N/A N/A inspect getsource N/A self _func N/A N/A six PY3 N/A N/A source N/A N/A source encode utf-8 N/A N/A N/A hasher update source N/A N/A N/A hasher hexdigest N/A _cleanup_cache_files N/A N/A self N/A N/A N/A 
        Deletes any cache files that exist in the cache directory which were
        not used when this analysis was last run.
         N/A path N/A glob N/A N/A N/A os path join N/A self _cache_dir *.cache N/A N/A N/A path N/A self _registered_cache_paths N/A N/A N/A N/A os remove path N/A then N/A N/A self child_func N/A N/A N/A 
        Create a new analysis which will run after this one has completed with
        access to the data it generated.

        :param func: A callable that implements the analysis. Must accept a
            `data` argument that is the state inherited from its ancestors
            analysis.
         N/A analysis N/A Analysis child_func cache_dir N/A self _cache_dir _trace N/A self _trace N/A N/A N/A N/A self _child_analyses append analysis N/A analysis N/A run N/A N/A self refresh _parent_cache N/A False None N/A N/A 
        Execute this analysis and its descendents. There are four possible
        execution scenarios:

        1. This analysis has never been run. Run it and cache the results.
        2. This analysis is the child of a parent analysis which was run, so it
           must be run because its inputs may have changed. Cache the result.
        3. This analysis has been run, its parents were loaded from cache and
           its fingerprints match. Load the cached result.
        4. This analysis has been run and its parents were loaded from cache,
           but its fingerprints do not match. Run it and cache updated results.

        On each run this analysis will clear any unused cache files from the
        cache directory. If you have multiple analyses running in the same
        location, specify separate cache directories for them using the
        ``cache_dir`` argument to the the :class:`Analysis` constructor.

        :param refresh: Flag indicating if this analysis must refresh because
            one of its ancestors did.
        :parent _parent_cache: Data cache for the parent analysis. For internal
            usage only.
         N/A N/A N/A N/A N/A os path exists N/A self _cache_dir N/A N/A N/A N/A os makedirs N/A self _cache_dir N/A do_not_cache N/A getattr N/A self _func never_cache False N/A N/A refresh True N/A N/A N/A Refreshing: %s N/A self _name N/A N/A do_not_cache N/A N/A refresh True N/A N/A Never cached: %s N/A self _name N/A N/A N/A N/A N/A N/A self _cache check N/A N/A refresh True N/A N/A Stale cache: %s N/A self _name N/A refresh N/A N/A _parent_cache N/A N/A local_data N/A N/A _parent_cache get N/A N/A local_data N/A N/A N/A N/A self _func local_data N/A N/A do_not_cache N/A N/A N/A N/A N/A self _cache set local_data N/A N/A N/A Deferring to cache: %s N/A self _name N/A analysis N/A self _child_analyses N/A N/A N/A N/A analysis run refresh refresh _parent_cache N/A self _cache N/A N/A N/A N/A self _trace N/A 0 self N/A N/A N/A N/A self _cleanup_cache_files N/A N/A