Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ea5c103
add banter function
sw5556 Oct 30, 2025
f2d152e
add conversations package skeleton
Alif-4 Oct 30, 2025
e050698
Merge pull request #1 from swe-students-fall2025/funFacts
sen5217 Oct 30, 2025
ab99835
Removed old __init__.py file
sw5556 Oct 30, 2025
db7c204
renamed to banter.py
sw5556 Oct 30, 2025
dcbc975
renamed to test_banter.py
sw5556 Oct 30, 2025
d48d09b
worked on banter.py
sw5556 Oct 30, 2025
9fa09ea
Merge pull request #2 from swe-students-fall2025/susan_branch
sen5217 Oct 30, 2025
4a268ee
add smallTalk function and tests
sen5217 Nov 2, 2025
3c2760b
Merge pull request #3 from swe-students-fall2025/smallTalk
Alif-4 Nov 3, 2025
50642bb
Funfacts feature, add CLI flags, and pyproject.toml
Alif-4 Nov 3, 2025
90f20f1
Merge pull request #4 from swe-students-fall2025/funfacts-v1
sen5217 Nov 3, 2025
17d6a82
Fixed test_smalltalk import, added CLI flags for smalltalk
sen5217 Nov 3, 2025
57a1345
Merge pull request #5 from swe-students-fall2025/smallTalk
yungsemitone Nov 3, 2025
09f733c
added pickup lines function and tests
yungsemitone Nov 3, 2025
8a9872b
Merge pull request #6 from swe-students-fall2025/pick_up_lines
sen5217 Nov 3, 2025
0fcf3b2
added init and main for pickupline function
yungsemitone Nov 3, 2025
62af42d
fixed default issue
yungsemitone Nov 3, 2025
242cf4d
Merge pull request #9 from swe-students-fall2025/init_for_pickupline
sen5217 Nov 3, 2025
ce8a12a
Merge pull request #10 from swe-students-fall2025/susan_branch
yungsemitone Nov 3, 2025
bf82fad
Add compliments function and tests
serena0615 Nov 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
conversations = {file = ".", editable = true}

[dev-packages]
pytest = "*"
build = "*"
twine = "*"

[requires]
python_version = "3.12"
397 changes: 397 additions & 0 deletions Pipfile.lock

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Python Package Exercise

