<commit_before>
module Flor

  class Execution < FlorModel

    def nodes; data['nodes']; end
    def zero_node; nodes['0']; end

    def tags

      data['nodes'].values.inject([]) do |a, n|
        if ts = n['tags']; a.concat(ts); end
        a
      end
    end

    def failed?

      !! nodes.values
        .find { |n| n['failure'] && n['status'] != 'triggered-on-error' }
    end

    def failed_nodes

      nodes.values
        .select { |n| n['failure'] && n['status'] != 'triggered-on-error' }
    end

    def full_tree

      tree = nodes['0']['tree']

      nodes.each do |nid, n|
        next if nid == '0'
        t = n['tree']; next unless t
# TODO
      end

      tree
    end

    def zero_variables
<commit_msg>Remove orphaned todo in execution.rb<commit_after>
module Flor

  class Execution < FlorModel

    def nodes; data['nodes']; end
    def zero_node; nodes['0']; end

    def tags

      data['nodes'].values.inject([]) do |a, n|
        if ts = n['tags']; a.concat(ts); end
        a
      end
    end

    def failed?

      !! nodes.values
        .find { |n| n['failure'] && n['status'] != 'triggered-on-error' }
    end

    def failed_nodes

      nodes.values
        .select { |n| n['failure'] && n['status'] != 'triggered-on-error' }
    end

    def full_tree

      tree = nodes['0']['tree']

      nodes.each do |nid, n|
        next if nid == '0'
        t = n['tree']; next unless t
      end

      tree
    end

    def zero_variables

{'fraction_non_alphanumeric': 0.14864864864864866, 'fraction_numerical': 0.004054054054054054, 'mean_word_length': 1.9268774703557312, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '3497501', 'n_tokens_mistral': 506, 'n_tokens_neox': 478, 'n_words': 141}