<commit_before>/* global Simput */
import React                from 'react';

import SimputLabels         from 'simput/src/Labels';
import ViewMenu             from 'simput/src/ViewMenu';
import modelGenerator       from 'simput/src/modelGenerator';
import client               from '../../../../../../network';
import deepClone            from 'mout/src/lang/deepClone';

import PropertyPanelBlock   from 'paraviewweb/src/React/Properties/PropertyPanel';

import style                from 'HPCCloudStyle/PageWithMenu.mcss';

export default React.createClass({

  displayName: 'PyFrSimput',

  propTypes: {
    convert: React.PropTypes.func,
    model: React.PropTypes.object,
    project: React.PropTypes.object,
    simulation: React.PropTypes.object,
    step: React.PropTypes.string,
  },

  getDefaultProps() {
    return {
      // PyFr Simput code
      model: Simput.types.pyfr.model,
      convert: Simput.types.pyfr.convert,
    };
  },

  getInitialState() {
    return {
      // ini file container
      iniFile: null,

      // Simput root data
      jsonData: { data: {} },

      // Language support
      labels: new SimputLabels(Simput.types.pyfr, 'en'),
      help: Simput.types.pyfr.lang.en.help,

      // UI content management
      data: [],
      viewData: {},
    };
  },

  componentWillMount() {
    var iniFile = this.props.simulation.metadata.inputFolder.files.ini;
    var jsonData = this.props.simulation.steps[this.props.step].metadata.model;

    // Create ini file container if not already here
    if (!iniFile) {
      const fileName = 'ini';
      client.addEmptyFileForSimulation(this.props.simulation, fileName)
        .then(resp => {<commit_msg>fix(PyFr): Fix file name in item<commit_after>/* global Simput */
import React                from 'react';

import SimputLabels         from 'simput/src/Labels';
import ViewMenu             from 'simput/src/ViewMenu';
import modelGenerator       from 'simput/src/modelGenerator';
import client               from '../../../../../../network';
import deepClone            from 'mout/src/lang/deepClone';

import PropertyPanelBlock   from 'paraviewweb/src/React/Properties/PropertyPanel';

import style                from 'HPCCloudStyle/PageWithMenu.mcss';

export default React.createClass({

  displayName: 'PyFrSimput',

  propTypes: {
    convert: React.PropTypes.func,
    model: React.PropTypes.object,
    project: React.PropTypes.object,
    simulation: React.PropTypes.object,
    step: React.PropTypes.string,
  },

  getDefaultProps() {
    return {
      // PyFr Simput code
      model: Simput.types.pyfr.model,
      convert: Simput.types.pyfr.convert,
    };
  },

  getInitialState() {
    return {
      // ini file container
      iniFile: null,

      // Simput root data
      jsonData: { data: {} },

      // Language support
      labels: new SimputLabels(Simput.types.pyfr, 'en'),
      help: Simput.types.pyfr.lang.en.help,

      // UI content management
      data: [],
      viewData: {},
    };
  },

  componentWillMount() {
    var iniFile = this.props.simulation.metadata.inputFolder.files.ini;
    var jsonData = this.props.simulation.steps[this.props.step].metadata.model;

    // Create ini file container if not already here
    if (!iniFile) {
      client.addEmptyFileForSimulation(this.props.simulation, 'pyfr.ini')
        .then(resp => {
{'fraction_non_alphanumeric': 0.12369907820398454, 'fraction_numerical': 0.0, 'mean_word_length': 2.4716202270381835, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4331976', 'n_tokens_mistral': 1014, 'n_tokens_neox': 995, 'n_words': 218}