<commit_before># This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python mk package

on:
  push:
#    branches: [ develop ]
  pull_request:
    branches: [ develop ]

jobs:
  build:

    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.8, 3.9]

    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 with poetry
      run: |
        python -m pip install poetry
        poetry install

    - name: Check code style with black
      run: |
        poetry run black --check .

    - name: Check code imports style with isort
      run: |
        poetry run isort --check-only --recursive .

    - name: Check code with pylint
      run: |
        poetry run pylint mk test

    - name: Check code typing with mypy
      run: |
        poetry run mypy --ignore-missing-imports .

    - name: Test with pytest
      run: |
        poetry run pytest

    - name: Check package vulnerabilities with safety
      run: |
        poetry run safety check

    - name: Check code vulnerabilities with bandit
      run: |
        poetry run bandit -ll -ii -r .<commit_msg>build: fix tests<commit_after># This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python mk package

on:
  push:
#    branches: [ develop ]
  pull_request:
    branches: [ develop ]

jobs:
  build:

    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.8, 3.9]

    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 with poetry
      run: |
        python -m pip install --upgrade pip
        python -m pip install poetry
        poetry install

    - name: Check code style with black
      run: |
        poetry run black --check .

    - name: Check code imports style with isort
      run: |
        poetry run isort --check-only --recursive .

    - name: Check package vulnerabilities with safety
      run: |
        poetry run safety check

    - name: Check code vulnerabilities with bandit
      run: |
        poetry run bandit -ll -ii -r .

    - name: Check code with pylint
      run: |
        poetry run pylint mk tests

    - name: Check code typing with mypy
      run: |
        poetry run mypy --ignore-missing-imports .

    - name: Test with pytest
      run: |
        poetry run pytest .
{'fraction_non_alphanumeric': 0.08711864406779661, 'fraction_numerical': 0.004067796610169492, 'mean_word_length': 2.093291404612159, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3206015', 'n_tokens_mistral': 864, 'n_tokens_neox': 844, 'n_words': 300}