<commit_before>workflow_title = @workflow_version.title || "None"
workflow_inputs = @workflow_version.input_ports

json.run do
  json.workflow_id @run.workflow_id
  json.workflow_version @run.workflow_version
  json.name workflow_title
  json.inputs_attributes do
    json.array! workflow_inputs do |input|
      json.name input[:name]
      json.value input[:example_value]
    end
  end
end<commit_msg>In runs/new JSON: Don't publish inputs if there aren't any.<commit_after>workflow_title = @workflow_version.title || "None"
workflow_inputs = @workflow_version.input_ports

json.run do
  json.workflow_id @run.workflow_id
  json.workflow_version @run.workflow_version
  json.name workflow_title
  unless workflow_inputs.empty?
    json.inputs_attributes do
      json.array! workflow_inputs do |input|
        json.name input[:name]
        json.value input[:example_value]
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.08296460176991151, 'fraction_numerical': 0.0, 'mean_word_length': 4.2011494252873565, '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': '521049', 'n_tokens_mistral': 298, 'n_tokens_neox': 290, 'n_words': 63}