<commit_before>/*
    get /simulations/{id}
        Get a simulation

    patch /simulations/{id}
        Update a simulation

    delete /simulations/{id}
        Delete a simulation

    post /simulations/{id}/clone
        Clone a simulation

    get /simulations/{id}/download
        Download all the asset associated with a simulation

    get /simulations/{id}/steps/{stepName}
        Get a particular step in a simulation

    patch /simulations/{id}/steps/{stepName}
        Update a particular step in a simulation
*/

function transformRequest(data) {
  return JSON.stringify(data);
}

const headers = {
  'Content-Type': 'application/json',
};

export default function ({ client, filterQuery, mustContain, busy }) {
  return {
    getSimulation(id) {
      return busy(client._.get(`/simulations/${id}`));
    },

    editSimulation(simulation) {
      const expected = ['name', 'description', 'active', 'disabled', 'metadata', '_id'],
        sfiltered = filterQuery(simulation, ...expected.slice(0, 5)); // Remove '_id'
<commit_msg>fix(IO): Allow simulation steps to be passed<commit_after>/*
    get /simulations/{id}
        Get a simulation

    patch /simulations/{id}
        Update a simulation

    delete /simulations/{id}
        Delete a simulation

    post /simulations/{id}/clone
        Clone a simulation

    get /simulations/{id}/download
        Download all the asset associated with a simulation

    get /simulations/{id}/steps/{stepName}
        Get a particular step in a simulation

    patch /simulations/{id}/steps/{stepName}
        Update a particular step in a simulation
*/

function transformRequest(data) {
  return JSON.stringify(data);
}

const headers = {
  'Content-Type': 'application/json',
};

export default function ({ client, filterQuery, mustContain, busy }) {
  return {
    getSimulation(id) {
      return busy(client._.get(`/simulations/${id}`));
    },

    editSimulation(simulation) {
      const expected = ['name', 'description', 'active', 'disabled', 'metadata', 'steps', '_id'],
        sfiltered = filterQuery(simulation, ...expected.slice(0, 6)); // Remove '_id'

{'fraction_non_alphanumeric': 0.1274601686972821, 'fraction_numerical': 0.0018744142455482662, 'mean_word_length': 2.9537037037037037, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1781344', 'n_tokens_mistral': 601, 'n_tokens_neox': 586, 'n_words': 173}