<commit_before>version: 2
jobs:
  build:
    docker:
      - image: circleci/python:3.7.0
    
    working_directory: ~/repo
    
    steps:
      - checkout

      - restore_cache:
          keys:
          - v2-dependencies-{{ checksum "requirements.txt" }}
          - v2-dependencies-

      - run:
          name: Install pandoc
          command: |
                    sudo apt-get update 
                    wget https://github.com/jgm/pandoc/releases/download/2.2.1/pandoc-2.2.1-1-amd64.deb
                    sudo dpkg -i pandoc-2.2.1-1-amd64.deb
          
      - run:
          name: Install tex
          command: |
                    sudo apt-get install -y texlive
                    sudo apt-get install -y texlive-latex-extra
          
      - run:
          name: Install 7z, unrar
          command: |
                    sudo apt-get install -y p7zip-full
          
      - run:
          name: Install InkScape
          command: |
                    sudo apt-get install -y inkscape
          
      - run:
          name: Install graphviz
          command: |
                    sudo apt-get install -y graphviz
          
      - run:
          name: install dependencies
          command: |
            python3 -m venv venv
            . venv/bin/activate
            pip install -r requirements.txt
            pip install git+https://github.com/sdpython/sphinxcontrib-images.git --upgrade --no-deps
            pip install scipy scikit-learn

      - save_cache:
          paths:
            - ./venv
          key: v2-dependencies-{{ checksum "requirements.txt" }}
        
      - run:
          name: run tests
          command: |
            . venv/bin/activate
            python setup.py unittests

      - run:
          name: wheel
          command: |
            . venv/bin/activate
            python setup.py bdist_wheel
            mkdir -p test-reports/dist
            cp dist/*.whl test-reports/dist

      - run:
          name: documentation
          command: |
            . venv/bin/activate
            python setup.py build_sphinx
            
      - run:
          name: copy documentation
          command: |
            mkdir -p test-reports/doc
            cp -r  _doc/sphinxdoc/build/html test-reports/doc
            
      - store_artifacts:
          path: test-reports
          destination: test-reports<commit_msg>update circleci<commit_after>version: 2
jobs:
  build:
    docker:
      - image: circleci/python:3.7.0
    
    working_directory: ~/repo
    
    steps:
      - checkout

      - restore_cache:
          keys:
          - v2-dependencies-{{ checksum "requirements.txt" }}
          - v2-dependencies-

      - run:
          name: Install pandoc
          command: |
                    sudo apt-get update 
                    wget https://github.com/jgm/pandoc/releases/download/2.2.1/pandoc-2.2.1-1-amd64.deb
                    sudo dpkg -i pandoc-2.2.1-1-amd64.deb
          
      - run:
          name: Install tex
          command: |
                    sudo apt-get install -y texlive
                    sudo apt-get install -y texlive-latex-extra
          
      - run:
          name: Install 7z, unrar
          command: |
                    sudo apt-get install -y p7zip-full
          
      - run:
          name: Install InkScape
          command: |
                    sudo apt-get install -y inkscape
          
      - run:
          name: Install graphviz
          command: |
                    sudo apt-get install -y graphviz
          
      - run:
          name: install dependencies
          command: |
            python3 -m venv venv
            . venv/bin/activate
            pip install -r requirements.txt
            pip install git+https://github.com/sdpython/sphinxcontrib-images.git --upgrade --no-deps
            pip install scipy scikit-learn

      - save_cache:
          paths:
            - ./venv
          key: v2-dependencies-{{ checksum "requirements.txt" }}
        
      - run:
          name: run tests
          command: |
            . venv/bin/activate
            python setup.py unittests

      - run:
          name: wheel
          command: |
            . venv/bin/activate
            python setup.py bdist_wheel
            mkdir -p test-reports/dist
            cp dist/*.whl test-reports/dist

      - run:
          name: documentation
          command: |
            . venv/bin/activate
            python setup.py build_sphinx
            
      - run:
          name: copy documentation
          command: |
            mkdir -p test-reports/doc
            zip -r -9  test-reports/doc/documentation_html.zip _doc/sphinxdoc/build/html
            
      - store_artifacts:
          path: test-reports
          destination: test-reports
{'fraction_non_alphanumeric': 0.0822402665001041, 'fraction_numerical': 0.010618363522798251, 'mean_word_length': 1.1014873140857393, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4185064', 'n_tokens_mistral': 1412, 'n_tokens_neox': 1324, 'n_words': 311}