<commit_before>// @flow

import RichTextEditor from 'react-rte';

export type Role = "student" | "teaching-assistant" | "instructor";

export type User = {
  id: string,
  uid: string,
  firstName: string,
  lastName: string,
  displayName: string,
  role: Role,
  studentNumber: ?string,
  employeeNumber: ?string,
  section: ?string,
  term: ?number,
  session: ?string,
  year: ?number
};

export type Lesson = {
  id: string,
  title: string,
  background: string,
  questions: Array<Question>
};

export type Question = {
  id: string,
  title: string,
  instructions: string,
  code: string,
  className: string,
  readOnly: bool,
  hints: Array<string>,
  tags: string,
  expectedOutput: string,
  topic: Lesson
};

export type UserState = {
  fetching: bool,
  fetched: bool,
  users: Array<User>,
  error: null
}

export type LessonState = {
  fetching: bool,
  fetched: bool,
  lessons: Array<Lesson>,
  error: null,
  new: {
    title: string,
    background: RichTextEditor
  }
}

export type QuestionState = {
  fetching: bool,
  fetched: bool,
  questions: Array<Question>,
  error: null
}

export type State = {
  users: UserState,
  lessons: LessonState,
  questions: QuestionState
}<commit_msg>Make redux store immutable<commit_after>// @flow

import RichTextEditor from 'react-rte';

export type Role = "student" | "teaching-assistant" | "instructor";

export type User = {
  +id: string,
  +uid: string,
  +firstName: string,
  +lastName: string,
  +displayName: string,
  +role: Role,
  +studentNumber: ?string,
  +employeeNumber: ?string,
  +section: ?string,
  +term: ?number,
  +session: ?string,
  +year: ?number
};

export type Lesson = {
  +id: string,
  +title: string,
  +background: string,
  +questions: Array<Question>
};

export type Question = {
  +id: string,
  +title: string,
  +instructions: string,
  +code: string,
  +className: string,
  +readOnly: bool,
  +hints: Array<string>,
  +tags: string,
  +expectedOutput: string,
  +topic: Lesson
};

export type UserState = {
  +fetching: bool,
  +fetched: bool,
  +users: Array<User>,
  +error: null
}

export type LessonState = {
  +fetching: bool,
  +fetched: bool,
  +lessons: Array<Lesson>,
  +error: null,
  +new: {
    +title: string,
    +background: RichTextEditor
  }
}

export type QuestionState = {
  +fetching: bool,
  +fetched: bool,
  +questions: Array<Question>,
  +error: null
}

export type State = {
  +users: UserState,
  +lessons: LessonState,
  +questions: QuestionState
}
{'fraction_non_alphanumeric': 0.13311819281968534, 'fraction_numerical': 0.0, 'mean_word_length': 3.8818897637795278, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '6580618', 'n_tokens_mistral': 884, 'n_tokens_neox': 878, 'n_words': 243}