<commit_before>name: Tests

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

jobs:
  build:
    runs-on: ${{matrix.os}}
    strategy:
      matrix:
        python-version: ['3.9', '3.8', '3.7']
        os: ['macos-11', 'ubuntu-20.04']
    name: Python ${{ matrix.python-version }} test on ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v2

      - name: Setup python
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
      
      - name: Install c++ dependendencies on mac
        if: ${{matrix.os == 'macos-11'}}
        run: | 
          brew install eigen
          brew install boost

      - name: Install c++ dependendencies on ubuntu
        if: ${{matrix.os == 'ubuntu-20.04'}}
        run: | 
          sudo apt-get install libeigen3-dev
          sudo apt-get install -y libboost-all-dev

      - name: Install Python dependencies
        run: | 
          pip install wheel
          pip install -r requirements.txt

      - name: Build c++ extensions inplace
        run: python setup.py build_ext --inplace

      - name: Run Tests
        run: pytest

      - name: Build wheel
        run: python setup.py bdist_wheel

      - name: Archive wheel
        uses: actions/upload-artifact@v2
        with:
          name: wheel
          path: dist/*
        
  publish:
    runs-on: 'ubuntu-20.04'
    needs: build

    #if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
    steps:

      - uses: actions/checkout@v2

      - name: Build source dist
        run: python3 setup.py sdist

      - name: Download wheels
        uses: actions/download-artifact@v2
        with:
          name: wheel
          path: dist

      - name: Publish package to TestPyPI
        uses: pypa/gh-action-pypi-publish@release/v1
        with:
          user: __token__
          password: ${{ secrets.TEST_PYPI_API_TOKEN }}
          repository_url: https://test.pypi.org/legacy/

      - name: Archive wheel
        uses: actions/upload-artifact@v2<commit_msg>Adding requirements to build source dist<commit_after>name: Tests

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

jobs:
  build:
    runs-on: ${{matrix.os}}
    strategy:
      matrix:
        python-version: ['3.9', '3.8', '3.7']
        os: ['macos-11', 'ubuntu-20.04']
    name: Python ${{ matrix.python-version }} test on ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v2

      - name: Setup python
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
      
      - name: Install c++ dependendencies on mac
        if: ${{matrix.os == 'macos-11'}}
        run: | 
          brew install eigen
          brew install boost

      - name: Install c++ dependendencies on ubuntu
        if: ${{matrix.os == 'ubuntu-20.04'}}
        run: | 
          sudo apt-get install libeigen3-dev
          sudo apt-get install -y libboost-all-dev

      - name: Install Python dependencies
        run: | 
          pip install wheel
          pip install -r requirements.txt

      - name: Build c++ extensions inplace
        run: python setup.py build_ext --inplace

      - name: Run Tests
        run: pytest

      - name: Build wheel
        run: python setup.py bdist_wheel

      - name: Archive wheel
        uses: actions/upload-artifact@v2
        with:
          name: wheel
          path: dist/*
        
  publish:
    runs-on: 'ubuntu-20.04'
    needs: build

    #if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
    steps:

      - uses: actions/checkout@v2

      - name: Build source dist
        run: | 
          pip3 install -r requirements.txt
          python3 setup.py sdist

      - name: Download wheels
        uses: actions/download-artifact@v2
        with:
          name: wheel
          path: dist

      - name: Publish package to TestPyPI
        uses: pypa/gh-action-pypi-publish@release/v1
        with:
          user: __token__
          password: ${{ secrets.TEST_PYPI_API_TOKEN }}
          repository_url: https://test.pypi.org/legacy/

      - name: Archive wheel
        uses: actions/upload-artifact@v2
{'fraction_non_alphanumeric': 0.10844464568711795, 'fraction_numerical': 0.014263074484944533, 'mean_word_length': 1.8176020408163265, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '5869157', 'n_tokens_mistral': 1411, 'n_tokens_neox': 1316, 'n_words': 368}