<commit_before>machine:
  environment:
    # We need to set this variable to let Anaconda take precedence
    PATH: "/home/ubuntu/miniconda/envs/circleenv/bin:/home/ubuntu/miniconda/bin:$PATH"

dependencies:
  cache_directories:
    - "/home/ubuntu/miniconda"
    - "/home/ubuntu/.mne"
    - "/home/ubuntu/examples"
  # Various dependencies
  pre:
    # Get a running Python
    - cd ~
    # Disable pyenv (no cleaner way provided by CircleCI as it prepends pyenv version to PATH)
    - rm -rf ~/.pyenv
    - rm -rf ~/virtualenvs
    # Get Anaconda and conda-based requirements
    - >
      if [ -n "${RUN_NIGHTLY_BUILD}" ]; then
        if [ ! -d "/home/ubuntu/miniconda" ]; then
          echo "Setting up conda";
          wget -q http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O ~/miniconda.sh;
          chmod +x ~/miniconda.sh;
          ~/miniconda.sh -b -p /home/ubuntu/miniconda;
          conda update --yes --quiet conda;
          conda create -n circleenv --yes pip python=2.7 pip numpy scipy scikit-learn mayavi matplotlib sphinx==1.2.3 pillow six IPython;
          sed -i "s/ENABLE_USER_SITE = .*/ENABLE_USER_SITE = False/g" /home/ubuntu/miniconda/envs/circleenv/lib/python2.7/site.py;
        else
          echo "Conda already set up.";
        fi;

        ls -al /home/ubuntu/miniconda;
        ls -al /home/ubuntu/miniconda/bin;
        echo $PATH;
        which python;
        which pip;
        git clone https://github.com/sphinx-gallery/sphinx-gallery.git;
        cd sphinx-gallery && pip install -r requirements.txt && python setup.py develop;
        cd /home/ubuntu && git clone https://github.com/enthought/pyface.git && cd pyface && python setup.py develop
        pip install sphinx_bootstrap_theme PySurfer nilearn neo;
        cd /home/ubuntu/mne-python && python setup.py develop;
        mkdir -p ~/examples;
        make sample_data;
        make testing_data;
        make spm_data;
        make somato_data;
        cd /home/ubuntu/.mne && echo '{"MNE_DATASETS_BRAINSTORM_PATH":"/home/ubuntu/examples","MNE_DATASETS_EEGBCI_PATH":"/home/ubuntu/examples","MNE_DATASETS_MEGSIM_PATH":"/home/ubuntu/examples","MNE_DATASETS_SAMPLE_PATH":"/home/ubuntu/examples","MNE_DATASETS_SOMATO_PATH":"/home/ubuntu/examples","MNE_DATASETS_SPM_FACE_PATH":"/home/ubuntu/examples","MNE_DATASETS_TESTING_PATH":"/home/ubuntu/examples"}' > mne-python.json;
        if [[ ! -e ../examples/MNE-brainstorm-data ]]; then cd ../examples && mkdir MNE-brainstorm-data && cd MNE-brainstorm-data && wget https://copy.com/ZTHXXFcuIZycvRoA/brainstorm/bst_raw.tar.bz2 && tar xvf bst_raw.tar.bz2; fi
        python -c "import mne; mne.sys_info()";
        python -c "import mne, os; print(mne.datasets.sample.data_path(os.path.join(os.environ['HOME'], 'examples'), verbose=True))";
        /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset;
      fi;

test:
  override:
    # Some examples take longer than 10 minutes to run.
    - if [ -n "${RUN_NIGHTLY_BUILD}" ]; then case $CIRCLE_NODE_INDEX in 0) cd doc && make html_dev-pattern PATTERN='/io/plot_\|/inverse/plot_\|/visualization/plot_\|/decoding/plot_\|/simulation/plot_' ;; 1) cd doc && make html_dev-pattern PATTERN='/preprocessing/plot_\|/datasets/plot_' ;; 2) cd doc && make html_dev-pattern PATTERN='/tutorials/plot_\|/examples/plot_\|/connectivity/plot_\|/realtime/plot_\|/forward/plot_\|/stats/plot_\|/time_frequency/plot_' ;; esac fi:
        parallel: true
        timeout: 1500

