<commit_before>defmodule Helix.Software.Model.FileType do

  use Ecto.Schema

  import Ecto.Changeset

  @type t :: %__MODULE__{
    file_type: String.t,
    extension: String.t
  }

  @creation_fields ~w/file_type extension/a

  @primary_key false
  schema "file_types" do
    field :file_type, :string,
      primary_key: true

    field :extension, :string
  end

  @spec create_changeset(%{file_type: String.t, extension: String.t}) :: Ecto.Changeset.t
  def create_changeset(params) do
    %__MODULE__{}
    |> cast(params, @creation_fields)
    |> validate_required(:file_type)
    |> unique_constraint(:file_type)
  end
end<commit_msg>Minor FileType required fields fix.<commit_after>defmodule Helix.Software.Model.FileType do

  use Ecto.Schema

  import Ecto.Changeset

  @type t :: %__MODULE__{
    file_type: String.t,
    extension: String.t
  }

  @creation_fields ~w/file_type extension/a

  @primary_key false
  schema "file_types" do
    field :file_type, :string,
      primary_key: true

    field :extension, :string
  end

  @spec create_changeset(%{file_type: String.t, extension: String.t}) :: Ecto.Changeset.t
  def create_changeset(params) do
    %__MODULE__{}
    |> cast(params, @creation_fields)
    |> validate_required(@creation_fields)
    |> unique_constraint(:file_type)
  end
end
{'fraction_non_alphanumeric': 0.10746951219512195, 'fraction_numerical': 0.0, 'mean_word_length': 3.862962962962963, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '3739271', 'n_tokens_mistral': 472, 'n_tokens_neox': 442, 'n_words': 97}