<commit_before>name: Test and deploy on tag

on: push

jobs:
  test:

    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        python-version: [3.6, 3.7, 3.8, 3.9, 3.10]
    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        python -m pip install tox tox-gh-actions
    - name: Run test
      run: tox -e py
    - name: Build HTML documentation
      run: tox -e docs
    - name: Calculate coverage
      run: tox -e coverage
    - name: Codecov uploader
      if: matrix.python-version == 3.10
      uses: codecov/codecov-action@v2
    - name: Static checks
      if: matrix.python-version == 3.10
      run: tox -e check
    - name: Upload HTML documentation
      if: matrix.python-version == 3.10
      uses: actions/upload-artifact@v2
      with:
        name: html-doc
        path: docs/_build

  deploy:

    if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
    needs: test
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Download HTML documentation from job 'test'
      uses: actions/download-artifact@v2
      with:
        name: html-doc
        path: docs/_build
    - name: Disable jekyll
      run: touch docs/_build/.nojekyll
    - name: Deploy documentation
      uses: JamesIves/github-pages-deploy-action@4.1.3
      with:
        branch: gh-pages
        folder: docs/_build
    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: '3.9'
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install setuptools wheel twine
    - name: Build and publish
      env:
        TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
        TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
      run: |
        python setup.py sdist bdist_wheel
        twine upload dist/*
<commit_msg>Install graphviz and plantuml dependencies to build documentation<commit_after>name: Test and deploy on tag

on: push

jobs:
  test:

    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        python-version: [3.6, 3.7, 3.8, 3.9, 3.10]
    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        python -m pip install tox tox-gh-actions
        sudo apt-get update -y
        sudo apt-get install graphviz
        sudo apt-get install plantuml
    - name: Run test
      run: tox -e py
    - name: Build HTML documentation
      run: tox -e docs
    - name: Calculate coverage
      run: tox -e coverage
    - name: Codecov uploader
      if: matrix.python-version == 3.10
      uses: codecov/codecov-action@v2
    - name: Static checks
      if: matrix.python-version == 3.10
      run: tox -e check
    - name: Upload HTML documentation
      if: matrix.python-version == 3.10
      uses: actions/upload-artifact@v2
      with:
        name: html-doc
        path: docs/_build

  deploy:

    if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
    needs: test
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Download HTML documentation from job 'test'
      uses: actions/download-artifact@v2
      with:
        name: html-doc
        path: docs/_build
    - name: Disable jekyll
      run: touch docs/_build/.nojekyll
    - name: Deploy documentation
      uses: JamesIves/github-pages-deploy-action@4.1.3
      with:
        branch: gh-pages
        folder: docs/_build
    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: '3.9'
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install setuptools wheel twine
    - name: Build and publish
      env:
        TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
        TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
      run: |
        python setup.py sdist bdist_wheel
        twine upload dist/*

{'fraction_non_alphanumeric': 0.10048176187198898, 'fraction_numerical': 0.0146822665749025, 'mean_word_length': 2.0152143845089903, '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': '7641856', 'n_tokens_mistral': 1428, 'n_tokens_neox': 1338, 'n_words': 397}