<commit_before># A subsystem within an asset, more granular/smaller than Equipment
# e.g. transmission or engine on a vehicle or windows in a facility
class Subsystem < ActiveRecord::Base
  belongs_to :asset_type

  scope :for_type, ->(type_id) { where(asset_type_id: [type_id, nil]) } # NOTE: can handle id or coerce down an AssetType itself

  def to_s
    name
  end
end<commit_msg>Subsystems need a name<commit_after># A subsystem within an asset, more granular/smaller than Equipment
# e.g. transmission or engine on a vehicle or windows in a facility
class Subsystem < ActiveRecord::Base
  belongs_to :asset_type

  scope :for_type, ->(type_id) { where(asset_type_id: [type_id, nil]) } # NOTE: can handle id or coerce down an AssetType itself

  validates :name, :presence => true

  def to_s
    name
  end
end
{'fraction_non_alphanumeric': 0.07711138310893513, 'fraction_numerical': 0.0, 'mean_word_length': 4.381578947368421, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '5288698', 'n_tokens_mistral': 263, 'n_tokens_neox': 250, 'n_words': 102}