general:
  # Open the doc to the API
  artifacts:
    - "doc/_build/html"<commit_msg>Removed parallel builds. Removed dead links.<commit_after>machine:
  environment:
    # We need to set this variable to let Anaconda take precedence
    PATH: "/home/ubuntu/miniconda/envs/circleenv/bin:/home/ubuntu/miniconda/bin:$PATH"

dependencies:
  cache_directories:
    - "/home/ubuntu/miniconda"
    - "/home/ubuntu/.mne"
    - "/home/ubuntu/examples"
  # Various dependencies
  pre:
    # Get a running Python
    - cd ~
    # Disable pyenv (no cleaner way provided by CircleCI as it prepends pyenv version to PATH)
    - rm -rf ~/.pyenv
    - rm -rf ~/virtualenvs
    # Get Anaconda and conda-based requirements
    - >
      if [ -n "${RUN_NIGHTLY_BUILD}" ]; then
        if [ ! -d "/home/ubuntu/miniconda" ]; then
          echo "Setting up conda";
          wget -q http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O ~/miniconda.sh;
          chmod +x ~/miniconda.sh;
          ~/miniconda.sh -b -p /home/ubuntu/miniconda;
          conda update --yes --quiet conda;
          conda create -n circleenv --yes pip python=2.7 pip numpy scipy scikit-learn mayavi matplotlib sphinx==1.2.3 pillow six IPython;
          sed -i "s/ENABLE_USER_SITE = .*/ENABLE_USER_SITE = False/g" /home/ubuntu/miniconda/envs/circleenv/lib/python2.7/site.py;
        else
          echo "Conda already set up.";
        fi;

        ls -al /home/ubuntu/miniconda;
        ls -al /home/ubuntu/miniconda/bin;
        echo $PATH;
        which python;
        which pip;
        git clone https://github.com/sphinx-gallery/sphinx-gallery.git;
        cd sphinx-gallery && pip install -r requirements.txt && python setup.py develop;
        cd /home/ubuntu && git clone https://github.com/enthought/pyface.git && cd pyface && python setup.py develop
        pip install sphinx_bootstrap_theme PySurfer nilearn neo;
        cd /home/ubuntu/mne-python && python setup.py develop;
        mkdir -p ~/examples;
        make sample_data;
        make testing_data;
        make spm_data;
        make somato_data;
        cd /home/ubuntu/.mne && echo '{"MNE_DATASETS_BRAINSTORM_PATH":"/home/ubuntu/examples","MNE_DATASETS_EEGBCI_PATH":"/home/ubuntu/examples","MNE_DATASETS_MEGSIM_PATH":"/home/ubuntu/examples","MNE_DATASETS_SAMPLE_PATH":"/home/ubuntu/examples","MNE_DATASETS_SOMATO_PATH":"/home/ubuntu/examples","MNE_DATASETS_SPM_FACE_PATH":"/home/ubuntu/examples","MNE_DATASETS_TESTING_PATH":"/home/ubuntu/examples"}' > mne-python.json;
        if [[ ! -e ../examples/MNE-brainstorm-data ]]; then cd ../examples && mkdir MNE-brainstorm-data && cd MNE-brainstorm-data && wget https://copy.com/ZTHXXFcuIZycvRoA/brainstorm/bst_raw.tar.bz2 && tar xvf bst_raw.tar.bz2; fi
        python -c "import mne; mne.sys_info()";
        python -c "import mne, os; print(mne.datasets.sample.data_path(os.path.join(os.environ['HOME'], 'examples'), verbose=True))";
        /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset;
      fi;

test:
  override:
    # Some examples take longer than 10 minutes to run.
    - if [ -n "${RUN_NIGHTLY_BUILD}" ]; then cd doc && make html_dev fi:
        timeout: 1500

general:
  # Open the doc to the API
  artifacts:
    - "doc/_build/html"
{'fraction_non_alphanumeric': 0.135993135993136, 'fraction_numerical': 0.009867009867009866, 'mean_word_length': 2.80729450190528, 'pattern_counts': {'":': 14, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 6, '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': '1135643', 'n_tokens_mistral': 2612, 'n_tokens_neox': 2394, 'n_words': 530}