def summary(self, detailed=False):
    if detailed:
        (yield 'output_file\tdate\trule\tversion\tlog-file(s)\tinput-file(s)\tshellcmd\tstatus\tplan')
    else:
        (yield 'output_file\tdate\trule\tversion\tlog-file(s)\tstatus\tplan')
    for job in self.jobs:
        output = (job.rule.output if self.dynamic(job) else job.expanded_output)
        for f in output:
            rule = self.workflow.persistence.rule(f)
            rule = ('-' if (rule is None) else rule)
            version = self.workflow.persistence.version(f)
            version = ('-' if (version is None) else str(version))
            date = (time.ctime(f.mtime) if f.exists else '-')
            pending = ('update pending' if self.reason(job) else 'no update')
            log = self.workflow.persistence.log(f)
            log = ('-' if (log is None) else ','.join(log))
            input = self.workflow.persistence.input(f)
            input = ('-' if (input is None) else ','.join(input))
            shellcmd = self.workflow.persistence.shellcmd(f)
            shellcmd = ('-' if (shellcmd is None) else shellcmd)
            shellcmd = shellcmd.strip().replace('\n', '; ')
            status = 'ok'
            if (not f.exists):
                status = 'missing'
            elif self.reason(job).updated_input:
                status = 'updated input files'
            elif self.workflow.persistence.version_changed(job, file=f):
                status = 'version changed to {}'.format(job.rule.version)
            elif self.workflow.persistence.code_changed(job, file=f):
                status = 'rule implementation changed'
            elif self.workflow.persistence.input_changed(job, file=f):
                status = 'set of input files changed'
            elif self.workflow.persistence.params_changed(job, file=f):
                status = 'params changed'
            if detailed:
                (yield '\t'.join((f, date, rule, version, log, input, shellcmd, status, pending)))
            else:
                (yield '\t'.join((f, date, rule, version, log, status, pending)))
def summary(self, detailed=False):
    if detailed:
        (yield 'output_file\tdate\trule\tversion\tlog-file(s)\tinput-file(s)\tshellcmd\tstatus\tplan')
    else:
        (yield 'output_file\tdate\trule\tversion\tlog-file(s)\tstatus\tplan')
    for job in self.jobs:
        output = (job.rule.output if self.dynamic(job) else job.expanded_output)
        for f in output:
            rule = self.workflow.persistence.rule(f)
            rule = ('-' if (rule is None) else rule)
            version = self.workflow.persistence.version(f)
            version = ('-' if (version is None) else str(version))
            date = (time.ctime(f.mtime) if f.exists else '-')
            pending = ('update pending' if self.reason(job) else 'no update')
            log = self.workflow.persistence.log(f)
            log = ('-' if (log is None) else ','.join(log))
            input = self.workflow.persistence.input(f)
            input = ('-' if (input is None) else ','.join(input))
            shellcmd = self.workflow.persistence.shellcmd(f)
            shellcmd = ('-' if (shellcmd is None) else shellcmd)
            shellcmd = shellcmd.strip().replace('\n', '; ')
            status = 'ok'
            if (not f.exists):
                status = 'missing'
            elif self.reason(job).updated_input:
                status = 'updated input files'
            elif self.workflow.persistence.version_changed(job, file=f):
                status = 'version changed to {}'.format(job.rule.version)
            elif self.workflow.persistence.code_changed(job, file=f):
                status = 'rule implementation changed'
            elif self.workflow.persistence.input_changed(job, file=f):
                status = 'set of input files changed'
            elif self.workflow.persistence.params_changed(job, file=f):
                status = 'params changed'
            if detailed:
                (yield '\t'.join((f, date, rule, version, log, input, shellcmd, status, pending)))
            else:
                (yield '\t'.join((f, date, rule, version, log, status, pending)))