File: lint_python.yml

package info (click to toggle)
mir-eval 0.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,784 kB
  • sloc: python: 8,364; javascript: 261; makefile: 154
file content (71 lines) | stat: -rw-r--r-- 1,982 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: lint_python
on: [pull_request, push]
jobs:
  lint_python:
    name: "Lint and code analysis"
    runs-on: ubuntu-latest
    strategy:
      fail-fast: true
      matrix:
        include:
          - os: ubuntu-latest
            python-version: "3.11"
            channel-priority: "flexible"
            envfile: ".github/environment-lint.yml"
    steps:
    - uses: actions/checkout@v4
      with:
        fetch-depth: 0
    - name: Cache conda
      uses: actions/cache@v4
      env:
        CACHE_NUMBER: 0
      with:
        path: ~/conda_pkgs_dir
        key: ${{ runner.os }}-${{ matrix.python-version }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles( matrix.envfile ) }}
    - name: Install conda environmnent
      uses: conda-incubator/setup-miniconda@v3
      with: 
        auto-update-conda: false
        python-version: ${{ matrix.python-version }}
        add-pip-as-python-dependency: true
        auto-activate-base: false
        activate-environment: lint
        # mamba-version: "*"
        channel-priority: ${{ matrix.channel-priority }}
        environment-file: ${{ matrix.envfile }}
        use-only-tar-bz2: false 

    - name: Conda info
      shell: bash -l {0}
      run: |
        conda info -a
        conda list

    - name: Spell check package
      shell: bash -l {0}
      run: codespell --ignore-words .codespell_ignore_list mir_eval

    - name: Security check
      shell: bash -l {0}
      run: bandit --recursive --skip B101,B110 .

    - name: Style check package
      shell: bash -l {0}
      run: python -m flake8 mir_eval
    
    - name: Format check package
      shell: bash -l {0}
      run: python -m black --check mir_eval

    - name: Format check tests
      shell: bash -l {0}
      run: python -m black --check tests

    - name: Docstring check
      shell: bash -l {0}
      run: python -m velin --check mir_eval
    
    - name: Docstring style check
      shell: bash -l {0}
      run: python -m pydocstyle mir_eval