From 8b7a8e0274d520cf08275451fdd39ed3688afc76 Mon Sep 17 00:00:00 2001 From: AnihilatorGun Date: Tue, 7 Jan 2025 18:59:53 +0300 Subject: [PATCH] CI --- .flake8 | 4 ++++ .github/workflows/lint.yml | 23 +++++++++++++++++++++++ requirements-dev.txt | 3 --- 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 .flake8 create mode 100644 .github/workflows/lint.yml diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..653028a --- /dev/null +++ b/.flake8 @@ -0,0 +1,4 @@ +[flake8] + +max-line-length = 120 +per-file-ignores = __init__.py: F401 \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..951d456 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,23 @@ +name: Lint + +on: [ pull_request ] + +env: + MODULE_NAME: kerops + +jobs: + lint: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Check python code style + run: | + pip install -r requirements-dev.txt + flake8 . + isort --check . + black --check . \ No newline at end of file diff --git a/requirements-dev.txt b/requirements-dev.txt index 09e76e8..793564c 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,3 @@ -matplotlib -seaborn - black flake8 flake8-tidy-imports