<commit_before>#!/usr/bin/python
import sys, os, errno, stat
import vars, state, builder, jwack
from helpers import debug, debug2, err, unlink


def dirty_deps(f, depth, max_changed):
    if vars.DEBUG >= 1: debug('%s?%s\n' % (depth, f.name))

    if f.failed_runid:
        debug('%s-- DIRTY (failed last time)\n' % depth)
        return True
    if f.changed_runid == None:
        debug('%s-- DIRTY (never built)\n' % depth)
        return True
    if f.changed_runid > max_changed:
        debug('%s-- DIRTY (built)\n' % depth)
        return True  # has been built more recently than parent
    if f.is_checked():
        if vars.DEBUG >= 1: debug('%s-- CLEAN (checked)\n' % depth)<commit_msg>redo-ifchange: fix relative pathnames printed in debug messages.<commit_after>#!/usr/bin/python
import sys, os, errno, stat
import vars, state, builder, jwack
from helpers import debug, debug2, err, unlink

def _nice(t):
    return state.relpath(os.path.join(vars.BASE, t), vars.STARTDIR)

def dirty_deps(f, depth, max_changed):
    if vars.DEBUG >= 1:
        debug('%s?%s\n' % (depth, _nice(f.name)))

    if f.failed_runid:
        debug('%s-- DIRTY (failed last time)\n' % depth)
        return True
    if f.changed_runid == None:
        debug('%s-- DIRTY (never built)\n' % depth)
        return True
    if f.changed_runid > max_changed:
        debug('%s-- DIRTY (built)\n' % depth)
        return True  # has been built more recently than parent
    if f.is_checked():
        if vars.DEBUG >= 1: debug('%s-- CLEAN (checked)\n' % depth)
{'fraction_non_alphanumeric': 0.14313471502590674, 'fraction_numerical': 0.0038860103626943004, 'mean_word_length': 2.833746898263027, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5348344', 'n_tokens_mistral': 541, 'n_tokens_neox': 528, 'n_words': 158}