[Mahabub Alif](https://github.com/Alif-4)
[Sydney Nadeau](https://github.com/sen5217)

An exercise to create a Python package, build it, test it, distribute it, and use it. See [instructions](./instructions.md) for details.
22 changes: 22 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "conversations"
version = "0.0.1"
description = "Lighthearted conversation helpers (fun facts, etc.)"
requires-python = ">=3.9"
authors = [{name="Team Mistral"}]

[project.scripts]
conversations = "conversations.__main__:main"

[tool.setuptools.package-dir]
"" = "src"

[tool.setuptools.packages.find]
where = ["src"]

[tool.pytest.ini_options]
pythonpath = ["src"]
6 changes: 6 additions & 0 deletions src/conversations/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from .funfacts import fun_fact
from .smalltalk import smallTalk
from .pickuplines import pickUpLine

__all__ = ["fun_fact", "smallTalk", "pickUpLine"] # append your function to this list
__version__ = "0.0.1"
26 changes: 26 additions & 0 deletions src/conversations/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from .funfacts import fun_fact
from .smalltalk import smallTalk
import argparse

def main() -> None:
parser = argparse.ArgumentParser(prog="conversations")
parser.add_argument("--category", default="general")
parser.add_argument("--rarity", default="common")

parser.add_argument("--question", action="store_true")
parser.add_argument("--comment", action="store_true")

parser.add_argument("--kind")
parser.add_argument("--name")

args = parser.parse_args()

#add your function parsing strateg here for CLI

print(fun_fact(category=args.category, rarity=args.rarity))

if args.question or args.comment:
print(smallTalk(args.question))

if __name__ == "__main__":
main()
19 changes: 19 additions & 0 deletions src/conversations/banter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#TODO

import random

def banter(name):
insults = [
f"{name}, you look like you're easy to draw",
f"{name}, the closest you'll come to a brainstorm is a light drizzle",
f"Hey {name}, you look like a 'before' picture.",
f"{name}, I envy everyone who hasn't met you",
f"Wow {name}, if ignorance is bliss, you must be ecstatic at all times.",
f"{name}, you'll go far someday. And I hope you stay there.",
f"{name}, if I gave you a penny for your thoughts, I'd get change back",
f"{name}, you look like something I drew with my left hand."
f"{name}, you're secret is safe with me, because I wasn't listening.",
f"{name}, You bring joy to every room you exit.",
]

return random.choice(insults)
105 changes: 105 additions & 0 deletions src/conversations/compliments.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
import random
from typing import Optional, Literal

Intensity = Literal[1, 2, 3]
Style = Literal["classic", "geeky", "poetic"]
Category = Literal["personality", "appearance", "accomplishment", "specific"]

def compliment(
name: str = "",
intensity: Intensity = 1,
style: Style = "classic",
category: Category = "personality",
detail: Optional[str] = None,
) -> str:
intensity = 1 if intensity < 1 else 3 if intensity > 3 else intensity

base = {
"personality": {
1: [
"You're such a thoughtful person.",
"You have a gift for making others feel valued.",
"I appreciate your honesty.",
],
2: [
"Your confidence is inspiring.",
"Your kindness is contagious.",
"You have an amazing sense of humor.",
],
3: [
"Your presence lifts everyone around you.",
"Your integrity and empathy set the standard.",
"Your strength under pressure is remarkable.",
],
},
"appearance": {
1: [
"I love your sense of style.",
"That color looks great on you.",
"You look great today.",
],
2: [
"Your outfit is on point.",
"You always add something unique to your look.",
"Your smile lights up the room.",
],
3: [
"Your look today is stunning.",
"Your style is effortlessly impressive.",
"You have a standout, polished presence.",
],
},
"accomplishment": {
1: [
"I admire your creativity.",
"You're a considerate, dependable team player.",
"You have a real way with words.",
],
2: [
"You're an exceptional problem-solver.",
"Your ideas are fresh and insightful.",
"You structure complex tasks brilliantly.",
],
3: [
"Your work sets a new bar for quality.",
"Your leadership on tough tasks is outstanding.",
"You consistently turn hard problems into clear wins.",
],
},
"specific": {
1: [
"I was really impressed by {detail}.",
"Your thoughtful approach to {detail} stood out.",
],
2: [
"The way you handled {detail} showed real skill.",
"{detail} was a smart, well-judged choice.",
],
3: [
"{detail} was exceptional—truly impressive.",
"Your execution on {detail} was outstanding.",
],
},
}

pool = base.get(category, base["personality"])[intensity]
sentence = random.choice(pool)

if category == "specific":
sentence = sentence.replace("{detail}", detail or "that")

style_tail = {
"classic": "",
"geeky": " It's elegantly optimized.",
"poetic": " Like sunlight through calm water.",
}[style]

if name:
sentence = f"{name}, {sentence}"

banned = ["for someone like you", "than you look", "actually pretty good", "not bad", "surprisingly good"]
if any(b in sentence.lower() for b in banned):
sentence = f"{name+', ' if name else ''}You're doing great."

return (sentence + style_tail).strip()
#TODO
55 changes: 55 additions & 0 deletions src/conversations/funfacts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import random

#data
FACTS = {
"general": {
"common": [
"Bananas are berries, but strawberries aren’t.",
"Octopuses have three hearts.",
],
"rare": [
"Sharks existed before trees.",
"Honey never spoils—it can last for millennia.",
],
},
"science": {
"common": [
"A day on Venus is longer than a year on Venus.",
"Humans share about 60% of their DNA with bananas.",
],
"rare": [
"Water can boil and freeze at the same time (triple point).",
"There are more stars in the universe than grains of sand on Earth.",
],
},
"history": {
"common": [
"Oxford University predates the Aztec Empire.",
"Cleopatra lived closer to us than to the building of the pyramids.",
],
"rare": [
"Ancient Roman concrete can 'self-heal'.",
"The first computer bug was a real moth (1947).",
],
},
"animals": {
"common": [
"A group of flamingos is called a flamboyance.",
"Cows can have best friends.",
],
"rare": [
"Axolotls can regenerate parts of their brain.",
"Some jellyfish can revert to a juvenile state.",
],
},
}


def fun_fact(category: str = "general", rarity: str = "common") -> str:
"""
Return one fun fact.
Falls back to general and common if inputs are unknown.
"""
cat = FACTS.get(category) or FACTS["general"]
pool = cat.get(rarity) or cat["common"]
return random.choice(pool)
42 changes: 42 additions & 0 deletions src/conversations/pickuplines.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import random

PICKUPLINES = {
"classic": [
"you have a great smile.",
"you make the room feel brighter.",
"your kindness stands out.",
"you have awesome energy.",
],
"poetic": [
"your presence feels like morning sunshine.",
"your laugh sounds like a good song.",
"you carry a little bit of starlight with you.",
"you’re a calm breeze on a warm day.",
],
"funny": [
"you’re the human version of the ‘skip intro’ button, instantly great.",
"your vibe is like perfect wifi, I feel a connection.",
"you’re meme-worthy in the best way.",
"you’re plot-armor for bad moods.",
],
"nerdy": [
"you’re a clean solution in a messy codebase.",
"your curiosity has amazing test coverage.",
"you’re big-O of awesome: constant impact.",
"you’re a well-documented feature of the universe.",
],
}

def pickUpLine(kind, name=""):
"""
Returns a compliment
kind is required, name is optional
"""
if kind not in PICKUPLINES:
raise ValueError("unknown kind (use classic, poetic, funny, nerdy)")

line = random.choice(PICKUPLINES[kind])

if name:
return f"{name}, {line}"
return line
47 changes: 47 additions & 0 deletions src/conversations/smalltalk.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Small Talk function
# Implement function that returns small talk.

import random

questions = [
"How's your day going?",
"What's your favorite color?",
"What's your favorite programming language?",
"I’m running purely on caffeine today — you?",
"Do you usually listen to music when you work?",
"What’s your go-to comfort show or movie?",
"I’ve been meaning to start reading/watching something new — any recommendations?",
"What do you like to do outside of school/work?",
"Do you have any hobbies you’ve picked up recently?",
"What kind of music are you into?",
"Are you more of an introvert or extrovert?",
"If you could travel anywhere right now, where would you go?",
"What’s a random skill you wish you had?",
"What’s your comfort food?",
"Do you like podcasts or audiobooks?",
"Are you a cat person, dog person, or both?",
"Anything fun or random happen to you today?"
]

comments = [
"The weather is nice today.",
"I’m convinced every day this week has been Tuesday.",
"I need a nap.",
"It’s one of those days where coffee feels more like a necessity than a choice.",
"My brain clocked out hours ago.",
"People who can wake up early and be nice about it scare me a little.",
"Socks with sandals are just misunderstood geniuses.",
"Avocado toast is overrated, but I’d still eat it.",
"Pineapple on pizza is disgusting.",
"I hate vegetables.",
"Movies are boring.",
"'The Office' isn't funny."
]


def smallTalk(question):
if question:
return random.choice(questions)
return random.choice(comments)


1 change: 1 addition & 0 deletions tests/test_banter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#TODO
Loading
Loading