From 923c47051a215a034baf30216fce9b55c66cf15d Mon Sep 17 00:00:00 2001 From: MakarandPundlik Date: Thu, 12 Sep 2024 20:09:28 -0400 Subject: [PATCH 01/47] added autopep8 workflow --- __pycache__/rand.cpython-312.pyc | Bin 542 -> 519 bytes test_mergesort.py | 13 +++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 test_mergesort.py diff --git a/__pycache__/rand.cpython-312.pyc b/__pycache__/rand.cpython-312.pyc index 3b1243d117b262b27d7298812150df492919e8bd..4596fb64507ae77a8c872d2acd3f6a46e632ab3b 100644 GIT binary patch delta 113 zcmbQo($2zrnwOW00SGiI9;eNn$SbKJ2jom=NMT4}%wdRPNMTB4Ol6V;ils57Ft@No zF>mzKWMpKXT*2tT$TImTqmGscP?8adizR@>2WCb_#@h_MA6Qrz`Dd`q2%gFLg#pMc I5&%j90396`F#rGn delta 116 zcmZo?na9F=nwOW00SKIDKS+B%kylbf4ak|!kiw9{n8OeSp&6qXQ Date: Thu, 12 Sep 2024 20:10:55 -0400 Subject: [PATCH 02/47] added autopep8 --- .github/workflows/hw-2-workflow.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/hw-2-workflow.yml b/.github/workflows/hw-2-workflow.yml index fb9b458..ac79473 100644 --- a/.github/workflows/hw-2-workflow.yml +++ b/.github/workflows/hw-2-workflow.yml @@ -19,6 +19,17 @@ jobs: run: | python -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Install linting and formatting tools + run: | + pip install ruff autopep8 + - name: Lint with Ruff + run: | + ruff --format=github --target-version=py310 . + continue-on-error: true + - name: Run autopep8 (Check formatting) + run: | + autopep8 --diff --exit-code --recursive . + continue-on-error: true - name: Lint with Ruff run: | pip install ruff @@ -27,6 +38,3 @@ jobs: - name: Test with pytest run: | coverage run -m pytest -v -s - - name: Generate Coverage Report - run: | - coverage report -m From 86c7de240722e43b48fe963e8c1830acba5d1d21 Mon Sep 17 00:00:00 2001 From: MakarandPundlik Date: Thu, 12 Sep 2024 20:15:29 -0400 Subject: [PATCH 03/47] added autopep 8 badge --- README.md | 3 ++- __pycache__/rand.cpython-312.pyc | Bin 519 -> 0 bytes __pycache__/rand.cpython-39.pyc | Bin 407 -> 0 bytes 3 files changed, 2 insertions(+), 1 deletion(-) delete mode 100644 __pycache__/rand.cpython-39.pyc diff --git a/README.md b/README.md index 1575cdb..f386a50 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Language](https://img.shields.io/badge/Python-FFD43B?style=for-the-badge&logo=python&logoColor=blue) ![Platform](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black) -![Unit tests](https://github.com/GradHackersGuild/se-homework/actions/workflows/git-commit-workflow.yml/badge.svg) \ No newline at end of file +![Unit tests](https://github.com/GradHackersGuild/se-homework/actions/workflows/git-commit-workflow.yml/badge.svg) +![PEP8 Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/hw-2-workflow.yml/badge.svg) diff --git a/__pycache__/rand.cpython-312.pyc b/__pycache__/rand.cpython-312.pyc index 4596fb64507ae77a8c872d2acd3f6a46e632ab3b..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 GIT binary patch literal 0 HcmV?d00001 literal 519 zcmYL^yGsK>5XNV3&-hH@3sl5#2!dBA7#k50#77~LCS5oQhr2P+yNm2yh=B+xEP{wA z3Th$PihqiwjjR?zs&s)^SveaMonpRkW_N!(^AZmC0mkfcE%Sg{Q$;6e+caZnZh-+K z4y1r-oN#Rddl`+r`J-@YVCDx5(UK^mcUNkoyNNPZks1>Q!+Dmx$H;hV)v|9a^nT_qnw zW4E!Z*duwIejS>r((2k-s6inz_1Pb(Y&Y>0ZXkM5r0(SWKvEpKg?$1sh;0$U^xd=K l=2^kvt3vIpmiNaoH7FtE9l{M=C(%3oE_vVk1!!9@e*kg*a~c2u diff --git a/__pycache__/rand.cpython-39.pyc b/__pycache__/rand.cpython-39.pyc deleted file mode 100644 index c3a6ec1293f12c044f63de46fe306db88f243b04..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 407 zcmYjNJx>EM47HOxR7#5~#EiP$a22hX5JE^$#x7+#9jcBd{ea#FNlsO(b}B0yzkrRM zUy})miNC;v(*f1ed$wceIdM|2SAp#F?Q7IUfNz)V8l&WjppS_J2%JF#f(iZt5en=> z;QdeqdPBPXZ=52Za81x>L;}`mz~BltxWOB^KUp)w9{HFQ-_hy4GV1VFR7H4htiUPv z0v>sKQjV5;;j|rgPM18)+IIm)hr^^WrILfZG(~9w-})-a#?tbc%xqPc4~5EyQftdq znOVP3)64|i@+NU@Ewr Date: Thu, 12 Sep 2024 20:17:50 -0400 Subject: [PATCH 04/47] changed workflows --- .github/workflows/hw-2-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hw-2-workflow.yml b/.github/workflows/hw-2-workflow.yml index ac79473..4f4b886 100644 --- a/.github/workflows/hw-2-workflow.yml +++ b/.github/workflows/hw-2-workflow.yml @@ -37,4 +37,4 @@ jobs: continue-on-error: true - name: Test with pytest run: | - coverage run -m pytest -v -s + pytest From df4688339dbe15712859bf744ae8863b78d63c26 Mon Sep 17 00:00:00 2001 From: MakarandPundlik Date: Thu, 12 Sep 2024 20:21:49 -0400 Subject: [PATCH 05/47] added pytest installtion --- .github/workflows/hw-2-workflow.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/hw-2-workflow.yml b/.github/workflows/hw-2-workflow.yml index 4f4b886..89539fb 100644 --- a/.github/workflows/hw-2-workflow.yml +++ b/.github/workflows/hw-2-workflow.yml @@ -35,6 +35,12 @@ jobs: pip install ruff ruff --format=github --target-version=py310 . continue-on-error: true + - name: Install pytest + run: | + pip install pytest coverage - name: Test with pytest run: | - pytest + coverage run -m pytest -v -s + - name: Generate Coverage Report + run: | + coverage report -m From 455756eb4152380633c73443837f71bfbfa42875 Mon Sep 17 00:00:00 2001 From: MakarandPundlik Date: Thu, 12 Sep 2024 20:27:14 -0400 Subject: [PATCH 06/47] fixed test case --- test_mergesort.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_mergesort.py b/test_mergesort.py index f18b85f..a3aadc2 100644 --- a/test_mergesort.py +++ b/test_mergesort.py @@ -9,5 +9,5 @@ def test_mergesort2(): assert OP.mergeSort(arr) == [1, 2, 4, 4, 7, 8, 9, 10, 12, 14, 15, 20] def test_mergesort3(): - arr = [8, 12, 2, 4, 1, 14, 10, 15, 16, 7, 9, 10] - assert OP.mergeSort(arr) == [1, 2, 4, 7, 9, 8, 10, 10, 12, 14, 15, 16, 17] \ No newline at end of file + arr = [-10,-17,-5,-5,-3,1,-1000,10] + assert OP.mergeSort(arr) == [-1000, -17, -10, -5, -5, -3, 1, 10] \ No newline at end of file From 93a81578699a931a9a18dc4b7c222f939ed5ad73 Mon Sep 17 00:00:00 2001 From: MakarandPundlik Date: Thu, 12 Sep 2024 20:41:24 -0400 Subject: [PATCH 07/47] splitted single workflow file into 3 --- .github/workflows/autopep.yml | 22 ++++++++++++++++++++++ .github/workflows/static-analysis.yml | 0 .github/workflows/unit-test-cases.yml | 26 ++++++++++++++++++++++++++ README.md | 4 ++-- 4 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/autopep.yml create mode 100644 .github/workflows/static-analysis.yml create mode 100644 .github/workflows/unit-test-cases.yml diff --git a/.github/workflows/autopep.yml b/.github/workflows/autopep.yml new file mode 100644 index 0000000..a56d163 --- /dev/null +++ b/.github/workflows/autopep.yml @@ -0,0 +1,22 @@ +name: HW 2 workflow -> Autopep 8 + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.12"] + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.12" + - name: Install autopep8 + run: | + pip install autopep8 + - name: Run autopep8 + run: | + autopep8 --diff --exit-code --recursive . diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml new file mode 100644 index 0000000..e69de29 diff --git a/.github/workflows/unit-test-cases.yml b/.github/workflows/unit-test-cases.yml new file mode 100644 index 0000000..8ec7ce8 --- /dev/null +++ b/.github/workflows/unit-test-cases.yml @@ -0,0 +1,26 @@ +name: HW 2 workflow -> Unit Test Cases + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.12"] + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + - name: Install Dependencies and pytest + run: | + pip install -r requirements.txt + pip install pytest coverage + - name: Run Unit Tests + run: | + coverage run -m pytest + - name: Generate Coverage Report + run: | + coverage report -m diff --git a/README.md b/README.md index f386a50..4062f13 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Language](https://img.shields.io/badge/Python-FFD43B?style=for-the-badge&logo=python&logoColor=blue) ![Platform](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black) -![Unit tests](https://github.com/GradHackersGuild/se-homework/actions/workflows/git-commit-workflow.yml/badge.svg) -![PEP8 Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/hw-2-workflow.yml/badge.svg) +![Unit tests](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/unit-test-cases.yml/badge.svg) +![PEP8 Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/autopep.yml/badge.svg) From d6e6525c0b1afaf2bcf7cbe017bd1215d7afa10e Mon Sep 17 00:00:00 2001 From: MakarandPundlik Date: Thu, 12 Sep 2024 20:43:55 -0400 Subject: [PATCH 08/47] resolved autopep error --- test_mergesort.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test_mergesort.py b/test_mergesort.py index a3aadc2..acfe032 100644 --- a/test_mergesort.py +++ b/test_mergesort.py @@ -10,4 +10,5 @@ def test_mergesort2(): def test_mergesort3(): arr = [-10,-17,-5,-5,-3,1,-1000,10] - assert OP.mergeSort(arr) == [-1000, -17, -10, -5, -5, -3, 1, 10] \ No newline at end of file + assert OP.mergeSort(arr) == [-1000, -17, -10, -5, -5, -3, 1, 10] + \ No newline at end of file From cfb2c19894d5e2da82ca60fa57c34f3820895d7d Mon Sep 17 00:00:00 2001 From: MakarandPundlik Date: Thu, 12 Sep 2024 20:49:04 -0400 Subject: [PATCH 09/47] fixed workflow --- .github/workflows/unit-test-cases.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-test-cases.yml b/.github/workflows/unit-test-cases.yml index 8ec7ce8..6db7d63 100644 --- a/.github/workflows/unit-test-cases.yml +++ b/.github/workflows/unit-test-cases.yml @@ -16,7 +16,7 @@ jobs: python-version: "3.x" - name: Install Dependencies and pytest run: | - pip install -r requirements.txt + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi pip install pytest coverage - name: Run Unit Tests run: | From a7811d92fff7ec5e9735eac247380754c67fc8e5 Mon Sep 17 00:00:00 2001 From: MakarandPundlik Date: Thu, 12 Sep 2024 20:50:11 -0400 Subject: [PATCH 10/47] deleted old workflow --- .github/workflows/hw-2-workflow.yml | 46 ----------------------------- 1 file changed, 46 deletions(-) delete mode 100644 .github/workflows/hw-2-workflow.yml diff --git a/.github/workflows/hw-2-workflow.yml b/.github/workflows/hw-2-workflow.yml deleted file mode 100644 index 89539fb..0000000 --- a/.github/workflows/hw-2-workflow.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: HW 2 workflow -> unit tests - -on: [push] - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.12"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Install linting and formatting tools - run: | - pip install ruff autopep8 - - name: Lint with Ruff - run: | - ruff --format=github --target-version=py310 . - continue-on-error: true - - name: Run autopep8 (Check formatting) - run: | - autopep8 --diff --exit-code --recursive . - continue-on-error: true - - name: Lint with Ruff - run: | - pip install ruff - ruff --format=github --target-version=py310 . - continue-on-error: true - - name: Install pytest - run: | - pip install pytest coverage - - name: Test with pytest - run: | - coverage run -m pytest -v -s - - name: Generate Coverage Report - run: | - coverage report -m From f5cda640f21983f82726fb8829807b307580d7fe Mon Sep 17 00:00:00 2001 From: MakarandPundlik Date: Thu, 12 Sep 2024 20:51:27 -0400 Subject: [PATCH 11/47] fixed workflow --- .github/workflows/autopep.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/autopep.yml b/.github/workflows/autopep.yml index a56d163..562722a 100644 --- a/.github/workflows/autopep.yml +++ b/.github/workflows/autopep.yml @@ -19,4 +19,4 @@ jobs: pip install autopep8 - name: Run autopep8 run: | - autopep8 --diff --exit-code --recursive . + autopep8 --exit-code --recursive . From 6d93b08faf56068c2b66cc1559ec934851f90133 Mon Sep 17 00:00:00 2001 From: MakarandPundlik Date: Thu, 12 Sep 2024 20:58:30 -0400 Subject: [PATCH 12/47] fixed autopep --- .github/workflows/autopep.yml | 2 +- hw2_debugging.py | 9 +++++---- rand.py | 5 +++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/autopep.yml b/.github/workflows/autopep.yml index 562722a..a56d163 100644 --- a/.github/workflows/autopep.yml +++ b/.github/workflows/autopep.yml @@ -19,4 +19,4 @@ jobs: pip install autopep8 - name: Run autopep8 run: | - autopep8 --exit-code --recursive . + autopep8 --diff --exit-code --recursive . diff --git a/hw2_debugging.py b/hw2_debugging.py index 89ea0ed..475907e 100644 --- a/hw2_debugging.py +++ b/hw2_debugging.py @@ -1,11 +1,13 @@ import rand + def mergeSort(arr): if (len(arr) == 1): return arr - half = len(arr)//2 + half = len(arr) // 2 return recombine(mergeSort(arr[:half]), mergeSort(arr[half:])) + def recombine(leftArr, rightArr): leftIndex = 0 rightIndex = 0 @@ -20,15 +22,14 @@ def recombine(leftArr, rightArr): for i in range(rightIndex, len(rightArr)): mergeArr[leftIndex + i] = rightArr[i] - + for i in range(leftIndex, len(leftArr)): mergeArr[i + rightIndex] = leftArr[i] return mergeArr + arr = rand.random_array([int] * 20) arr_out = mergeSort(arr) print(arr_out) - - diff --git a/rand.py b/rand.py index 207bb9e..bbdaefd 100644 --- a/rand.py +++ b/rand.py @@ -1,7 +1,8 @@ import random -def random_array(arr)-> list[int]: + +def random_array(arr) -> list[int]: shuffled_num = None for i in range(len(arr)): - arr[i] = random.randint(1,20) + arr[i] = random.randint(1, 20) return arr From 69564af1ac3aa89ee451d6e72e7c60a9e7ede4e8 Mon Sep 17 00:00:00 2001 From: MakarandPundlik Date: Thu, 12 Sep 2024 21:01:43 -0400 Subject: [PATCH 13/47] fixed UT autopep --- test_mergesort.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test_mergesort.py b/test_mergesort.py index acfe032..590b751 100644 --- a/test_mergesort.py +++ b/test_mergesort.py @@ -1,14 +1,16 @@ import hw2_debugging as OP + def test_mergesort1(): arr = [10, 12, 2, 4, 1, 14, 10, 15, 16, 7, 9, 10] assert OP.mergeSort(arr) == [1, 2, 4, 7, 9, 10, 10, 10, 12, 14, 15, 16] + def test_mergesort2(): arr = [8, 12, 2, 1, 4, 10, 14, 15, 20, 7, 9, 4] assert OP.mergeSort(arr) == [1, 2, 4, 4, 7, 8, 9, 10, 12, 14, 15, 20] + def test_mergesort3(): - arr = [-10,-17,-5,-5,-3,1,-1000,10] + arr = [-10, -17, -5, -5, -3, 1, -1000, 10] assert OP.mergeSort(arr) == [-1000, -17, -10, -5, -5, -3, 1, 10] - \ No newline at end of file From 36af8cc0ef829dc21d314c44f4094efbfadb8d93 Mon Sep 17 00:00:00 2001 From: michellevarghese <73420769+michellevarghese@users.noreply.github.com> Date: Thu, 12 Sep 2024 21:49:23 -0400 Subject: [PATCH 14/47] Made changes suggested by static analysis tool pylint and pyflakes --- hw2_debugging.py | 67 +++++++++++++++++++++++++++++------------------- 1 file changed, 40 insertions(+), 27 deletions(-) diff --git a/hw2_debugging.py b/hw2_debugging.py index 475907e..55e2a3e 100644 --- a/hw2_debugging.py +++ b/hw2_debugging.py @@ -1,35 +1,48 @@ -import rand +""" +Module implementing the Merge Sort algorithm. +This script contains functions to perform merge sort on a given list and merge two sorted arrays. +""" +import rand -def mergeSort(arr): - if (len(arr) == 1): +def merge_sort(arr): + """ + Recursively divides and sorts an array using the merge sort algorithm. + + :param array: List of integers to be sorted. + :return: Sorted list of integers. + """ + if len(arr) == 1: return arr - half = len(arr) // 2 - return recombine(mergeSort(arr[:half]), mergeSort(arr[half:])) - - -def recombine(leftArr, rightArr): - leftIndex = 0 - rightIndex = 0 - mergeArr = [None] * (len(leftArr) + len(rightArr)) - while leftIndex < len(leftArr) and rightIndex < len(rightArr): - if leftArr[leftIndex] < rightArr[rightIndex]: - mergeArr[leftIndex + rightIndex] = leftArr[leftIndex] - leftIndex += 1 + half = len(arr)//2 + return recombine(merge_sort(arr[:half]), merge_sort(arr[half:])) + +def recombine(left_arr, right_arr): + """ + Merges two sorted arrays into a single sorted array. + + :param left_arr: Left half sorted array. + :param right_arr: Right half sorted array. + :return: Merged sorted array. + """ + left_index = 0 + right_index = 0 + merge_arr = [None] * (len(left_arr) + len(right_arr)) + while left_index < len(left_arr) and right_index < len(right_arr): + if left_arr[left_index] < right_arr[right_index]: + merge_arr[left_index + right_index] = left_arr[left_index] + left_index += 1 else: - mergeArr[leftIndex + rightIndex] = rightArr[rightIndex] - rightIndex += 1 - - for i in range(rightIndex, len(rightArr)): - mergeArr[leftIndex + i] = rightArr[i] - - for i in range(leftIndex, len(leftArr)): - mergeArr[i + rightIndex] = leftArr[i] - - return mergeArr + merge_arr[left_index + right_index] = right_arr[right_index] + right_index += 1 + for i in range(right_index, len(right_arr)): + merge_arr[left_index + i] = right_arr[i] + for i in range(left_index, len(left_arr)): + merge_arr[i + right_index] = left_arr[i] + return merge_arr -arr = rand.random_array([int] * 20) -arr_out = mergeSort(arr) +array = rand.random_array([int] * 20) +arr_out = merge_sort(array) print(arr_out) From 68bc2bff0bf676fa87a0a09a17c4b9ac23296e71 Mon Sep 17 00:00:00 2001 From: michellevarghese <73420769+michellevarghese@users.noreply.github.com> Date: Thu, 12 Sep 2024 21:54:25 -0400 Subject: [PATCH 15/47] Made changes suggested by static analysis tool pylint and pyflakes --- rand.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/rand.py b/rand.py index bbdaefd..d7f4c0c 100644 --- a/rand.py +++ b/rand.py @@ -1,8 +1,18 @@ +""" +Module for generating random arrays. + +This module contains a function to create a list of random integers. +""" + import random +def random_array(arr)-> list[int]: + """ + Fill the provided list with random integers between 1 and 20. -def random_array(arr) -> list[int]: - shuffled_num = None - for i in range(len(arr)): + :param arr: List of integers to be filled with random values. + :return: The list filled with random integers. + """ + for i, _ in enumerate(arr): arr[i] = random.randint(1, 20) return arr From 5809c6e01980e1c5d7e75625ca89b9b508be3792 Mon Sep 17 00:00:00 2001 From: michellevarghese <73420769+michellevarghese@users.noreply.github.com> Date: Thu, 12 Sep 2024 22:01:49 -0400 Subject: [PATCH 16/47] Updated rand.py error --- rand.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rand.py b/rand.py index d7f4c0c..d67224c 100644 --- a/rand.py +++ b/rand.py @@ -6,7 +6,8 @@ import random -def random_array(arr)-> list[int]: + +def random_array(arr) -> list[int]: """ Fill the provided list with random integers between 1 and 20. From f8bf789b79d4ee745c8e8671d17716c0bd7ee5f5 Mon Sep 17 00:00:00 2001 From: michellevarghese <73420769+michellevarghese@users.noreply.github.com> Date: Thu, 12 Sep 2024 22:04:01 -0400 Subject: [PATCH 17/47] Updated test_mergesort.py after static tool analysis --- test_mergesort.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test_mergesort.py b/test_mergesort.py index 590b751..b0f9ad6 100644 --- a/test_mergesort.py +++ b/test_mergesort.py @@ -3,14 +3,14 @@ def test_mergesort1(): arr = [10, 12, 2, 4, 1, 14, 10, 15, 16, 7, 9, 10] - assert OP.mergeSort(arr) == [1, 2, 4, 7, 9, 10, 10, 10, 12, 14, 15, 16] + assert OP.merge_sort(arr) == [1, 2, 4, 7, 9, 10, 10, 10, 12, 14, 15, 16] def test_mergesort2(): arr = [8, 12, 2, 1, 4, 10, 14, 15, 20, 7, 9, 4] - assert OP.mergeSort(arr) == [1, 2, 4, 4, 7, 8, 9, 10, 12, 14, 15, 20] + assert OP.merge_sort(arr) == [1, 2, 4, 4, 7, 8, 9, 10, 12, 14, 15, 20] def test_mergesort3(): arr = [-10, -17, -5, -5, -3, 1, -1000, 10] - assert OP.mergeSort(arr) == [-1000, -17, -10, -5, -5, -3, 1, 10] + assert OP.merge_sort(arr) == [-1000, -17, -10, -5, -5, -3, 1, 10] From 8aa794533fa76e7d6a81f5099316503a97846b20 Mon Sep 17 00:00:00 2001 From: michellevarghese <73420769+michellevarghese@users.noreply.github.com> Date: Thu, 12 Sep 2024 22:08:06 -0400 Subject: [PATCH 18/47] Update hw2_debugging.py after static tool analysis --- hw2_debugging.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw2_debugging.py b/hw2_debugging.py index 55e2a3e..eae3590 100644 --- a/hw2_debugging.py +++ b/hw2_debugging.py @@ -5,22 +5,24 @@ """ import rand + def merge_sort(arr): """ Recursively divides and sorts an array using the merge sort algorithm. - + :param array: List of integers to be sorted. :return: Sorted list of integers. """ if len(arr) == 1: return arr - half = len(arr)//2 + half = len(arr) // 2 return recombine(merge_sort(arr[:half]), merge_sort(arr[half:])) + def recombine(left_arr, right_arr): """ Merges two sorted arrays into a single sorted array. - + :param left_arr: Left half sorted array. :param right_arr: Right half sorted array. :return: Merged sorted array. @@ -42,6 +44,7 @@ def recombine(left_arr, right_arr): merge_arr[i + right_index] = left_arr[i] return merge_arr + array = rand.random_array([int] * 20) arr_out = merge_sort(array) From e67277bf9187db3f908ea6bf0db6a71778ddb0ff Mon Sep 17 00:00:00 2001 From: MakarandPundlik <65530539+MakarandPundlik@users.noreply.github.com> Date: Thu, 12 Sep 2024 22:09:31 -0400 Subject: [PATCH 19/47] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4062f13..644f85c 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,5 @@ ![Platform](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black) ![Unit tests](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/unit-test-cases.yml/badge.svg) ![PEP8 Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/autopep.yml/badge.svg) +![PyLint Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/pylint.yml/badge.svg) +![PyFlake Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/pyflake.yml/badge.svg) From ea641ce6fadaf715df8809d288bce38bd9354c3d Mon Sep 17 00:00:00 2001 From: MakarandPundlik <65530539+MakarandPundlik@users.noreply.github.com> Date: Thu, 12 Sep 2024 22:11:24 -0400 Subject: [PATCH 20/47] Add files via upload --- .github/workflows/autopep.yml | 44 +++++++++++------------ .github/workflows/pyflake.yml | 19 ++++++++++ .github/workflows/pylint.yml | 19 ++++++++++ .github/workflows/unit-test-cases.yml | 52 +++++++++++++-------------- 4 files changed, 86 insertions(+), 48 deletions(-) create mode 100644 .github/workflows/pyflake.yml create mode 100644 .github/workflows/pylint.yml diff --git a/.github/workflows/autopep.yml b/.github/workflows/autopep.yml index a56d163..5b498a0 100644 --- a/.github/workflows/autopep.yml +++ b/.github/workflows/autopep.yml @@ -1,22 +1,22 @@ -name: HW 2 workflow -> Autopep 8 - -on: [push] - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.12"] - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.12" - - name: Install autopep8 - run: | - pip install autopep8 - - name: Run autopep8 - run: | - autopep8 --diff --exit-code --recursive . +name: HW 2 workflow -> Autopep 8 + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.12"] + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.12" + - name: Install autopep8 + run: | + pip install autopep8 + - name: Run autopep8 + run: | + autopep8 --diff --exit-code --recursive . diff --git a/.github/workflows/pyflake.yml b/.github/workflows/pyflake.yml new file mode 100644 index 0000000..03b40b8 --- /dev/null +++ b/.github/workflows/pyflake.yml @@ -0,0 +1,19 @@ +name: Python PyFlakes + +on: [push, pull_request] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.x" + - name: Install dependencies + run: | + pip install pyflakes + - name: Run linters + run: | + pyflakes $(find . -name "*.py") > post_traces/pyflakes_report.txt diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml new file mode 100644 index 0000000..907b4e8 --- /dev/null +++ b/.github/workflows/pylint.yml @@ -0,0 +1,19 @@ +name: Python PyLint + +on: [push, pull_request] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.x" + - name: Install dependencies + run: | + pip install pylint + - name: Run linters + run: | + pylint $(find . -name "*.py") > post_traces/pylint_report.txt diff --git a/.github/workflows/unit-test-cases.yml b/.github/workflows/unit-test-cases.yml index 6db7d63..b737e42 100644 --- a/.github/workflows/unit-test-cases.yml +++ b/.github/workflows/unit-test-cases.yml @@ -1,26 +1,26 @@ -name: HW 2 workflow -> Unit Test Cases - -on: [push] - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.12"] - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.x" - - name: Install Dependencies and pytest - run: | - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - pip install pytest coverage - - name: Run Unit Tests - run: | - coverage run -m pytest - - name: Generate Coverage Report - run: | - coverage report -m +name: HW 2 workflow -> Unit Test Cases + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.12"] + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + - name: Install Dependencies and pytest + run: | + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + pip install pytest coverage + - name: Run Unit Tests + run: | + coverage run -m pytest + - name: Generate Coverage Report + run: | + coverage report -m From 41e0fb5202f2ad15e7df54e98d58f0fbaa83a308 Mon Sep 17 00:00:00 2001 From: MakarandPundlik <65530539+MakarandPundlik@users.noreply.github.com> Date: Thu, 12 Sep 2024 22:11:54 -0400 Subject: [PATCH 21/47] Delete .github/workflows/static-analysis.yml --- .github/workflows/static-analysis.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .github/workflows/static-analysis.yml diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml deleted file mode 100644 index e69de29..0000000 From 7e2a3fd885960b4fed2765a2d91f5456bb32e59a Mon Sep 17 00:00:00 2001 From: MakarandPundlik Date: Thu, 12 Sep 2024 22:16:58 -0400 Subject: [PATCH 22/47] added post traces --- post_traces/dummy.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 post_traces/dummy.txt diff --git a/post_traces/dummy.txt b/post_traces/dummy.txt new file mode 100644 index 0000000..e69de29 From e632155c5c63b894972bc9aab382a7d30cb312cb Mon Sep 17 00:00:00 2001 From: MakarandPundlik Date: Thu, 12 Sep 2024 22:21:17 -0400 Subject: [PATCH 23/47] d --- .github/workflows/pylint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 907b4e8..10e37c8 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -16,4 +16,4 @@ jobs: pip install pylint - name: Run linters run: | - pylint $(find . -name "*.py") > post_traces/pylint_report.txt + pylint $(find . -name "*.py") From bff8cbc82db4841d7b9dd7eef0b3819bd0795315 Mon Sep 17 00:00:00 2001 From: MakarandPundlik Date: Thu, 12 Sep 2024 22:26:48 -0400 Subject: [PATCH 24/47] resolved pylint errors --- test_mergesort.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test_mergesort.py b/test_mergesort.py index b0f9ad6..331fd3d 100644 --- a/test_mergesort.py +++ b/test_mergesort.py @@ -1,16 +1,28 @@ +""" +Module implementing the unit test cases for Merge Sort algorithm. +""" import hw2_debugging as OP def test_mergesort1(): + """ + Takes array of random integers and checks whether it is sorted or not + """ arr = [10, 12, 2, 4, 1, 14, 10, 15, 16, 7, 9, 10] assert OP.merge_sort(arr) == [1, 2, 4, 7, 9, 10, 10, 10, 12, 14, 15, 16] def test_mergesort2(): + """ + Takes array of random integers and checks whether it is sorted or not + """ arr = [8, 12, 2, 1, 4, 10, 14, 15, 20, 7, 9, 4] assert OP.merge_sort(arr) == [1, 2, 4, 4, 7, 8, 9, 10, 12, 14, 15, 20] def test_mergesort3(): + """ + Takes array of random integers and checks whether it is sorted or not + """ arr = [-10, -17, -5, -5, -3, 1, -1000, 10] assert OP.merge_sort(arr) == [-1000, -17, -10, -5, -5, -3, 1, 10] From fe32bc2b7531f98dddb58b1a6d029169975cd697 Mon Sep 17 00:00:00 2001 From: michellevarghese <73420769+michellevarghese@users.noreply.github.com> Date: Thu, 12 Sep 2024 22:30:54 -0400 Subject: [PATCH 25/47] Add files via upload --- post_traces/pyflakes_output_hw2_debugging.txt | 0 post_traces/pyflakes_output_rand.txt | 0 post_traces/pylint_output_hw2_debugging.txt | 4 ++++ post_traces/pylint_output_rand.txt | 4 ++++ 4 files changed, 8 insertions(+) create mode 100644 post_traces/pyflakes_output_hw2_debugging.txt create mode 100644 post_traces/pyflakes_output_rand.txt create mode 100644 post_traces/pylint_output_hw2_debugging.txt create mode 100644 post_traces/pylint_output_rand.txt diff --git a/post_traces/pyflakes_output_hw2_debugging.txt b/post_traces/pyflakes_output_hw2_debugging.txt new file mode 100644 index 0000000..e69de29 diff --git a/post_traces/pyflakes_output_rand.txt b/post_traces/pyflakes_output_rand.txt new file mode 100644 index 0000000..e69de29 diff --git a/post_traces/pylint_output_hw2_debugging.txt b/post_traces/pylint_output_hw2_debugging.txt new file mode 100644 index 0000000..d7495ee --- /dev/null +++ b/post_traces/pylint_output_hw2_debugging.txt @@ -0,0 +1,4 @@ + +-------------------------------------------------------------------- +Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00) + diff --git a/post_traces/pylint_output_rand.txt b/post_traces/pylint_output_rand.txt new file mode 100644 index 0000000..d7495ee --- /dev/null +++ b/post_traces/pylint_output_rand.txt @@ -0,0 +1,4 @@ + +-------------------------------------------------------------------- +Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00) + From 4e4557b9a47ac06676ee9240e0f9a498836096f9 Mon Sep 17 00:00:00 2001 From: michellevarghese <73420769+michellevarghese@users.noreply.github.com> Date: Thu, 12 Sep 2024 22:39:21 -0400 Subject: [PATCH 26/47] Create pylint_output_test_mergesort.txt --- post_traces/pylint_output_test_mergesort.txt | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 post_traces/pylint_output_test_mergesort.txt diff --git a/post_traces/pylint_output_test_mergesort.txt b/post_traces/pylint_output_test_mergesort.txt new file mode 100644 index 0000000..4d30f7f --- /dev/null +++ b/post_traces/pylint_output_test_mergesort.txt @@ -0,0 +1,6 @@ +************* Module test_mergesort +test_mergesort.py:1:0: C0114: Missing module docstring (missing-module-docstring) +test_mergesort.py:2:0: W0105: String statement has no effect (pointless-string-statement) + +------------------------------------------------------------------ +Your code has been rated at 8.18/10 (previous run: 6.00/10, +2.18) From 93f8f28a0ddd8fd9e1d2649ec5c9597ff395e531 Mon Sep 17 00:00:00 2001 From: michellevarghese <73420769+michellevarghese@users.noreply.github.com> Date: Thu, 12 Sep 2024 22:40:50 -0400 Subject: [PATCH 27/47] Update pylint_output_test_mergesort.txt after static tool analysis From 380185af3636fd28d3d50b0045ee43fa333f2810 Mon Sep 17 00:00:00 2001 From: Varun Varatharajan <59575040+V4run14@users.noreply.github.com> Date: Fri, 13 Sep 2024 08:11:13 +0530 Subject: [PATCH 28/47] Update pyflakes_output_rand.txt --- post_traces/pyflakes_output_rand.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/post_traces/pyflakes_output_rand.txt b/post_traces/pyflakes_output_rand.txt index e69de29..46e6bea 100644 --- a/post_traces/pyflakes_output_rand.txt +++ b/post_traces/pyflakes_output_rand.txt @@ -0,0 +1 @@ +rand.py:4:5: local variable 'shuffled_num' is assigned to but never used From 1c9fe4a8ac6550c7209881c64d00f199f59f026b Mon Sep 17 00:00:00 2001 From: michellevarghese <73420769+michellevarghese@users.noreply.github.com> Date: Thu, 12 Sep 2024 22:51:36 -0400 Subject: [PATCH 29/47] Delete post_traces/pylint_output_test_mergesort.txt --- post_traces/pylint_output_test_mergesort.txt | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 post_traces/pylint_output_test_mergesort.txt diff --git a/post_traces/pylint_output_test_mergesort.txt b/post_traces/pylint_output_test_mergesort.txt deleted file mode 100644 index 4d30f7f..0000000 --- a/post_traces/pylint_output_test_mergesort.txt +++ /dev/null @@ -1,6 +0,0 @@ -************* Module test_mergesort -test_mergesort.py:1:0: C0114: Missing module docstring (missing-module-docstring) -test_mergesort.py:2:0: W0105: String statement has no effect (pointless-string-statement) - ------------------------------------------------------------------- -Your code has been rated at 8.18/10 (previous run: 6.00/10, +2.18) From de9422acacef13a6877eef466e99d1403d7368de Mon Sep 17 00:00:00 2001 From: michellevarghese <73420769+michellevarghese@users.noreply.github.com> Date: Thu, 12 Sep 2024 22:54:11 -0400 Subject: [PATCH 30/47] Updated pyflakes_output_rand.txt after static tool changes --- post_traces/pyflakes_output_rand.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/post_traces/pyflakes_output_rand.txt b/post_traces/pyflakes_output_rand.txt index 46e6bea..d3f5a12 100644 --- a/post_traces/pyflakes_output_rand.txt +++ b/post_traces/pyflakes_output_rand.txt @@ -1 +1 @@ -rand.py:4:5: local variable 'shuffled_num' is assigned to but never used + From 290f52a023eb9a8945f85d3f1fbf58ff81e36cbc Mon Sep 17 00:00:00 2001 From: michellevarghese <73420769+michellevarghese@users.noreply.github.com> Date: Thu, 12 Sep 2024 22:56:35 -0400 Subject: [PATCH 31/47] Update pylint_output_hw2_debugging.txt --- post_traces/pylint_output_hw2_debugging.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/post_traces/pylint_output_hw2_debugging.txt b/post_traces/pylint_output_hw2_debugging.txt index d7495ee..8b13789 100644 --- a/post_traces/pylint_output_hw2_debugging.txt +++ b/post_traces/pylint_output_hw2_debugging.txt @@ -1,4 +1 @@ --------------------------------------------------------------------- -Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00) - From c3740993ed564efa98bda1fb18ac2f043ffaf88a Mon Sep 17 00:00:00 2001 From: michellevarghese <73420769+michellevarghese@users.noreply.github.com> Date: Thu, 12 Sep 2024 23:02:45 -0400 Subject: [PATCH 32/47] Updated pylint_output_hw2_debugging.txt after static tool changes --- post_traces/pylint_output_hw2_debugging.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/post_traces/pylint_output_hw2_debugging.txt b/post_traces/pylint_output_hw2_debugging.txt index 8b13789..d7495ee 100644 --- a/post_traces/pylint_output_hw2_debugging.txt +++ b/post_traces/pylint_output_hw2_debugging.txt @@ -1 +1,4 @@ +-------------------------------------------------------------------- +Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00) + From 9b6592c7b9ab3e65fa34a40cea68c5c6018ee6fe Mon Sep 17 00:00:00 2001 From: michellevarghese <73420769+michellevarghese@users.noreply.github.com> Date: Thu, 12 Sep 2024 23:05:45 -0400 Subject: [PATCH 33/47] Update pylint_output_rand.txt --- post_traces/pylint_output_rand.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/post_traces/pylint_output_rand.txt b/post_traces/pylint_output_rand.txt index d7495ee..8b13789 100644 --- a/post_traces/pylint_output_rand.txt +++ b/post_traces/pylint_output_rand.txt @@ -1,4 +1 @@ --------------------------------------------------------------------- -Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00) - From e433b0d9c74a7bb95ce2ee3f00121bab35b467c4 Mon Sep 17 00:00:00 2001 From: michellevarghese <73420769+michellevarghese@users.noreply.github.com> Date: Thu, 12 Sep 2024 23:06:13 -0400 Subject: [PATCH 34/47] Updated pylint_output_rand.txt after static tool changes --- post_traces/pylint_output_rand.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/post_traces/pylint_output_rand.txt b/post_traces/pylint_output_rand.txt index 8b13789..d7495ee 100644 --- a/post_traces/pylint_output_rand.txt +++ b/post_traces/pylint_output_rand.txt @@ -1 +1,4 @@ +-------------------------------------------------------------------- +Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00) + From 1a81bc6f5c894de776f550614c5bd8ece4a91a9b Mon Sep 17 00:00:00 2001 From: michellevarghese <73420769+michellevarghese@users.noreply.github.com> Date: Thu, 12 Sep 2024 23:06:48 -0400 Subject: [PATCH 35/47] Delete post_traces/dummy.txt --- post_traces/dummy.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 post_traces/dummy.txt diff --git a/post_traces/dummy.txt b/post_traces/dummy.txt deleted file mode 100644 index e69de29..0000000 From a13059ce19635981d1e2bffb40600958297a4413 Mon Sep 17 00:00:00 2001 From: michellevarghese <73420769+michellevarghese@users.noreply.github.com> Date: Thu, 12 Sep 2024 23:07:20 -0400 Subject: [PATCH 36/47] Update pyflakes_output_hw2_debugging.txt --- post_traces/pyflakes_output_hw2_debugging.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/post_traces/pyflakes_output_hw2_debugging.txt b/post_traces/pyflakes_output_hw2_debugging.txt index e69de29..73fbd95 100644 --- a/post_traces/pyflakes_output_hw2_debugging.txt +++ b/post_traces/pyflakes_output_hw2_debugging.txt @@ -0,0 +1 @@ +. From c39557133e8b04ce394de8f3b4bcefa74f6c3666 Mon Sep 17 00:00:00 2001 From: michellevarghese <73420769+michellevarghese@users.noreply.github.com> Date: Thu, 12 Sep 2024 23:07:53 -0400 Subject: [PATCH 37/47] Updated pyflakes_output_hw2_debugging.txt after static tool changes --- post_traces/pyflakes_output_hw2_debugging.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/post_traces/pyflakes_output_hw2_debugging.txt b/post_traces/pyflakes_output_hw2_debugging.txt index 73fbd95..d3f5a12 100644 --- a/post_traces/pyflakes_output_hw2_debugging.txt +++ b/post_traces/pyflakes_output_hw2_debugging.txt @@ -1 +1 @@ -. + From 1f9072bd8d1869124242ef93e7ce5c8fa265eb73 Mon Sep 17 00:00:00 2001 From: michellevarghese <73420769+michellevarghese@users.noreply.github.com> Date: Thu, 12 Sep 2024 23:50:47 -0400 Subject: [PATCH 38/47] Updated test_merge_sort traces after static tool changes --- post_traces/autopep8_output_test_merge_sort.txt | 0 post_traces/pyflakes_output_test_merge_sort.txt | 0 post_traces/pylint_output_test_merge_sort.txt | 4 ++++ 3 files changed, 4 insertions(+) create mode 100644 post_traces/autopep8_output_test_merge_sort.txt create mode 100644 post_traces/pyflakes_output_test_merge_sort.txt create mode 100644 post_traces/pylint_output_test_merge_sort.txt diff --git a/post_traces/autopep8_output_test_merge_sort.txt b/post_traces/autopep8_output_test_merge_sort.txt new file mode 100644 index 0000000..e69de29 diff --git a/post_traces/pyflakes_output_test_merge_sort.txt b/post_traces/pyflakes_output_test_merge_sort.txt new file mode 100644 index 0000000..e69de29 diff --git a/post_traces/pylint_output_test_merge_sort.txt b/post_traces/pylint_output_test_merge_sort.txt new file mode 100644 index 0000000..3837ed3 --- /dev/null +++ b/post_traces/pylint_output_test_merge_sort.txt @@ -0,0 +1,4 @@ + +------------------------------------------------------------------- +Your code has been rated at 10.00/10 (previous run: 8.18/10, +1.82) + From c4c710ab68ffa5d6723922fe16c2bcc2a8cb26a8 Mon Sep 17 00:00:00 2001 From: michellevarghese <73420769+michellevarghese@users.noreply.github.com> Date: Thu, 19 Sep 2024 01:12:03 -0400 Subject: [PATCH 39/47] Updated badges --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 644f85c..7d1dc39 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) -![Language](https://img.shields.io/badge/Python-FFD43B?style=for-the-badge&logo=python&logoColor=blue) -![Platform](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black) +[![Language](https://img.shields.io/badge/Python-FFD43B?style=for-the-badge&logo=python&logoColor=blue)](https://www.python.org/) +[![Platform](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black)](https://www.linux.org/) ![Unit tests](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/unit-test-cases.yml/badge.svg) ![PEP8 Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/autopep.yml/badge.svg) ![PyLint Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/pylint.yml/badge.svg) From 53df01fe451883a1ef19893236b41922aaebca93 Mon Sep 17 00:00:00 2001 From: michellevarghese <73420769+michellevarghese@users.noreply.github.com> Date: Thu, 19 Sep 2024 01:17:12 -0400 Subject: [PATCH 40/47] Updated unit test badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7d1dc39..4b5d6a3 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Language](https://img.shields.io/badge/Python-FFD43B?style=for-the-badge&logo=python&logoColor=blue)](https://www.python.org/) [![Platform](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black)](https://www.linux.org/) -![Unit tests](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/unit-test-cases.yml/badge.svg) +[![Unit tests](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/unit-test-cases.yml/badge.svg)](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/unit-test-cases.yml) ![PEP8 Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/autopep.yml/badge.svg) ![PyLint Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/pylint.yml/badge.svg) ![PyFlake Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/pyflake.yml/badge.svg) From 2657dd9f90ed2e3077c71d33cd007cef581333ce Mon Sep 17 00:00:00 2001 From: michellevarghese <73420769+michellevarghese@users.noreply.github.com> Date: Thu, 19 Sep 2024 01:21:48 -0400 Subject: [PATCH 41/47] Update autopep.yml --- .github/workflows/autopep.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/autopep.yml b/.github/workflows/autopep.yml index 5b498a0..6d1fec5 100644 --- a/.github/workflows/autopep.yml +++ b/.github/workflows/autopep.yml @@ -1,4 +1,4 @@ -name: HW 2 workflow -> Autopep 8 +name: Autopep 8 on: [push] From ad3deaab61ddf2eb2d8ea1c9f6d754fda80604e2 Mon Sep 17 00:00:00 2001 From: michellevarghese <73420769+michellevarghese@users.noreply.github.com> Date: Thu, 19 Sep 2024 01:24:31 -0400 Subject: [PATCH 42/47] Updated unit-test-cases.yml name --- .github/workflows/unit-test-cases.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-test-cases.yml b/.github/workflows/unit-test-cases.yml index b737e42..2d64777 100644 --- a/.github/workflows/unit-test-cases.yml +++ b/.github/workflows/unit-test-cases.yml @@ -1,4 +1,4 @@ -name: HW 2 workflow -> Unit Test Cases +name: Unit Test Cases on: [push] From 86413037e4f3292280b053563b5c4ff0ba7f63e4 Mon Sep 17 00:00:00 2001 From: michellevarghese <73420769+michellevarghese@users.noreply.github.com> Date: Thu, 19 Sep 2024 01:29:31 -0400 Subject: [PATCH 43/47] Updated Static Analysis tools badges --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4b5d6a3..0c4974c 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,6 @@ [![Language](https://img.shields.io/badge/Python-FFD43B?style=for-the-badge&logo=python&logoColor=blue)](https://www.python.org/) [![Platform](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black)](https://www.linux.org/) [![Unit tests](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/unit-test-cases.yml/badge.svg)](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/unit-test-cases.yml) -![PEP8 Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/autopep.yml/badge.svg) -![PyLint Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/pylint.yml/badge.svg) -![PyFlake Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/pyflake.yml/badge.svg) +[![PEP8 Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/autopep.yml/badge.svg)](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/autopep.yml) +[![PyLint Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/pylint.yml/badge.svg)](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/pylint.yml) +[![PyFlake Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/pyflake.yml/badge.svg)](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/pyflake.yml) From df79da242b510bcd5c49ce92e8b9283bbb0b4bda Mon Sep 17 00:00:00 2001 From: MakarandPundlik Date: Thu, 3 Oct 2024 02:59:52 -0400 Subject: [PATCH 44/47] updated readme file --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0c4974c..aa7611c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +Group No 38 [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Language](https://img.shields.io/badge/Python-FFD43B?style=for-the-badge&logo=python&logoColor=blue)](https://www.python.org/) [![Platform](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black)](https://www.linux.org/) From 1e6e02664b809e2a2647ab4da88cb3715debc0ef Mon Sep 17 00:00:00 2001 From: MakarandPundlik Date: Thu, 3 Oct 2024 03:04:18 -0400 Subject: [PATCH 45/47] updated readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0c4974c..93a8931 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +Group 38 - SE Homwork 2 [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Language](https://img.shields.io/badge/Python-FFD43B?style=for-the-badge&logo=python&logoColor=blue)](https://www.python.org/) [![Platform](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black)](https://www.linux.org/) From af90fbb9348d7af8fc350c89846de63a7f1888c3 Mon Sep 17 00:00:00 2001 From: MakarandPundlik <65530539+MakarandPundlik@users.noreply.github.com> Date: Wed, 2 Oct 2024 23:08:24 -0400 Subject: [PATCH 46/47] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 45f3cdd..3534b89 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,4 @@ Group 38 - SE Homwork 2 [![PEP8 Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/autopep.yml/badge.svg)](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/autopep.yml) [![PyLint Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/pylint.yml/badge.svg)](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/pylint.yml) [![PyFlake Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/pyflake.yml/badge.svg)](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/pyflake.yml) +[![codecov](https://codecov.io/gh/GradHackersGuild/se-homework-2/graph/badge.svg?token=8RXQY068G7)](https://codecov.io/gh/GradHackersGuild/se-homework-2) From 2cc87963121f91b4d8c368b1f6427b6de7b86828 Mon Sep 17 00:00:00 2001 From: MakarandPundlik <65530539+MakarandPundlik@users.noreply.github.com> Date: Wed, 2 Oct 2024 23:14:11 -0400 Subject: [PATCH 47/47] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 3534b89..45f3cdd 100644 --- a/README.md +++ b/README.md @@ -7,4 +7,3 @@ Group 38 - SE Homwork 2 [![PEP8 Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/autopep.yml/badge.svg)](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/autopep.yml) [![PyLint Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/pylint.yml/badge.svg)](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/pylint.yml) [![PyFlake Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/pyflake.yml/badge.svg)](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/pyflake.yml) -[![codecov](https://codecov.io/gh/GradHackersGuild/se-homework-2/graph/badge.svg?token=8RXQY068G7)](https://codecov.io/gh/GradHackersGuild/se-homework-2)