<commit_before>name: pybuilder
on:
  - pull_request
  - push
jobs:
  build:
    runs-on: ${{ matrix.os }}
    continue-on-error: ${{ startsWith(matrix.python-version, '3.10.0') || startsWith(matrix.python-version, 'pypy-') }}
    strategy:
      fail-fast: false
      matrix:
        os:
          - ubuntu-latest
          - macos-latest
          - windows-latest
        python-version:
          - '3.9'
          - '3.8'
          - '3.7'
          - '3.6'
          - '3.10.0-rc.1'
          - 'pypy-3.6'
          - 'pypy-3.7'
        with-venv:
          - 'true'
          - 'false'
    env:
      DEPLOY_BRANCHES: "refs/heads/master"
      DEPLOY_PYTHONS: "3.9"
      DEPLOY_OSES: "Linux"
      PYB_ARGS: "-E ci -v -X analyze install"
      TWINE_USERNAME: pybuilder-travis2
      TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
          architecture: x64
      - name: Python Check
        run: |
          pwd
          python --version
          python -m pip --version
          echo GITHUB_REF $GITHUB_REF
          echo GITHUB_HEAD_REF $GITHUB_HEAD_REF
          echo GITHUB_BASE_REF $GITHUB_BASE_REF
      - name: Create VEnv
        if: ${{ matrix.with-venv == 'true' }}
        run: |
          python -m pip install virtualenv
          virtualenv $HOME/.pyb
      - name: Build
        shell: python
        env:
          WITH_VENV: ${{ matrix.with-venv }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          PYTHON_VERSION: ${{ matrix.python-version }}
        run: |
          import os
          import subprocess
          import sys
          from os.path import join as jp, dirname, abspath, normcase as nc, expanduser

          if __name__ == "__main__":
              environ = os.environ
              os_name = environ["RUNNER_OS"]

              pyb_args = environ["PYB_ARGS"].split()
              deploy_oses = environ["DEPLOY_OSES"].split()
              deploy_pythons = environ["DEPLOY_PYTHONS"].split()
              deploy_branches = environ["DEPLOY_BRANCHES"].split()

              is_production = environ["GITHUB_EVENT_NAME"] != "pull_request"
              if is_production:
                  print("Running Production build!")
                  if (os_name in deploy_oses and
                      environ["PYTHON_VERSION"] in deploy_pythons and
                      environ["GITHUB_REF"] in deploy_branches):
                          print("This build will be deployed!")
                          pyb_args.append("upload")
              else:
                  print("Running PR build!")

              project_dir = environ["GITHUB_WORKSPACE"]
              build_py = jp(project_dir, "build.py")

              if environ["WITH_VENV"] == "true":
                  venv_dir = jp(expanduser("~"), ".pyb")
                  if os_name == "Windows":
                      venv_bin_dir = jp(venv_dir, "Scripts")
                      python_bin = jp(venv_bin_dir, "python.exe")
                  else:
                      venv_bin_dir = jp(venv_dir, "bin")
                      python_bin = jp(venv_bin_dir, "python")
                  environ["PATH"] = venv_bin_dir + os.pathsep + environ["PATH"]
              else:
                  if os_name == "Windows":
                      venv_bin_dir = jp(dirname(sys.executable), "Scripts")
                      environ["PATH"] = dirname(sys.executable) + os.pathsep + venv_bin_dir + os.pathsep + environ["PATH"]
                  else:
                      venv_bin_dir = dirname(sys.executable)
                      environ["PATH"] = venv_bin_dir + os.pathsep + environ["PATH"]
                  python_bin = sys.executable

              cmd_args = [python_bin, build_py] + pyb_args

              print("Will run PyBuilder build with the following args: %r" % cmd_args)

              sys.stdout.flush()

              subprocess.check_call(cmd_args, env=environ)
      - name: Final Check
        if: always()
        run: echo Done!
<commit_msg>Add separate MacOS 10.15 and 11 Don't release except in VirtualEnv build<commit_after>name: pybuilder
on:
  - pull_request
  - push
jobs:
  build:
    runs-on: ${{ matrix.os }}
    continue-on-error: ${{ startsWith(matrix.python-version, '3.10.0') || startsWith(matrix.python-version, 'pypy-') }}
    strategy:
      fail-fast: false
      matrix:
        os:
          - ubuntu-latest
          - windows-latest
          - macos-10.15
          - macos-11
        python-version:
          - '3.9'
          - '3.8'
          - '3.7'
          - '3.6'
          - '3.10.0-rc.1'
          - 'pypy-3.6'
          - 'pypy-3.7'
        with-venv:
          - 'true'
          - 'false'
    env:
      DEPLOY_BRANCHES: "refs/heads/master"
      DEPLOY_PYTHONS: "3.9"
      DEPLOY_OSES: "Linux"
      PYB_ARGS: "-E ci -v -X analyze install"
      TWINE_USERNAME: pybuilder-travis2
      TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
          architecture: x64
      - name: Python Check
        run: |
          pwd
          python --version
          python -m pip --version
          echo GITHUB_REF $GITHUB_REF
          echo GITHUB_HEAD_REF $GITHUB_HEAD_REF
          echo GITHUB_BASE_REF $GITHUB_BASE_REF
      - name: Create VEnv
        if: ${{ matrix.with-venv == 'true' }}
        run: |
          python -m pip install virtualenv
          virtualenv $HOME/.pyb
      - name: Build
        shell: python
        env:
          WITH_VENV: ${{ matrix.with-venv }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          PYTHON_VERSION: ${{ matrix.python-version }}
        run: |
          import os
          import subprocess
          import sys
          from os.path import join as jp, dirname, abspath, normcase as nc, expanduser

          if __name__ == "__main__":
              environ = os.environ
              os_name = environ["RUNNER_OS"]

              pyb_args = environ["PYB_ARGS"].split()
              deploy_oses = environ["DEPLOY_OSES"].split()
              deploy_pythons = environ["DEPLOY_PYTHONS"].split()
              deploy_branches = environ["DEPLOY_BRANCHES"].split()

              is_production = environ["GITHUB_EVENT_NAME"] != "pull_request"
              if is_production:
                  print("Running Production build!")
                  if (os_name in deploy_oses and
                      environ["WITH_VENV"] == "true" and
                      environ["PYTHON_VERSION"] in deploy_pythons and
                      environ["GITHUB_REF"] in deploy_branches):
                          print("This build will be deployed!")
                          pyb_args.append("upload")
              else:
                  print("Running PR build!")

              project_dir = environ["GITHUB_WORKSPACE"]
              build_py = jp(project_dir, "build.py")

              if environ["WITH_VENV"] == "true":
                  venv_dir = jp(expanduser("~"), ".pyb")
                  if os_name == "Windows":
                      venv_bin_dir = jp(venv_dir, "Scripts")
                      python_bin = jp(venv_bin_dir, "python.exe")
                  else:
                      venv_bin_dir = jp(venv_dir, "bin")
                      python_bin = jp(venv_bin_dir, "python")
                  environ["PATH"] = venv_bin_dir + os.pathsep + environ["PATH"]
              else:
                  if os_name == "Windows":
                      venv_bin_dir = jp(dirname(sys.executable), "Scripts")
                      environ["PATH"] = dirname(sys.executable) + os.pathsep + venv_bin_dir + os.pathsep + environ["PATH"]
                  else:
                      venv_bin_dir = dirname(sys.executable)
                      environ["PATH"] = venv_bin_dir + os.pathsep + environ["PATH"]
                  python_bin = sys.executable

              cmd_args = [python_bin, build_py] + pyb_args

              print("Will run PyBuilder build with the following args: %r" % cmd_args)

              sys.stdout.flush()

              subprocess.check_call(cmd_args, env=environ)
      - name: Final Check
        if: always()
        run: echo Done!

{'fraction_non_alphanumeric': 0.1104066985645933, 'fraction_numerical': 0.008133971291866028, 'mean_word_length': 1.5244565217391304, 'pattern_counts': {'":': 8, '<': 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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5778300', 'n_tokens_mistral': 2626, 'n_tokens_neox': 2542, 'n_words': 511}