From 8f502d9030666aa2fa4dcf26cc59c31a927d3a35 Mon Sep 17 00:00:00 2001 From: Ned Twigg Date: Tue, 27 Feb 2024 11:10:30 -0800 Subject: [PATCH] Delete our intro PRs. --- python/selfie-lib/selfie_lib/__init__.py | 5 ----- python/selfie-lib/selfie_lib/edwin.py | 3 --- python/selfie-lib/selfie_lib/harvir.py | 4 ---- python/selfie-lib/selfie_lib/ned.py | 12 ------------ python/selfie-lib/selfie_lib/selina.py | 15 --------------- python/selfie-lib/tests/edwin_test.py | 7 ------- python/selfie-lib/tests/harvir_test.py | 6 ------ python/selfie-lib/tests/ned_test.py | 21 --------------------- python/selfie-lib/tests/selina_test.py | 21 --------------------- 9 files changed, 94 deletions(-) delete mode 100644 python/selfie-lib/selfie_lib/edwin.py delete mode 100644 python/selfie-lib/selfie_lib/harvir.py delete mode 100644 python/selfie-lib/selfie_lib/ned.py delete mode 100644 python/selfie-lib/selfie_lib/selina.py delete mode 100644 python/selfie-lib/tests/edwin_test.py delete mode 100644 python/selfie-lib/tests/harvir_test.py delete mode 100644 python/selfie-lib/tests/ned_test.py delete mode 100644 python/selfie-lib/tests/selina_test.py diff --git a/python/selfie-lib/selfie_lib/__init__.py b/python/selfie-lib/selfie_lib/__init__.py index 5ba69133..2cd86814 100644 --- a/python/selfie-lib/selfie_lib/__init__.py +++ b/python/selfie-lib/selfie_lib/__init__.py @@ -1,6 +1 @@ -from .ned import fizzbuzz as fizzbuzz - -from .selina import get_interesting_fact as get_interesting_fact -from .harvir import silly_addition as silly_addition -from .edwin import simple_subtraction as simple_subtraction from .Slice import Slice as Slice diff --git a/python/selfie-lib/selfie_lib/edwin.py b/python/selfie-lib/selfie_lib/edwin.py deleted file mode 100644 index b48917d9..00000000 --- a/python/selfie-lib/selfie_lib/edwin.py +++ /dev/null @@ -1,3 +0,0 @@ -def simple_subtraction(a, b): - # Subtracts b from a. - return a - b diff --git a/python/selfie-lib/selfie_lib/harvir.py b/python/selfie-lib/selfie_lib/harvir.py deleted file mode 100644 index 8bcc9ed5..00000000 --- a/python/selfie-lib/selfie_lib/harvir.py +++ /dev/null @@ -1,4 +0,0 @@ -def silly_addition(a, b): - # Adds two numbers and then adds 42 to the result. - return a + b + 42 - diff --git a/python/selfie-lib/selfie_lib/ned.py b/python/selfie-lib/selfie_lib/ned.py deleted file mode 100644 index 5e74d4ea..00000000 --- a/python/selfie-lib/selfie_lib/ned.py +++ /dev/null @@ -1,12 +0,0 @@ -def fizzbuzz(n): - fizzbuzz_results = [] - for i in range(1, n + 1): - if i % 3 == 0 and i % 5 == 0: - fizzbuzz_results.append("FizzBuzz") - elif i % 3 == 0: - fizzbuzz_results.append("Fizz") - elif i % 5 == 0: - fizzbuzz_results.append("Buzz") - else: - fizzbuzz_results.append(f"{i}") - return fizzbuzz_results diff --git a/python/selfie-lib/selfie_lib/selina.py b/python/selfie-lib/selfie_lib/selina.py deleted file mode 100644 index 987043ad..00000000 --- a/python/selfie-lib/selfie_lib/selina.py +++ /dev/null @@ -1,15 +0,0 @@ -def get_interesting_fact(category): - facts = { - "science": "Honey never spoils. Archaeologists have found pots of honey in ancient Egyptian tombs that are over 3,000 years old and still perfectly edible.", - "history": "The shortest war in history lasted only 38 minutes. It was between Britain and Zanzibar on August 27, 1896.", - "animals": "Penguins only have one mate their entire life. They also propose to their lifemates with a pebble.", - "technology": "The first computer virus was created in 1983 and was called the 'Elk Cloner'. It infected Apple II computers via floppy disks." - } - - category_lower = category.lower() - if category_lower in facts: - return facts[category_lower] - else: - return "Sorry, I don't have an interesting fact for that category." - - diff --git a/python/selfie-lib/tests/edwin_test.py b/python/selfie-lib/tests/edwin_test.py deleted file mode 100644 index bb5d63dd..00000000 --- a/python/selfie-lib/tests/edwin_test.py +++ /dev/null @@ -1,7 +0,0 @@ -from selfie_lib import simple_subtraction - -def test_simple_subtraction(): - assert simple_subtraction(2, 2) == 0, "Should be 0" - assert simple_subtraction(0, 0) == 0, "Should be 0" - assert simple_subtraction(100, 42) == 58, "Should be 58" - diff --git a/python/selfie-lib/tests/harvir_test.py b/python/selfie-lib/tests/harvir_test.py deleted file mode 100644 index 8c7a5ce6..00000000 --- a/python/selfie-lib/tests/harvir_test.py +++ /dev/null @@ -1,6 +0,0 @@ -from selfie_lib import silly_addition - -def test_silly_addition(): - assert silly_addition(1, 2) == 45, "Should be 45" - assert silly_addition(-42, 0) == 0, "Should be 0" - assert silly_addition(10, 5) == 57, "Should be 57" diff --git a/python/selfie-lib/tests/ned_test.py b/python/selfie-lib/tests/ned_test.py deleted file mode 100644 index 2c71421a..00000000 --- a/python/selfie-lib/tests/ned_test.py +++ /dev/null @@ -1,21 +0,0 @@ -from selfie_lib import fizzbuzz - - -def test_fizzbuzz(): - assert fizzbuzz(15) == [ - "1", - "2", - "Fizz", - "4", - "Buzz", - "Fizz", - "7", - "8", - "Fizz", - "Buzz", - "11", - "Fizz", - "13", - "14", - "FizzBuzz", - ] diff --git a/python/selfie-lib/tests/selina_test.py b/python/selfie-lib/tests/selina_test.py deleted file mode 100644 index c2e2ba54..00000000 --- a/python/selfie-lib/tests/selina_test.py +++ /dev/null @@ -1,21 +0,0 @@ -from selfie_lib import get_interesting_fact - -def test_science_fact(): - fact = get_interesting_fact("science") - assert fact == "Honey never spoils. Archaeologists have found pots of honey in ancient Egyptian tombs that are over 3,000 years old and still perfectly edible." - -def test_history_fact(): - fact = get_interesting_fact("history") - assert fact == "The shortest war in history lasted only 38 minutes. It was between Britain and Zanzibar on August 27, 1896." - -def test_animals_fact(): - fact = get_interesting_fact("animals") - assert fact == "Penguins only have one mate their entire life. They also propose to their lifemates with a pebble." - -def test_technology_fact(): - fact = get_interesting_fact("technology") - assert fact == "The first computer virus was created in 1983 and was called the 'Elk Cloner'. It infected Apple II computers via floppy disks." - -def test_invalid_category(): - fact = get_interesting_fact("invalid") - assert fact == "Sorry, I don't have an interesting fact for that category."