@staticmethod
    def actor_signature(desc):
        if 'is_primitive' not in desc or desc['is_primitive']:
            signature = {u'actor_type': unicode(desc['actor_type']),
                         u'inports': sorted([unicode(i) for i in desc['inports']]),
                         u'outports': sorted([unicode(i) for i in desc['outports']])}
        else:
            signature = {u'actor_type': unicode(desc['actor_type']),
                         u'inports': sorted([unicode(i) for i in desc['component']['inports']]),
                         u'outports': sorted([unicode(i) for i in desc['component']['outports']])}
        return hashlib.sha256(json.dumps(signature, separators=(',', ':'), sort_keys=True)).hexdigest()
Takes actor/component description and
dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/actorstore/store.py/GlobalStore.actor_signature