<commit_before>apiClient = require 'panoptes-client/lib/api-client'

# This is just a blank image for testing drawing tools while offline.
BLANK_IMAGE = ['data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgAQMAAAA',
  'PH06nAAAABlBMVEXMzMyWlpYU2uzLAAAAPUlEQVR4nO3BAQ0AAADCoPdPbQ43oAAAAAAAAAAAAA',
  'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgzwCX4AAB9Dl2RwAAAABJRU5ErkJggg=='].join ''

MISC_DRAWING_DETAILS = [{
  type: 'single'
  question: 'Cool?'
  answers: [
    {label: 'Yeah'}
    {label: 'Nah'}
  ]
}, {
  type: 'multiple'
  question: 'Cool stuff?'
  answers: [
    {label: 'Ice'}
    {label: 'Snow'}
  ]
}, {
  type: 'text'
  instruction: 'Any additional comments?'
}]

workflow = apiClient.type('workflows').create
  id: 'MOCK_WORKFLOW_FOR_CLASSIFIER'

  configuration:
    enable_subject_flags: true
    multi_image_mode: 'flipbook_and_separate'
    multi_image_layout: 'grid3'

  first_task: 'init'

  tasks:
    init:
      type: 'single'
      question: 'Where shall we start?'
      help: 'You don’t need help with this.'
      answers: [
        {label: 'Everything all at once! :skull:', next: 'combo'}
        {label: 'Crop the image', next: 'crop'}
        {label: 'Enter some text', next: 'write'}
        {label: 'Single-answer question', next: 'ask'}
        {label: 'Multi-answer question', next: 'features'}
        {label: 'Draw stuff', next: 'draw'}
        {label: 'Survey the image', next: 'survey'}
        {label: 'Maybe select something', next: 'dropdown'}
        {label: 'We’re done here.', next: null}
      ]

    combo:
      type: 'combo'
      loosen_requirements: true
      tasks: [
        'crop'
        'write'
        'ask'
        'features'
        'draw'
        'survey'
      ]
      next: 'init'

    crop:
      type: 'crop'
      instruction: 'Drag out a box around the smaller rhino.'
      help: 'That’s the adorable one.'
      next: 'write'

    write:
      type: 'text'
      required: true
      instruction: 'What’s the name of this animal? Is it a rhino?'
      help: '''
        **Example**: If you see a bee, then type "Bee"
      '''
      next: 'ask'

    ask:
      type: 'single'
      question: 'Rhino starts with...'
      answers: [
        {label: 'Are', next: 'features'}
        {label: 'Aitch', next: 'features'}
        {label: 'Eye', next: 'features'}
        {label: 'En', next: 'features'}
        {label: 'Oh', next: 'features'}
      ]

    features:
      type: 'multiple'
      question: 'What **cool** features are present? The first two?'
      answers: [
        {label: 'Cold water'}
        {label: 'Snow'}
        {label: 'Ice'}
        {label: 'Sunglasses'}
      ]
      next: 'draw'

    draw:
      type: 'drawing'
      required: true
      instruction: 'Drop a point on the rhino eyeball.'
      help: '''
        Do this:
        * Pick a tool
        * Draw something
      '''
      tools: [
        {type: 'point', label: 'Point', color: 'red', min: 1, max: 2}
        {type: 'line', label: 'Line', color: 'yellow', min: 0}
        {type: 'rectangle', label: 'Rectangle', color: 'lime', max: 2}<commit_msg>Add Small Point and Image Invert to Dev Classifier<commit_after>apiClient = require 'panoptes-client/lib/api-client'

# This is just a blank image for testing drawing tools while offline.
BLANK_IMAGE = ['data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgAQMAAAA',
  'PH06nAAAABlBMVEXMzMyWlpYU2uzLAAAAPUlEQVR4nO3BAQ0AAADCoPdPbQ43oAAAAAAAAAAAAA',
  'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgzwCX4AAB9Dl2RwAAAABJRU5ErkJggg=='].join ''

MISC_DRAWING_DETAILS = [{
  type: 'single'
  question: 'Cool?'
  answers: [
    {label: 'Yeah'}
    {label: 'Nah'}
  ]
}, {
  type: 'multiple'
  question: 'Cool stuff?'
  answers: [
    {label: 'Ice'}
    {label: 'Snow'}
  ]
}, {
  type: 'text'
  instruction: 'Any additional comments?'
}]

workflow = apiClient.type('workflows').create
  id: 'MOCK_WORKFLOW_FOR_CLASSIFIER'

  configuration:
    enable_subject_flags: true
    multi_image_mode: 'flipbook_and_separate'
    multi_image_layout: 'grid3'
    invert_subject: true

  first_task: 'init'

  tasks:
    init:
      type: 'single'
      question: 'Where shall we start?'
      help: 'You don’t need help with this.'
      answers: [
        {label: 'Everything all at once! :skull:', next: 'combo'}
        {label: 'Crop the image', next: 'crop'}
        {label: 'Enter some text', next: 'write'}
        {label: 'Single-answer question', next: 'ask'}
        {label: 'Multi-answer question', next: 'features'}
        {label: 'Draw stuff', next: 'draw'}
        {label: 'Survey the image', next: 'survey'}
        {label: 'Maybe select something', next: 'dropdown'}
        {label: 'We’re done here.', next: null}
      ]

    combo:
      type: 'combo'
      loosen_requirements: true
      tasks: [
        'crop'
        'write'
        'ask'
        'features'
        'draw'
        'survey'
      ]
      next: 'init'

    crop:
      type: 'crop'
      instruction: 'Drag out a box around the smaller rhino.'
      help: 'That’s the adorable one.'
      next: 'write'

    write:
      type: 'text'
      required: true
      instruction: 'What’s the name of this animal? Is it a rhino?'
      help: '''
        **Example**: If you see a bee, then type "Bee"
      '''
      next: 'ask'

    ask:
      type: 'single'
      question: 'Rhino starts with...'
      answers: [
        {label: 'Are', next: 'features'}
        {label: 'Aitch', next: 'features'}
        {label: 'Eye', next: 'features'}
        {label: 'En', next: 'features'}
        {label: 'Oh', next: 'features'}
      ]

    features:
      type: 'multiple'
      question: 'What **cool** features are present? The first two?'
      answers: [
        {label: 'Cold water'}
        {label: 'Snow'}
        {label: 'Ice'}
        {label: 'Sunglasses'}
      ]
      next: 'draw'

    draw:
      type: 'drawing'
      required: true
      instruction: 'Drop a point on the rhino eyeball.'
      help: '''
        Do this:
        * Pick a tool
        * Draw something
      '''
      tools: [
        {type: 'point', label: 'Point', color: 'red', min: 1, max: 2}
        {type: 'point', label: 'Small Point', color: 'coral', size: 'small'}
        {type: 'line', label: 'Line', color: 'yellow', min: 0}
        {type: 'rectangle', label: 'Rectangle', color: 'lime', max: 2}
{'fraction_non_alphanumeric': 0.14382589496924775, 'fraction_numerical': 0.006308153288124901, 'mean_word_length': 2.476973684210526, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, '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': '2753438', 'n_tokens_mistral': 2234, 'n_tokens_neox': 2138, 'n_words': 596}