<commit_before>defmodule FarmbotCore.Asset.FbosConfig do
  @moduledoc """
  Farmbot's configuration database
  """

  use FarmbotCore.Asset.Schema, path: "/api/fbos_config"

  schema "fbos_configs" do
    field(:id, :id)

    has_one(:local_meta, FarmbotCore.Asset.Private.LocalMeta,
      on_delete: :delete_all,
      references: :local_id,
      foreign_key: :asset_local_id
    )

    field(:arduino_debug_messages, :boolean)
    field(:auto_sync, :boolean)
    field(:beta_opt_in, :boolean)
    field(:disable_factory_reset, :boolean)
    field(:firmware_hardware, :string)
    field(:firmware_path, :string)
    field(:firmware_input_log, :boolean)
    field(:firmware_output_log, :boolean)
    field(:firmware_debug_log, :boolean)
    field(:network_not_found_timer, :integer)
    field(:os_auto_update, :boolean)
    field(:sequence_body_log, :boolean)
    field(:sequence_complete_log, :boolean)
    field(:sequence_init_log, :boolean)
    field(:monitor, :boolean, default: true)
    timestamps()
  end

  view fbos_config do
    %{
      id: fbos_config.id,
      arduino_debug_messages: fbos_config.arduino_debug_messages,
      auto_sync: fbos_config.auto_sync,
      beta_opt_in: fbos_config.beta_opt_in,
      disable_factory_reset: fbos_config.disable_factory_reset,
      firmware_hardware: fbos_config.firmware_hardware,
      firmware_path: fbos_config.firmware_path,
      firmware_input_log: fbos_config.firmware_input_log,
      firmware_output_log: fbos_config.firmware_output_log,
      firmware_debug_log: fbos_config.firmware_debug_log,
      network_not_found_timer: fbos_config.network_not_found_timer,
      os_auto_update: fbos_config.os_auto_update,
      sequence_body_log: fbos_config.sequence_body_log,
      sequence_complete_log: fbos_config.sequence_complete_log,
      sequence_init_log: fbos_config.sequence_init_log
    }<commit_msg>Update some docs and comments<commit_after>defmodule FarmbotCore.Asset.FbosConfig do
  @moduledoc """
  Farmbot's configuration database
  """

  use FarmbotCore.Asset.Schema, path: "/api/fbos_config"

  schema "fbos_configs" do
    field(:id, :id)

    has_one(:local_meta, FarmbotCore.Asset.Private.LocalMeta,
      on_delete: :delete_all,
      references: :local_id,
      foreign_key: :asset_local_id
    )

    # firmware
    field(:arduino_debug_messages, :boolean)
    field(:firmware_input_log, :boolean)
    field(:firmware_output_log, :boolean)
    field(:firmware_debug_log, :boolean)

    # No longer supported
    field(:firmware_hardware, :string)

    # stateful
    field(:firmware_path, :string)

    # auto_sync_channel
    field(:auto_sync, :boolean)

    # not used anymore
    field(:beta_opt_in, :boolean)

    # system
    field(:disable_factory_reset, :boolean)
    field(:network_not_found_timer, :integer)
    field(:os_auto_update, :boolean)

    # celeryscript
    field(:sequence_body_log, :boolean)
    field(:sequence_complete_log, :boolean)
    field(:sequence_init_log, :boolean)

    # private
    field(:monitor, :boolean, default: true)
    timestamps()
  end

  view fbos_config do
    %{
      id: fbos_config.id,
      arduino_debug_messages: fbos_config.arduino_debug_messages,
      auto_sync: fbos_config.auto_sync,
      beta_opt_in: fbos_config.beta_opt_in,
      disable_factory_reset: fbos_config.disable_factory_reset,
      firmware_hardware: fbos_config.firmware_hardware,
      firmware_path: fbos_config.firmware_path,
      firmware_input_log: fbos_config.firmware_input_log,
      firmware_output_log: fbos_config.firmware_output_log,
      firmware_debug_log: fbos_config.firmware_debug_log,
      network_not_found_timer: fbos_config.network_not_found_timer,
      os_auto_update: fbos_config.os_auto_update,
      sequence_body_log: fbos_config.sequence_body_log,
      sequence_complete_log: fbos_config.sequence_complete_log,
      sequence_init_log: fbos_config.sequence_init_log
    }
{'fraction_non_alphanumeric': 0.0888208269525268, 'fraction_numerical': 0.0, 'mean_word_length': 4.412983425414365, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7243296', 'n_tokens_mistral': 1415, 'n_tokens_neox': 1333, 'n_words': 198}