<commit_before>require "formula"

class Boccatools < Formula
  version "0.1"
  homepage "https://csdms.colorado.edu"
  url "https://csdms.colorado.edu/svn/bocca_tools/trunk",
    :using => UnsafeSubversionDownloadStrategy
  sha1 ""

  option "with-python=", "Path to a python binary" if OS.linux?

  depends_on :python unless OS.linux?
  depends_on "bocca"

  def install
    ENV.prepend_path 'PATH', File.dirname(which_babel_python)

    ENV.prepend_create_path "PYTHONPATH", prefix + "lib/#{python_version}/site-packages"

    system "python", "setup.py", "install", "--prefix=#{prefix}",
      "--single-version-externally-managed", "--record=installed.txt"
  end

  test do<commit_msg>Updated to use link to github repository.<commit_after>require "formula"

class Boccatools < Formula
  version "0.1"
  homepage "https://csdms.colorado.edu"
  url "https://github.com/csdms/bocca-tools", :using => :git
  sha1 ""

  option "with-python=", "Path to a python binary" if OS.linux?

  depends_on :python unless OS.linux?
  depends_on "bocca"

  def install
    ENV.prepend_path 'PATH', File.dirname(which_babel_python)

    ENV.prepend_create_path "PYTHONPATH", prefix + "lib/#{python_version}/site-packages"

    system "python", "setup.py", "install", "--prefix=#{prefix}",
      "--single-version-externally-managed", "--record=installed.txt"
  end

  test do
{'fraction_non_alphanumeric': 0.1461086637298091, 'fraction_numerical': 0.004405286343612335, 'mean_word_length': 4.104868913857678, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3654753', 'n_tokens_mistral': 483, 'n_tokens_neox': 461, 'n_words': 101}