Skip to content

Commit

Permalink
adding pylint hooks for dpbench
Browse files Browse the repository at this point in the history
  • Loading branch information
adarshyoga committed Feb 23, 2024
1 parent 59c1b20 commit 089fc0b
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,25 @@ name: pre-commit

on:
pull_request:
push:
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: pre-commit/[email protected]
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: '3.11'
activate-environment: "coverage"
channel-priority: "disabled"
environment-file: environments/pre-commit.yml
- uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- run: pre-commit run --show-diff-on-failure --color=always --all-files
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,17 @@ repos:
rev: 6.0.0
hooks:
- id: flake8
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
files: ^dpbench/benchmarks
language: system
types: [python]
require_serial: true
args:
[
"-rn", # Only display messages
"-sn", # Don't display the score
]
1 change: 1 addition & 0 deletions environments/conda-linux-sycl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ dependencies:
- libgcc-ng
- libstdcxx-ng
- libgomp
- pylint
1 change: 1 addition & 0 deletions environments/conda-win-sycl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ dependencies:
# https://github.com/scikit-build/scikit-build/issues/981
- setuptools>=42,<64
- pybind11
- pylint
1 change: 1 addition & 0 deletions environments/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ dependencies:
- dpnp
- numba-dpex
- numba-mlir
- pylint
13 changes: 13 additions & 0 deletions environments/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# SPDX-FileCopyrightText: 2022 - 2023 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0

name: dev
channels:
- dppy/label/dev
- intel
- conda-forge
- nodefaults
dependencies:
- pylint
- pre-commit
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,9 @@ VCS = "git"
style = "pep440"
versionfile_source = "dpbench/_version.py"
parentdir_prefix = ""

[tool.pylint]
disable = [
"fixme",
"duplicate-code"
]

0 comments on commit 089fc0b

Please sign in to comment.