<commit_before>require 'minitest/autorun'
require_relative 'etl'

class TransformTest < MiniTest::Unit::TestCase

  def test_transform_one_value
    old = { 'hello' => ['WORLD'] }
    expected = { 'world' => 'hello' }

    assert_equal expected, ETL.transform(old)
  end

  def test_transform_more_values
    skip
    old = { 'hello' => ['WORLD', 'GSCHOOLERS'] }
    expected = { 'world' => 'hello', 'gschoolers' => 'hello' }

    assert_equal expected, ETL.transform(old)
  end

  def test_more_keys
    skip
    old = { 'a' => ['APPLE', 'ARTICHOKE'], 'b' => ['BOAT', 'BALLERINA'] }
    expected = {
      'apple' => 'a',
      'artichoke' => 'a',
      'boat' => 'b',
      'ballerina' => 'b'
    }<commit_msg>ruby etl - make data types consistent with the README<commit_after>require 'minitest/autorun'
require_relative 'etl'

class TransformTest < MiniTest::Unit::TestCase

  def test_transform_one_value
    old = { 1 => ['WORLD'] }
    expected = { 'world' => 1 }

    assert_equal expected, ETL.transform(old)
  end

  def test_transform_more_values
    skip
    old = { 1 => ['WORLD', 'GSCHOOLERS'] }
    expected = { 'world' => 1, 'gschoolers' => 1 }

    assert_equal expected, ETL.transform(old)
  end

  def test_more_keys
    skip
    old = { 1 => ['APPLE', 'ARTICHOKE'], 2 => ['BOAT', 'BALLERINA'] }
    expected = {
      'apple' => 1,
      'artichoke' => 1,
      'boat' => 2,
      'ballerina' => 2
    }
{'fraction_non_alphanumeric': 0.16385372714486637, 'fraction_numerical': 0.007735583684950774, 'mean_word_length': 3.0541310541310542, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, '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': '5754755', 'n_tokens_mistral': 538, 'n_tokens_neox': 506, 'n_words': 116}