def compile()

in src/composer/composer.py [0:0]


    def compile(self):
        '''  compile composition. Returns a dictionary '''
        actions = []

        def flatten(composition, _=None):
            composition = visit(composition, flatten)

            if composition.type == 'action' and hasattr(composition, 'action'): # pylint: disable=E1101
                actions.append({ 'name': composition.name, 'action': composition.action })
                del composition.action # pylint: disable=E1101
            return composition

        obj = { 'composition': label(flatten(self)).lower(), 'ast': self, 'version': __version__ }
        if len(actions) > 0:
            obj['actions'] = actions
        return obj