From d5a21ec22f6e680ab35c39d23d6942e69f736f77 Mon Sep 17 00:00:00 2001 From: Tatiana Muromtseva Date: Thu, 16 Oct 2025 21:29:17 +0300 Subject: [PATCH 1/6] Add Ruff linting via GitHub Actions --- .github/workflows/ruff.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/ruff.yml diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml new file mode 100644 index 0000000..807dc37 --- /dev/null +++ b/.github/workflows/ruff.yml @@ -0,0 +1,18 @@ +name: Ruff +on: push +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: "3.13.7" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install ruff + # Update output format to enable automatic inline annotations. + - name: Run Ruff + run: ruff check --output-format=github . From 9b621e81a7e255ac87a35fae4b16e0bdb9a02fae Mon Sep 17 00:00:00 2001 From: Tatiana Muromtseva Date: Fri, 17 Oct 2025 00:27:19 +0300 Subject: [PATCH 2/6] Add Ruff configuration file --- pyproject.toml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..098a5bd --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,15 @@ +[tool.ruff.lint] + extend-select = [ + "F", # Правила Pyflakes + "W", # Предупреждения PyCodeStyle + "E", # Ошибки PyCodeStyle + "I", # Правильно сортировать импорты + "N", # Нейминг + "UP", # Предупреждать, если что-то можно изменить из-за новых версий Python + "C4", # Ловить неправильное использование comprehensions, dict, list и т.д. + "FA", # Применять from future import annotations + "ISC", # Хорошее использование конкатенации строк + "ICN", # Использовать общие соглашения об импорте + "RET", # Хорошие практики возврата + "SIM", # Общие правила упрощения + ] From c4feaa03ec80502171e8111207b3b8b87ea0496d Mon Sep 17 00:00:00 2001 From: Tatiana Muromtseva Date: Fri, 17 Oct 2025 02:16:41 +0300 Subject: [PATCH 3/6] Update main.yml (before it was ruff.yml) --- .github/workflows/main.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..1d5065d --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,19 @@ +name: Ruff +on: push +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: "3.13.7" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install ruff pytest + - name: Run Ruff + run: ruff check --output-format=github . + - name: Run unit-tests + run: python -m pytest test/* From 86896570cd47b4d1f072293efcdc9939d8495f27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A2=D0=B0=D1=82=D1=8C=D1=8F=D0=BD=D0=B0=20=D0=9C=D1=83?= =?UTF-8?q?=D1=80=D0=BE=D0=BC=D1=86=D0=B5=D0=B2=D0=B0?= Date: Fri, 17 Oct 2025 02:19:53 +0300 Subject: [PATCH 4/6] Delete .github/workflows/ruff.yml --- .github/workflows/ruff.yml | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 .github/workflows/ruff.yml diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml deleted file mode 100644 index 807dc37..0000000 --- a/.github/workflows/ruff.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Ruff -on: push -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install Python - uses: actions/setup-python@v5 - with: - python-version: "3.13.7" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install ruff - # Update output format to enable automatic inline annotations. - - name: Run Ruff - run: ruff check --output-format=github . From ae8740dd291a5293aa37343815d8400f0d370267 Mon Sep 17 00:00:00 2001 From: Tatiana Muromtseva Date: Mon, 10 Nov 2025 19:05:44 +0300 Subject: [PATCH 5/6] =?UTF-8?q?=D0=B5=D1=89=D0=B5=20=D0=BE=D0=B4=D0=BD?= =?UTF-8?q?=D0=B0=20=D0=BF=D0=BE=D0=BF=D1=8B=D1=82=D0=BA=D0=B0=20=D0=BF?= =?UTF-8?q?=D0=BE=D1=87=D0=B8=D0=BD=D0=B8=D1=82=D1=8C=20=D1=83=D0=BF=D0=B0?= =?UTF-8?q?=D0=B2=D1=88=D0=B8=D0=B5=20=D1=82=D0=B5=D1=81=D1=82=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/conftest.py | 3 ++- tests/heap_sort.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 2285f0a..d28a7a3 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,6 +1,7 @@ -import pytest import random +import pytest + @pytest.fixture def random_array(): diff --git a/tests/heap_sort.py b/tests/heap_sort.py index 59929f2..b9e12c8 100644 --- a/tests/heap_sort.py +++ b/tests/heap_sort.py @@ -1,4 +1,5 @@ import pytest + from src.heap_sort import heap_sort From 8bf495ce70338f42621ff3682b2a85524c459373 Mon Sep 17 00:00:00 2001 From: Tatiana Muromtseva Date: Mon, 10 Nov 2025 20:00:28 +0300 Subject: [PATCH 6/6] Fix pytest path in CI --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1d5065d..56c2ac4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,4 +16,4 @@ jobs: - name: Run Ruff run: ruff check --output-format=github . - name: Run unit-tests - run: python -m pytest test/* + run: python -m pytest tests/*