<commit_before>const {
  Factory, fake, sequence,
} = require('./helpers');
const { capitalize, get, flatMap, isNil } = require('lodash');
require('../../specs/factories/task-plan-stats');

Factory.define('TaskPlanPeriodStudent')
  .role_id(sequence)
  .first_name(fake.name.firstName)
  .last_name(fake.name.lastName)
  .student_identifier(() => fake.random.alphaNumeric(fake.random.number({ min: 5, max: 12 })))
  .is_dropped(() => fake.random.arrayElement([false,false,false,false,false,false,false,false,false,false,false,false,true]))
  .available_points(({ parent: { object } }) => object.question_headings.length)
  .total_points(({ parent: { object } }) => object.question_headings.length)
  .total_fraction(1)
  .late_work_point_penalty(0)
  .late_work_fraction_penalty(0)
  .questions(({ object: { role_id }, parent: { exercises, grades } }) => flatMap(exercises, (exercise) => (
    exercise.content.questions.map((question) => {
      const is_completed = fake.random.arrayElement([true, true, true, true, true, false])<commit_msg>include new field in factory<commit_after>const {
  Factory, fake, sequence,
} = require('./helpers');
const { capitalize, get, flatMap, isNil } = require('lodash');
require('../../specs/factories/task-plan-stats');

Factory.define('TaskPlanPeriodStudent')
  .role_id(sequence)
  .task_id(sequence)
  .first_name(fake.name.firstName)
  .last_name(fake.name.lastName)
  .student_identifier(() => fake.random.alphaNumeric(fake.random.number({ min: 5, max: 12 })))
  .is_dropped(() => fake.random.arrayElement([false,false,false,false,false,false,false,false,false,false,false,false,true]))
  .available_points(({ parent: { object } }) => object.question_headings.length)
  .total_points(({ parent: { object } }) => object.question_headings.length)
  .total_fraction(1)
  .late_work_point_penalty(0)
  .late_work_fraction_penalty(0)
  .questions(({ object: { role_id }, parent: { exercises, grades } }) => flatMap(exercises, (exercise) => (
    exercise.content.questions.map((question) => {
      const is_completed = fake.random.arrayElement([true, true, true, true, true, false])
{'fraction_non_alphanumeric': 0.1767200754005655, 'fraction_numerical': 0.005655042412818096, 'mean_word_length': 5.572755417956657, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '1770107', 'n_tokens_mistral': 720, 'n_tokens_neox': 697, 'n_words': 108}