From cf59b799c1b4cca45e973fba42ef2b335bd63a48 Mon Sep 17 00:00:00 2001 From: "Kareeiman K." Date: Fri, 3 Jan 2025 21:04:50 +0400 Subject: [PATCH 01/16] Uplaoding the code --- solutions/convert_to_capital.py | 44 +++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 solutions/convert_to_capital.py diff --git a/solutions/convert_to_capital.py b/solutions/convert_to_capital.py new file mode 100644 index 000000000..19fea56bd --- /dev/null +++ b/solutions/convert_to_capital.py @@ -0,0 +1,44 @@ +# !/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +This function asks user to enter a word and converts the letters +to capital. The function will return numbers and capital letters the same + +Created on 31 12 2024 + +@author: Kareiman Altayeb +""" + + +def convert_to_capital(user_text: str = None) -> str: + """Asks the user to enter a text and returns the text in capital + + parameters: + user_text = in str + returns: + user_text in capital letters + + raises: + AssertionError: if input is empty + + examples: + >>> convert_to_capital('hello') + 'HELLO' + >>> convert_to_capital('HelLo') + 'HELLO' + >>> convert_to_capital('123hello') + '123HELLO' + """ + if user_text is None: + user_text = input("Enter a Word or Sentence: ").strip() + + if not user_text: + raise AssertionError("Entry cannot be empty or just spaces") + + outcome_text = user_text.upper() + return outcome_text + + +if __name__ == "__main__": + print(convert_to_capital()) From a97aae065c07f36dad327afc052d1fcc52573736 Mon Sep 17 00:00:00 2001 From: "Kareeiman K." Date: Fri, 3 Jan 2025 22:44:36 +0400 Subject: [PATCH 02/16] Adding the code and unittest --- solutions/tests/test_convert_to_capital.py | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 solutions/tests/test_convert_to_capital.py diff --git a/solutions/tests/test_convert_to_capital.py b/solutions/tests/test_convert_to_capital.py new file mode 100644 index 000000000..67f32ee6e --- /dev/null +++ b/solutions/tests/test_convert_to_capital.py @@ -0,0 +1,49 @@ +""" +Created on 03 01 2025 + +@author: Kareiman Altayeb +""" + +import unittest + +# To test convert_to_capital +from solutions.convert_to_capital import convert_to_capital + + +class TestConvertCapitalLetters(unittest.TestCase): + "Tests convert_to_capital function" + + # Standard test cases + + def test_all_small_letters(self): + """It should convert all letters to capital""" + self.assertEqual(convert_to_capital("kareiman"), "KAREIMAN") + + def test_some_are_capital_letters(self): + """It should convert all letters to capital""" + self.assertEqual(convert_to_capital("kAREiMan"), "KAREIMAN") + + def test_full_sentence(self): + """It should convert all words to capital""" + self.assertEqual(convert_to_capital("happy new year"), "HAPPY NEW YEAR") + + # Edge cases + + def test_mixed_with_numbers(self): + """It should return the numbers the same""" + self.assertEqual(convert_to_capital("12345kareiman"), "12345KAREIMAN") + + def test_special_characters(self): + """It should return special characters the same""" + self.assertEqual(convert_to_capital("?!!!"), "?!!!") + + # Defensive tests + + def test_empty_entry(self): + """It should raise an error for space or empty entry""" + with self.assertRaises(AssertionError): + convert_to_capital("") + + +if __name__ == "__main__": + unittest.main() From 5b04b5a104dd4967553a84b0eec5184bcd0a5938 Mon Sep 17 00:00:00 2001 From: "Kareeiman K." Date: Sat, 4 Jan 2025 01:23:29 +0400 Subject: [PATCH 03/16] Add header to unittest --- solutions/tests/test_convert_to_capital.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/solutions/tests/test_convert_to_capital.py b/solutions/tests/test_convert_to_capital.py index 67f32ee6e..baa105d44 100644 --- a/solutions/tests/test_convert_to_capital.py +++ b/solutions/tests/test_convert_to_capital.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- """ Created on 03 01 2025 From c3dd7e9f81359b6008f5e59f848561610aa39e15 Mon Sep 17 00:00:00 2001 From: "Kareeiman K." Date: Sat, 4 Jan 2025 22:05:19 +0400 Subject: [PATCH 04/16] Updating the unittest header --- solutions/tests/test_convert_to_capital.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solutions/tests/test_convert_to_capital.py b/solutions/tests/test_convert_to_capital.py index baa105d44..acc2379d3 100644 --- a/solutions/tests/test_convert_to_capital.py +++ b/solutions/tests/test_convert_to_capital.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +# !/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on 03 01 2025 From e185e0b1b9d626f99abcf4ec3d67cd12bbb35907 Mon Sep 17 00:00:00 2001 From: "Kareeiman K." Date: Sat, 4 Jan 2025 22:09:27 +0400 Subject: [PATCH 05/16] Updating unittest header 2 --- solutions/tests/test_convert_to_capital.py | 1 + 1 file changed, 1 insertion(+) diff --git a/solutions/tests/test_convert_to_capital.py b/solutions/tests/test_convert_to_capital.py index acc2379d3..4af167ef1 100644 --- a/solutions/tests/test_convert_to_capital.py +++ b/solutions/tests/test_convert_to_capital.py @@ -1,5 +1,6 @@ # !/usr/bin/env python3 # -*- coding: utf-8 -*- + """ Created on 03 01 2025 From 2ffa58c7243ed0d419bfbfb914c9a60208dbb9b2 Mon Sep 17 00:00:00 2001 From: "Kareeiman K." Date: Sun, 5 Jan 2025 21:12:22 +0400 Subject: [PATCH 06/16] Updating the code without print --- solutions/convert_to_capital.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/solutions/convert_to_capital.py b/solutions/convert_to_capital.py index 19fea56bd..10d6f7678 100644 --- a/solutions/convert_to_capital.py +++ b/solutions/convert_to_capital.py @@ -11,7 +11,7 @@ """ -def convert_to_capital(user_text: str = None) -> str: +def convert_to_capital(user_text: str) -> str: """Asks the user to enter a text and returns the text in capital parameters: @@ -30,15 +30,10 @@ def convert_to_capital(user_text: str = None) -> str: >>> convert_to_capital('123hello') '123HELLO' """ - if user_text is None: - user_text = input("Enter a Word or Sentence: ").strip() + + user_text = user_text.strip() if not user_text: raise AssertionError("Entry cannot be empty or just spaces") - outcome_text = user_text.upper() - return outcome_text - - -if __name__ == "__main__": - print(convert_to_capital()) + return user_text.upper() From 5fee69e14db8bf02d2594e3efd963bd0bc6c4ad6 Mon Sep 17 00:00:00 2001 From: "Kareeiman K." Date: Wed, 8 Jan 2025 13:33:24 +0400 Subject: [PATCH 07/16] Updating the docstring --- solutions/convert_to_capital.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/solutions/convert_to_capital.py b/solutions/convert_to_capital.py index 10d6f7678..e13b105f6 100644 --- a/solutions/convert_to_capital.py +++ b/solutions/convert_to_capital.py @@ -2,9 +2,6 @@ # -*- coding: utf-8 -*- """ -This function asks user to enter a word and converts the letters -to capital. The function will return numbers and capital letters the same - Created on 31 12 2024 @author: Kareiman Altayeb From 3440ca9c0060ad65459adaa18ddd8cd19a828a81 Mon Sep 17 00:00:00 2001 From: "Kareeiman K." Date: Fri, 10 Jan 2025 02:29:26 +0400 Subject: [PATCH 08/16] Updating the docstring in both files --- solutions/convert_to_capital.py | 2 ++ solutions/tests/test_convert_to_capital.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/solutions/convert_to_capital.py b/solutions/convert_to_capital.py index e13b105f6..4bff69fbf 100644 --- a/solutions/convert_to_capital.py +++ b/solutions/convert_to_capital.py @@ -2,6 +2,8 @@ # -*- coding: utf-8 -*- """ +A module that converts letters to upper case + Created on 31 12 2024 @author: Kareiman Altayeb diff --git a/solutions/tests/test_convert_to_capital.py b/solutions/tests/test_convert_to_capital.py index 4af167ef1..e44b6782d 100644 --- a/solutions/tests/test_convert_to_capital.py +++ b/solutions/tests/test_convert_to_capital.py @@ -2,6 +2,8 @@ # -*- coding: utf-8 -*- """ +A module to test convert_to_capital function + Created on 03 01 2025 @author: Kareiman Altayeb From 6773f0d12af47d1787e509c5741517d7881e86f4 Mon Sep 17 00:00:00 2001 From: "Kareeiman K." Date: Fri, 10 Jan 2025 17:12:49 +0400 Subject: [PATCH 09/16] Edit the unittest file --- solutions/tests/test_convert_to_capital.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/solutions/tests/test_convert_to_capital.py b/solutions/tests/test_convert_to_capital.py index e44b6782d..5cee51e9e 100644 --- a/solutions/tests/test_convert_to_capital.py +++ b/solutions/tests/test_convert_to_capital.py @@ -48,7 +48,3 @@ def test_empty_entry(self): """It should raise an error for space or empty entry""" with self.assertRaises(AssertionError): convert_to_capital("") - - -if __name__ == "__main__": - unittest.main() From a804d5239b3172a89f5d189f08d196813ef0cafb Mon Sep 17 00:00:00 2001 From: "Kareeiman K." Date: Sun, 12 Jan 2025 02:07:14 +0400 Subject: [PATCH 10/16] Edits upon Review --- solutions/convert_to_capital.py | 16 ++++++++-------- solutions/tests/test_convert_to_capital.py | 5 +++++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/solutions/convert_to_capital.py b/solutions/convert_to_capital.py index 4bff69fbf..d2ae73d35 100644 --- a/solutions/convert_to_capital.py +++ b/solutions/convert_to_capital.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- """ -A module that converts letters to upper case +A module that converts letters to uppercase Created on 31 12 2024 @@ -13,15 +13,15 @@ def convert_to_capital(user_text: str) -> str: """Asks the user to enter a text and returns the text in capital - parameters: - user_text = in str - returns: - user_text in capital letters + Parameters: + user_text (str): The user input text to be converted to uppercase. + Returns: + (str) : user_text in capital letters - raises: - AssertionError: if input is empty + Raises: + AssertionError: If the input is empty or contains only spaces. - examples: + Examples: >>> convert_to_capital('hello') 'HELLO' >>> convert_to_capital('HelLo') diff --git a/solutions/tests/test_convert_to_capital.py b/solutions/tests/test_convert_to_capital.py index 5cee51e9e..2fc8a8a83 100644 --- a/solutions/tests/test_convert_to_capital.py +++ b/solutions/tests/test_convert_to_capital.py @@ -4,6 +4,11 @@ """ A module to test convert_to_capital function +Test categories: + - Standard cases: Regular text with different length + - Edge cases: Mix of different data types + - Defensive tests: Empty input + Created on 03 01 2025 @author: Kareiman Altayeb From 27ea5b539a6e7aee13513942b74652afde91a704 Mon Sep 17 00:00:00 2001 From: "Kareeiman K." Date: Sun, 12 Jan 2025 02:19:41 +0400 Subject: [PATCH 11/16] Edits after reviews --- solutions/convert_to_capital.py | 1 + 1 file changed, 1 insertion(+) diff --git a/solutions/convert_to_capital.py b/solutions/convert_to_capital.py index d2ae73d35..0f8149713 100644 --- a/solutions/convert_to_capital.py +++ b/solutions/convert_to_capital.py @@ -15,6 +15,7 @@ def convert_to_capital(user_text: str) -> str: Parameters: user_text (str): The user input text to be converted to uppercase. + Returns: (str) : user_text in capital letters From 911bc26be079e0da457eda7fb14b78406dad8b83 Mon Sep 17 00:00:00 2001 From: "Kareeiman K." Date: Sun, 12 Jan 2025 02:26:59 +0400 Subject: [PATCH 12/16] Edits after review --- solutions/convert_to_capital.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solutions/convert_to_capital.py b/solutions/convert_to_capital.py index 0f8149713..197f516ed 100644 --- a/solutions/convert_to_capital.py +++ b/solutions/convert_to_capital.py @@ -17,7 +17,7 @@ def convert_to_capital(user_text: str) -> str: user_text (str): The user input text to be converted to uppercase. Returns: - (str) : user_text in capital letters + str : user_text in capital letters Raises: AssertionError: If the input is empty or contains only spaces. From 284bad0ba7e90c2c14ee3adee729af994c0fb37e Mon Sep 17 00:00:00 2001 From: "Kareeiman K." Date: Sun, 12 Jan 2025 04:13:00 +0400 Subject: [PATCH 13/16] edits after second review --- solutions/convert_to_uppercase.py | 40 ++++++++++++++ solutions/tests/test_convert_to_uppercase.py | 55 ++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 solutions/convert_to_uppercase.py create mode 100644 solutions/tests/test_convert_to_uppercase.py diff --git a/solutions/convert_to_uppercase.py b/solutions/convert_to_uppercase.py new file mode 100644 index 000000000..0e1888acb --- /dev/null +++ b/solutions/convert_to_uppercase.py @@ -0,0 +1,40 @@ +# !/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +A module that converts letters to uppercase + +Created on 31 12 2024 + +@author: Kareiman Altayeb +""" + + +def convert_to_uppercase(user_text: str) -> str: + """Asks the user to enter a text and returns the text in capital + with all characters in uppercase + + Parameters: + user_text (str): The user input text to be converted to uppercase. + + Returns: + str : user_text in capital letters + + Raises: + AssertionError: If the input is empty or contains only spaces. + + Examples: + >>> convert_to_uppercase('hello') + 'HELLO' + >>> convert_to_uppercase('HelLo') + 'HELLO' + >>> convert_to_uppercase('123hello') + '123HELLO' + """ + + user_text = user_text.strip() + + if not user_text: + raise AssertionError("Entry cannot be empty or just spaces") + + return user_text.upper() diff --git a/solutions/tests/test_convert_to_uppercase.py b/solutions/tests/test_convert_to_uppercase.py new file mode 100644 index 000000000..7d9684020 --- /dev/null +++ b/solutions/tests/test_convert_to_uppercase.py @@ -0,0 +1,55 @@ +# !/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +A module to test convert_to_uppercase function + +Test categories: + - Standard cases: Regular text with different length + - Edge cases: Mix of different data types + - Defensive tests: Empty input + +Created on 03 01 2025 + +@author: Kareiman Altayeb +""" + +import unittest + +# To test convert_to_capital +from solutions.convert_to_uppercase import convert_to_uppercase + + +class TestConvertToCapitalLetters(unittest.TestCase): + "Tests convert_to_capital function" + + # Standard test cases + + def test_all_small_letters(self): + """It should convert all letters to capital""" + self.assertEqual(convert_to_uppercase("kareiman"), "KAREIMAN") + + def test_some_are_capital_letters(self): + """It should convert all letters to capital""" + self.assertEqual(convert_to_uppercase("kAREiMan"), "KAREIMAN") + + def test_full_sentence(self): + """It should convert all words to capital""" + self.assertEqual(convert_to_uppercase("happy new year"), "HAPPY NEW YEAR") + + # Edge cases + + def test_mixed_with_numbers(self): + """It should return the numbers the same""" + self.assertEqual(convert_to_uppercase("12345kareiman"), "12345KAREIMAN") + + def test_special_characters(self): + """It should return special characters the same""" + self.assertEqual(convert_to_uppercase("?!!!"), "?!!!") + + # Defensive tests + + def test_empty_entry(self): + """It should raise an error for space or empty entry""" + with self.assertRaises(AssertionError): + convert_to_uppercase("") From ce63cb57cd58b15174094a72bb16e7bd1473a528 Mon Sep 17 00:00:00 2001 From: "Kareeiman K." Date: Sun, 12 Jan 2025 04:38:04 +0400 Subject: [PATCH 14/16] edits after second reviews --- .pylintrc | Bin 0 -> 45010 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .pylintrc diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 0000000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u0rMzC+%Ws{K{?d)}nF>?|X;`)TgRD6(qx zBHQ0pe-JZ~Lm;X8`$;Kb?Z^a4URhMGXiXp~tX>sm<|~OI#cDrw)cqPS?KL3f*}F!AeJ}-Wqh71K%VlWP{n6O0{+L(D}Fh%!Q*Jp2_v`Orv8T0 zc*O+#Km#Mx&i~>WB_m6(w~yR&!gyeg&WAEPd0zJ`@&C4LM-Ba&^m^RaW|Wd=WJf_OW%I@0rCnb|hssF$Cl!>Fu0AVJAd zUO45&y{_h+xtTtBEU=%MQew>BXqEI%BQvzZPD=E`E;ZFMy}a%RC)6H41vl!Is;Y%M zVFHBM@3+}i?=xND^zx9kpkc*t=Nx$iD($~=*Xl;>0bw8UesmUmZ`E}lU8bsDxX9d% zPskmsvW26!cKyv66k2G<6es<@Luq3?4z}*~UG+P%hJ%ks;ghxMd@bIOcRT9PReSUC z*77#Om+@`?3t}BKC9FSvcrV9IwrX4#6_$hfg-*`ah!%};E|j%d3Ri*5|nmG`S~f6Jvk zfg>1HVKDd0_UC&;w3SU@oACXvlkB_(VM6z5bP+`LLqcQgE7FyZSIj)l8yID1Zwj zsd(H=56!msY2R(?k+D`uy|+rdwQE&t!u6S}Qst1UIlqnUSyFVT2pO>-hUkKva!mpx z^{cYi;=2A$W7ZNP7NLFlcsx4wpdum>T~&T&DC$PoFMuMRp1_N=+)2y*?Brv+LFuyJ zGuR%kfKJm2AK+{C69gH5ZD;mv$*-~;ev4^8{vfj{lwS_qZp54$abA5a~1R+`h@*G6Spjd2NovQFUsjdVTmBSNf7pOOY_r z9-9vctaSKSXOzwJ?yz4BoV53?;%=D-WDjlc*Rp2HOs;w+A_gl0L^JF~@uPo78~3U| z Date: Sun, 12 Jan 2025 10:37:22 +0400 Subject: [PATCH 15/16] edits after review --- solutions/tests/test_convert_to_uppercase.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/solutions/tests/test_convert_to_uppercase.py b/solutions/tests/test_convert_to_uppercase.py index 7d9684020..682450133 100644 --- a/solutions/tests/test_convert_to_uppercase.py +++ b/solutions/tests/test_convert_to_uppercase.py @@ -16,7 +16,7 @@ import unittest -# To test convert_to_capital +# To test convert_to_uppercase from solutions.convert_to_uppercase import convert_to_uppercase @@ -26,15 +26,15 @@ class TestConvertToCapitalLetters(unittest.TestCase): # Standard test cases def test_all_small_letters(self): - """It should convert all letters to capital""" + """It should convert all letters to capital letter""" self.assertEqual(convert_to_uppercase("kareiman"), "KAREIMAN") def test_some_are_capital_letters(self): - """It should convert all letters to capital""" + """It should convert all letters to capital letters""" self.assertEqual(convert_to_uppercase("kAREiMan"), "KAREIMAN") def test_full_sentence(self): - """It should convert all words to capital""" + """It should convert all words to capital letters""" self.assertEqual(convert_to_uppercase("happy new year"), "HAPPY NEW YEAR") # Edge cases From 73e4563e07fe3a1ecb51dac43f04ddd89c3caed3 Mon Sep 17 00:00:00 2001 From: "Kareeiman K." Date: Sun, 12 Jan 2025 11:50:33 +0400 Subject: [PATCH 16/16] edits after arwa error was fixed --- solutions/convert_to_uppercase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solutions/convert_to_uppercase.py b/solutions/convert_to_uppercase.py index 0e1888acb..cc462976c 100644 --- a/solutions/convert_to_uppercase.py +++ b/solutions/convert_to_uppercase.py @@ -18,7 +18,7 @@ def convert_to_uppercase(user_text: str) -> str: user_text (str): The user input text to be converted to uppercase. Returns: - str : user_text in capital letters + str : user_text in upper case Raises: AssertionError: If the input is empty or contains only spaces.