- Notifications
You must be signed in to change notification settings - Fork 5
Merge from master #656
Conversation
Merge from master
Merge pull request #624 from iKostanOrg/master
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Merge from master
Using config file /home/runner/work/codewars/codewars/.pylintrc ************* Module kyu_6.replace_with_alphabet_position.test_replace_with_alphabet_position kyu_6/replace_with_alphabet_position/test_replace_with_alphabet_position.py:68:0: C0304: Final newline missing (missing-final-newline) ************* Module kyu_6.replace_with_alphabet_position.solution kyu_6/replace_with_alphabet_position/solution.py:13:0: W0311: Bad indentation. Found 1 spaces, expected 4 (bad-indentation) kyu_6/replace_with_alphabet_position/solution.py:19:0: W0311: Bad indentation. Found 1 spaces, expected 4 (bad-indentation)
./kyu_6/replace_with_alphabet_position/solution.py:1 at module level: D400: First line should end with a period (not 'n') The [first line of a] docstring is a phrase ending in a period. ./kyu_6/replace_with_alphabet_position/__init__.py:1 at module level: D400: First line should end with a period (not 'n')
bad-indentation / W0311 Message emitted: Bad indentation. Found %s %s, expected %s Description: Used when an unexpected number of indentation's tabulations or spaces has been found. Problematic code: if input(): print('yes') # [bad-indentation] Correct code: if input(): print("yes") Additional details: The option --indent-string can be used to set the indentation unit for this check. The error you're getting is "bad-indentation (W0311)". Since you want tabs, your "editor.insertSpaces": true, should instead be "editor.insertSpaces": false,, and to make pylint accept your usage of tabs for indentation, you need to put the following in a .pylintrc file in the root of your workspace folder: [FORMAT] indent-string=\t
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more Footnotes
|
Reviewer's Guide by SourceryThis pull request includes several enhancements and refactorings across multiple modules. Key changes include improving test coverage with parameterized tests, enhancing code readability by extracting conditional logic and assigning intermediate calculations to variables, and optimizing performance with memoization. Additionally, new GitHub Actions workflows have been added for improved CI/CD. Sequence diagram for Potion mixingsequenceDiagram participant Potion1 participant Potion2 Potion1->>Potion1: mix(Potion2) Potion1->>Potion1: __calc_rgb(Potion2, new_volume) Potion1->>Potion1: Calculate new RGB values Potion1-->>Potion1: Return new Potion with mixed color and volume File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ikostan - I've reviewed your changes - here's some feedback:
Overall Comments:
- The addition of parameterized tests makes the test suite more concise and readable.
- Consider adding a workflow to run tests on the utils directory.
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🟢 Security: all looks good
- 🟡 Testing: 3 issues found
- 🟡 Complexity: 1 issue found
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| | ||
| def test_sudoku_class(self): | ||
| @parameterized.expand([ | ||
| ([[1]], True, 'Testing valid 1x1'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (testing): Duplicated test case
The test case ([[1]], True, 'Testing valid 1x1') appears to be duplicated. Please remove one instance.
kyu_6/replace_with_alphabet_position/test_replace_with_alphabet_position.py Outdated Show resolved Hide resolved
❌ 58 blocking issues (71 total)
@qltysh one-click actions: |
kyu_4/validate_sudoku_with_size/test_sudoku.py @@ -30,7 +31,85 @@ class SudokuTestCase(unittest.TestCase): """Testing Sudoku class.""" def test_sudoku_class(self): @parameterized.expand([ ([[1]], True, 'Testing valid 1x1'), Contributor @sourcery-ai sourcery-ai bot 3 minutes ago issue (testing): Duplicated test case The test case ([[1]], True, 'Testing valid 1x1') appears to be duplicated. Please remove one instance.
kyu_4/validate_sudoku_with_size/test_sudoku.py Comment on lines +39 to +48 ([[7, 8, 4, 1, 5, 9, 3, 2, 6], [5, 3, 9, 6, 7, 2, 8, 4, 1], [6, 1, 2, 4, 3, 8, 7, 5, 9], [9, 2, 8, 7, 1, 5, 4, 6, 3], [3, 5, 7, 8, 4, 6, 1, 9, 2], [4, 6, 1, 9, 2, 3, 5, 8, 7], [8, 7, 6, 3, 9, 4, 2, 1, 5], [2, 4, 3, 5, 6, 1, 9, 7, 8], [1, 9, 5, 2, 8, 7, 6, 3, 4]], True, 'Testing valid 9x9'), ([[1, 4, 2, 3], Contributor @sourcery-ai sourcery-ai bot 5 minutes ago issue (testing): Duplicated test cases Several test cases for valid 9x9 and 4x4 Sudokus, as well as some invalid cases, seem to be duplicated. This redundancy doesn't add value and can increase maintenance effort. Please remove the duplicates.
suggestion (testing): Add test cases with different capitalization and special characters Include test cases with a mix of uppercase and lowercase letters, as well as special characters within and around letters, to ensure correct handling of various input formats. Suggested implementation: @parameterized.expand([ ("", ""), ("123", ""), ("!@#$%^&*()", ""), ("a1!b", "1 2"), ("AbZ!", "1 2 26"), ("Hello World!", "8 5 12 12 15 23 15 18 12 4"), ("TeStInG 123", "20 5 19 20 9 14 7") ]) These changes ensure that test cases now include scenarios with mixed capitalization and special characters, as requested in the comment. kyu_8/dalmatians_101_squash_bugs/README.md The asteval module allows you to evaluate a large subset of the Python language from within a python program, without using `eval()`. It is, in effect, a restricted version of Python’s built-in `eval()`, forbidding several actions, and using from within a python program, without using ` eval() `. It is, in effect, a restricted Contributor @sourcery-ai sourcery-ai bot 10 minutes ago nitpick (typo): Extra space around eval() There's an extra space before and after the backticks around 'eval()'. It should be eval(). Suggested implementation: without using `eval()` Python’s built-in `eval()`
Merge pull request #656 from iKostanOrg/master
Summary by Sourcery
This pull request includes a new kata solution, test improvements, refactorings for readability, and updates to the build and CI pipelines. It introduces a solution for the 'Replace With Alphabet Position' kata and enhances existing tests with parameterized tests and edge cases. The build process is updated to use Python 3.12 and Ubuntu 24.04, and includes new PyType linting workflows. The CI pipeline is configured to ignore specific branches for pull requests and to run pytest after PyType linting.
New Features:
Enhancements:
__calc_rgbmethod in thePotionclass.Build:
python -m pip.python -m.CI:
Tests:
Chores: