<commit_before>/**
@see https://github.com/lightsofapollo/object-factory
@tutorial task_factories
@module taskcluster-client/factory/task
*/
var Factory = require('object-factory');
var Tags = new Factory();

var Payload = new Factory({
  onbuild: function(object) {
    object.command = object.command || ['/bin/bash -c', 'ls -lah'];
    object.env = object.env || {};
    object.features = object.features || {};
  },

  properties: {
    image: 'ubuntu',
    maxRunTime: 600,
    // onbuild above handles this
    // command: []
  }
});

var Metadata = new Factory({
  properties: {
    name: '',
    description: '',
    owner: '',
    source: 'http://localhost'
  }
});

var Task = new Factory({
  onbuild: function(object) {
    object.created = object.created || new Date();

    var defaultDeadline = new Date(object.created);
    defaultDeadline.setHours(defaultDeadline.getHours() + 24);
    object.deadline = object.deadline || defaultDeadline;
    object.scopes = [];
  },

  properties: {
    provisionerId: 'dont-spawn-machines',
    routing: '',
    // workerType: ''
    retries: 1,
    priority: 5,
    // created: new Date()
    // deadline: new Date()
    payload: Payload,
    metadata: Metadata,
    tags: Tags
  }
});

module.exports = Task;
<commit_msg>fix scopes<commit_after>/**
@see https://github.com/lightsofapollo/object-factory
@tutorial task_factories
@module taskcluster-client/factory/task
*/
var Factory = require('object-factory');
var Tags = new Factory();

var Payload = new Factory({
  onbuild: function(object) {
    object.command = object.command || ['/bin/bash -c', 'ls -lah'];
    object.env = object.env || {};
    object.features = object.features || {};
  },

  properties: {
    image: 'ubuntu',
    maxRunTime: 600,
    // onbuild above handles this
    // command: []
  }
});

var Metadata = new Factory({
  properties: {
    name: '',
    description: '',
    owner: '',
    source: 'http://localhost'
  }
});

var Task = new Factory({
  onbuild: function(object) {
    object.created = object.created || new Date();

    var defaultDeadline = new Date(object.created);
    defaultDeadline.setHours(defaultDeadline.getHours() + 24);
    object.deadline = object.deadline || defaultDeadline;
    object.scopes = object.scopes || [];
  },

  properties: {
    provisionerId: 'dont-spawn-machines',
    routing: '',
    // workerType: ''
    retries: 1,
    priority: 5,
    // created: new Date()
    // deadline: new Date()
    payload: Payload,
    metadata: Metadata,
    tags: Tags
  }
});

module.exports = Task;

{'fraction_non_alphanumeric': 0.16017147310989868, 'fraction_numerical': 0.005455962587685113, 'mean_word_length': 3.0298273155416013, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '542466', 'n_tokens_mistral': 850, 'n_tokens_neox': 821, 'n_words': 188}