<commit_before>defmodule BaumeisterWeb.Mixfile do
  use Mix.Project

  def project do
    [app: :baumeister_web,
     version: "0.2.0-dev",
     build_path: "../../_build",
     config_path: "../../config/config.exs",
     deps_path: "../../deps",
     lockfile: "../../mix.lock",
     elixir: "~> 1.2",
     elixirc_paths: elixirc_paths(Mix.env),
     compilers: [:phoenix, :gettext] ++ Mix.compilers,
     build_embedded: Mix.env == :prod,
     start_permanent: Mix.env == :prod,
     aliases: aliases(),
     deps: deps()]
  end

  # Configuration for the OTP application.
  #
  # Type `mix help compile.app` for more information.
  def application do
    [mod: {BaumeisterWeb, []},
     extra_applications: [:logger],
    ]
  end

  # Specifies which paths to compile per environment.
  defp elixirc_paths(:test), do: ["lib", "web", "test/support"]
  defp elixirc_paths(_),     do: ["lib", "web"]

  # Specifies your project dependencies.
  #
  # Type `mix help deps` for examples and options.
  defp deps do
    [{:phoenix, "~> 1.2.1"},
     {:phoenix_pubsub, "~> 1.0"},
     {:phoenix_ecto, "~> 3.0"},
     {:ecto_mnesia, "~> 0.7.1"},
     # {:postgrex, ">= 0.0.0"},
     {:phoenix_html, "~> 2.6"},
     {:phoenix_live_reload, "~> 1.0", only: :dev},
     {:baumeister_coordinator, in_umbrella: true},
     {:gettext, "~> 0.11"},
     {:cowboy, "~> 1.0"}]
  end

  # Aliases are shortcuts or tasks specific to the current project.
  # For example, to create, migrate and run the seeds file at once:
  #
  #     $ mix ecto.setup
  #
  # See the documentation for `Mix` for more info on aliases.
  defp aliases do
    ["ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
     "ecto.reset": ["ecto.drop", "ecto.setup"],
     "ecto.create": [&ensure_dirs/1, "ecto.create"],
     "test": ["ecto.create", "ecto.migrate", "test"]]
  end

  defp ensure_dirs(_) do
    dir = "#{Application.get_env(:mnesia, :dir)}"
    all_dirs = [dir, Path.join(["..", "..", dir])]
     |> Enum.map(&Path.absname/1)
     |> Enum.each(fn dir ->
       Mix.shell.info "Ensure the existence of Mnesia Data: #{dir}"
       if (File.exists?(dir)) do
         Mix.shell.info("Mnesia Data Dir exists")
       else
         :ok = File.mkdir_p("#{dir}")
         Mix.shell.info("Mnesia Data Dir created")
       end
     end)
  end
end
<commit_msg>Even more details about mnesia during build<commit_after>defmodule BaumeisterWeb.Mixfile do
  use Mix.Project

  def project do
    [app: :baumeister_web,
     version: "0.2.0-dev",
     build_path: "../../_build",
     config_path: "../../config/config.exs",
     deps_path: "../../deps",
     lockfile: "../../mix.lock",
     elixir: "~> 1.2",
     elixirc_paths: elixirc_paths(Mix.env),
     compilers: [:phoenix, :gettext] ++ Mix.compilers,
     build_embedded: Mix.env == :prod,
     start_permanent: Mix.env == :prod,
     aliases: aliases(),
     deps: deps()]
  end

  # Configuration for the OTP application.
  #
  # Type `mix help compile.app` for more information.
  def application do
    [mod: {BaumeisterWeb, []},
     extra_applications: [:logger],
    ]
  end

  # Specifies which paths to compile per environment.
  defp elixirc_paths(:test), do: ["lib", "web", "test/support"]
  defp elixirc_paths(_),     do: ["lib", "web"]

  # Specifies your project dependencies.
  #
  # Type `mix help deps` for examples and options.
  defp deps do
    [{:phoenix, "~> 1.2.1"},
     {:phoenix_pubsub, "~> 1.0"},
     {:phoenix_ecto, "~> 3.0"},
     {:ecto_mnesia, "~> 0.7.1"},
     # {:postgrex, ">= 0.0.0"},
     {:phoenix_html, "~> 2.6"},
     {:phoenix_live_reload, "~> 1.0", only: :dev},
     {:baumeister_coordinator, in_umbrella: true},
     {:gettext, "~> 0.11"},
     {:cowboy, "~> 1.0"}]
  end

  # Aliases are shortcuts or tasks specific to the current project.
  # For example, to create, migrate and run the seeds file at once:
  #
  #     $ mix ecto.setup
  #
  # See the documentation for `Mix` for more info on aliases.
  defp aliases do
    ["ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
     "ecto.reset": ["ecto.drop", "ecto.setup"],
     "ecto.create": [&ensure_dirs/1, "ecto.create"],
     "test": ["ecto.create", "ecto.migrate", "test"]]
  end

  defp ensure_dirs(_) do
    Mix.shell.info "mnesia default type is: #{inspect Application.get_env(:ecto_mnesia, :storage_type)}"
    dir = "#{Application.get_env(:mnesia, :dir)}"
    all_dirs = [dir, Path.join(["..", "..", dir])]
     |> Enum.map(&Path.absname/1)
     |> Enum.each(fn dir ->
       Mix.shell.info "Ensure the existence of Mnesia Data: #{dir}"
       if (File.exists?(dir)) do
         Mix.shell.info("Mnesia Data Dir exists")
       else
         :ok = File.mkdir_p("#{dir}")
         Mix.shell.info("Mnesia Data Dir created")
       end
     end)
  end
end

{'fraction_non_alphanumeric': 0.17977994602449657, 'fraction_numerical': 0.012040689225659124, 'mean_word_length': 2.781789638932496, 'pattern_counts': {'":': 8, '<': 3, '<?xml version=': 0, '>': 29, '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': '5419655', 'n_tokens_mistral': 1850, 'n_tokens_neox': 1801, 'n_words': 430}