<commit_before>package org.deepdive.test.integration

import anorm._ 
import com.typesafe.config._
import org.deepdive.test._
import org.deepdive.Context
import org.deepdive._
import org.deepdive.datastore.{PostgresDataStore, JdbcDataStore}
import org.scalatest._
import scalikejdbc.ConnectionPool

class BiasedCoin extends FunSpec {

  def prepareData() {
    JdbcDataStore.init(ConfigFactory.load)
    PostgresDataStore.withConnection { implicit conn =>
      SQL("drop schema if exists public cascade; create schema public;").execute()
      SQL("""create table coin(is_correct boolean, id bigint);""").execute()
      SQL("""insert into coin(is_correct) values 
        (true), (true), (true), (true),
        (true), (true), (true), (true),
        (false),  
        (NULL), (NULL), (NULL), (NULL),
        (NULL), (NULL), (NULL), (NULL),
        (NULL);""").execute()
    }
    // JdbcDataStore.close()
  }

  def getConfig = {
    s"""
      deepdive.schema.variables {
        coin.is_correct: Boolean<commit_msg>close jdbc in biased coin test<commit_after>package org.deepdive.test.integration

import anorm._ 
import com.typesafe.config._
import org.deepdive.test._
import org.deepdive.Context
import org.deepdive._
import org.deepdive.datastore.{PostgresDataStore, JdbcDataStore}
import org.scalatest._
import scalikejdbc.ConnectionPool

class BiasedCoin extends FunSpec {

  def prepareData() {
    JdbcDataStore.init(ConfigFactory.load)
    PostgresDataStore.withConnection { implicit conn =>
      SQL("drop schema if exists public cascade; create schema public;").execute()
      SQL("""create table coin(is_correct boolean, id bigint);""").execute()
      SQL("""insert into coin(is_correct) values 
        (true), (true), (true), (true),
        (true), (true), (true), (true),
        (false),  
        (NULL), (NULL), (NULL), (NULL),
        (NULL), (NULL), (NULL), (NULL),
        (NULL);""").execute()
    }
    JdbcDataStore.close()
  }

  def getConfig = {
    s"""
      deepdive.schema.variables {
        coin.is_correct: Boolean
{'fraction_non_alphanumeric': 0.14091350826044705, 'fraction_numerical': 0.0, 'mean_word_length': 3.485838779956427, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3738093', 'n_tokens_mistral': 655, 'n_tokens_neox': 637, 'n_words': 150}