-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge pull request #605 from iKostanOrg/master #606
Conversation
Merge from master
Reviewer's Guide by SourceryThis pull request implements the "Conversion between Kilobyte and KibiByte" kata and merges changes from the master branch. The implementation involves creating a conversion function that handles various memory size units (kB, MB, GB, TB, KiB, MiB, GiB, TiB) and performs the conversion with appropriate rounding. A helper function extracts the unit and conversion ratio from the input string. The solution also includes unit tests to verify the correctness of the implementation. Sequence diagram for memory size conversion processsequenceDiagram
participant Client
participant Converter
participant UnitExtractor
Client->>Converter: memorysize_conversion('10 KiB')
Converter->>UnitExtractor: unit_extractor('10 KiB')
UnitExtractor-->>Converter: return ('kB', 1.024)
Converter->>Converter: Convert value using ratio
Converter->>Converter: Format result
Converter-->>Client: return '10.24 kB'
Class diagram for memory size conversion implementationclassDiagram
class MemorySizeConverter {
+UNITS: dict
+memorysize_conversion(memory_size: str) -> str
+unit_extractor(memory_size: str) -> tuple
}
note for MemorySizeConverter "UNITS dictionary maps between
KiB/kB units and their conversion ratios"
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.
We have skipped reviewing this pull request. Here's why:
- We don't review packaging changes - Let us know if you'd like us to change this.
- All of the files are larger than we can process. We're working on it!
Code Climate has analyzed commit ffb0bdd and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 90.5% (0.0% change). View more on Code Climate. |
/kyu_6/conversion_between_kilobyte_and_kibibyte/solution.py:52:28: W292 no newline at end of file return units, convertor ^ ./kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py:65:17: E131 continuation line unaligned for hanging indent "<li>10 KiB -> 10.24 kB</li>" ^ ./kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py:65:46: W291 trailing whitespace "<li>10 KiB -> 10.24 kB</li>" ^ ./kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py:66:45: W291 trailing whitespace "<li>1 kB -> 0.977 KiB</li>" ^ ./kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py:67:46: W291 trailing whitespace "<li>10 TB -> 9.095 TiB</li>"
./kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py:65:17: E131 continuation line unaligned for hanging indent "<li>10 KiB -> 10.24 kB</li>" ^ ./kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py:66:45: W291 trailing whitespace "<li>1 kB -> 0.977 KiB</li>"
Using config file /home/runner/work/codewars/codewars/.pylintrc ************* Module kyu_6.rotate_the_letters_of_each_element.group_cities kyu_6/rotate_the_letters_of_each_element/group_cities.py:1:0: R0801: Similar lines in 2 files ==kyu_6.a_rule_of_divisibility_by_13.test_thirt:[16:21] ==kyu_6.conversion_between_kilobyte_and_kibibyte.test_memory_size_conversion:[18:23] @allure.epic('6 kyu') @allure.parent_suite('Novice') @allure.suite("Fundamentals") @allure.sub_suite("Unit Tests") @allure.feature("Math") (duplicate-code)
@sourcery-ai review |
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:
- There are duplicate entry numbers in the table (two Bump sphinxcontrib-htmlhelp from 1.0.2 to 1.0.3 #8 entries) - please fix the numbering sequence
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 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.
Summary by Sourcery
New Features: