<commit_before>name: itinerant_tester_on_demand
on:
  workflow_dispatch:
    inputs:
      repo:
        description: 'Repo to test (user_name/repo_name)'
        required: true

jobs:
  itinerant_tester_on_demand:
    strategy:
      fail-fast: false
      matrix:
        python-version: ['3.10']  # [2.7, 3.5, 3.6, 3.7, 3.8, pypy3]
    runs-on: ubuntu-latest
    steps:
      - run: echo "Testing ${{ github.event.inputs.repo }}..."
      - uses: actions/checkout@v3
        with:
          repository: ${{ github.event.inputs.repo }}
      - uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python-version }}
      - run: pip install --upgrade pip wheel
      - run: pip install bandit black codespell flake8 flake8-2020 flake8-bugbear
                         flake8-comprehensions flake8-return isort mypy pytest pytype
                         pyupgrade safety
      # tee: write to stdout and also into the file
      - run: bandit --recursive . | tee bandit.out.txt || true
      - name: Customized bandit command
        shell: python
        run: |
          with open("bandit.out.txt") as in_file:
              errors = sorted(
                  set(line[11:15] for line in in_file if line.startswith(">> "))
              )
          skip = f" --skip {','.join(errors)}" if errors else ""
          print(f"bandit --recursive{skip} .")
      - run: |
          black --check . || true
          rm bandit.out.txt
      - run: codespell --count --skip="*.po" || true  # --ignore-words-list="" --skip="*.css,*.js,*.lock,*.map,*.po,*.svg"
      - run: flake8 . --count --select=E9,F63,F7,F82,Y --show-source --statistics
      - run: flake8 . --count --exit-zero --max-line-length=88 --show-source --statistics
      - run: isort --profile black . || true
      - run: pip install -r requirements.txt || pip install --editable . || pip install . || true
      - name: mypy --ignore-missing-imports --install-types --non-interactive . || true
        run: |
          mkdir -p .mypy_cache
          mypy --ignore-missing-imports --install-types --non-interactive . || true
      - run: pytest --doctest-modules . || pytest . || true
      - run: shopt -s globstar && pyupgrade --exit-zero-even-if-changed --py37-plus **/*.py
      - run: safety check
      - shell: python
        run: |
          from subprocess import run  # Requires Python >= 3.7
          from typing import Tuple
<commit_msg>Update itinerant_tester_on_demand.yml<commit_after>name: itinerant_tester_on_demand
on:
  workflow_dispatch:
    inputs:
      repo:
        description: 'Repo to test (user_name/repo_name)'
        required: true

jobs:
  itinerant_tester_on_demand:
    strategy:
      fail-fast: false
      matrix:
        python-version: ['3.10']  # [2.7, 3.5, 3.6, 3.7, 3.8, pypy3]
    runs-on: ubuntu-latest
    steps:
      - run: echo "Testing ${{ github.event.inputs.repo }}..."
      - uses: actions/checkout@v3
        with:
          repository: ${{ github.event.inputs.repo }}
      - uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python-version }}
      - run: pip install --upgrade pip wheel
      - run: pip install bandit black codespell flake8 flake8-2020 flake8-bugbear
                         flake8-comprehensions flake8-return isort mypy pytest pytype
                         pyupgrade safety
      - name: Old-style Python type hints --> com2ann
        run: git grep "# type:" **/*.py
      # tee: write to stdout and also into the file
      - run: bandit --recursive . | tee bandit.out.txt || true
      - name: Customized bandit command
        shell: python
        run: |
          with open("bandit.out.txt") as in_file:
              errors = sorted(
                  set(line[11:15] for line in in_file if line.startswith(">> "))
              )
          skip = f" --skip {','.join(errors)}" if errors else ""
          print(f"bandit --recursive{skip} .")
      - run: |
          black --check . || true
          rm bandit.out.txt
      - run: codespell --count --skip="*.po" || true  # --ignore-words-list="" --skip="*.css,*.js,*.lock,*.map,*.po,*.svg"
      - run: flake8 . --count --select=E9,F63,F7,F82,Y --show-source --statistics
      - run: flake8 . --count --exit-zero --max-line-length=88 --show-source --statistics
      - run: isort --profile black . || true
      - run: pip install -r requirements.txt || pip install --editable . || pip install . || true
      - name: mypy --ignore-missing-imports --install-types --non-interactive . || true
        run: |
          mkdir -p .mypy_cache
          mypy --ignore-missing-imports --install-types --non-interactive . || true
      - run: pytest --doctest-modules . || pytest . || true
      - run: shopt -s globstar && pyupgrade --exit-zero-even-if-changed --py37-plus **/*.py
      - run: safety check
      - shell: python
        run: |
          from subprocess import run  # Requires Python >= 3.7
          from typing import Tuple

{'fraction_non_alphanumeric': 0.140656262505002, 'fraction_numerical': 0.017406962785114045, 'mean_word_length': 1.8549400342661337, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '407336', 'n_tokens_mistral': 1643, 'n_tokens_neox': 1573, 'n_words': 408}