<commit_before>#include "gtest/gtest.h"
#include "c7a/api/dia_base.hpp"
#include "c7a/engine/stage_builder.hpp"
#include "c7a/api/dia.hpp"
#include "c7a/api/context.hpp"

using namespace c7a::engine;

TEST(DISABLED_Stage, GetStagesFromBuilder) {
}<commit_msg>fix stage build test as soon as typeid is gone<commit_after>#include "gtest/gtest.h"
#include "c7a/api/dia_base.hpp"
#include "c7a/engine/stage_builder.hpp"
#include "c7a/api/dia.hpp"
#include "c7a/api/context.hpp"

using namespace c7a::engine;

TEST(Stage, GetStagesFromBuilder) {
    using c7a::DIA;
    using c7a::Context;

    auto doubles = Context().ReadFromFileSystem("tests/inputs/test1", [](std::string line) {
            return std::stod(line);
        });

    auto key_ex = [](double in) { return (int) in; };
    auto red_fn = [](double in1, double in2) { return in1 + in2; };
    auto map_fn = [](double input) {
            std::cout << "Map" << std::endl;
            return input;
        };
    auto fmap_fn = [](double input, std::function<void(double)> emit_func) {
            std::cout << "FlatMap" << std::endl;
            emit_func(input);
            emit_func(input);
        };

    auto duplicates = doubles.Map(map_fn);
    auto duplicates2 = duplicates.Map(map_fn);
    auto red_duplicates = duplicates2.Reduce(key_ex, red_fn);

    auto duplicates3 = red_duplicates.Map(map_fn);
    auto red_duplicates2 = duplicates3.Reduce(key_ex, red_fn);

    auto stages = FindStages(duplicates3.get_node());
    for (auto it = stages.first; it != stages.second; ++it) {
        it->Run();
    }
}
{'fraction_non_alphanumeric': 0.15028535193405199, 'fraction_numerical': 0.014584654407102092, 'mean_word_length': 3.3833333333333333, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 5, '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': '2959507', 'n_tokens_mistral': 586, 'n_tokens_neox': 562, 'n_words': 114}