Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 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
98d026c
Merge pull request #11 from swe-students-fall2025/serena-compliments
sen5217 Nov 3, 2025
3698fbe
worked on banter.py
sw5556 Nov 4, 2025
c29f14e
created banter.py tests and u
sw5556 Nov 4, 2025
44d8424
Merge pull request #12 from swe-students-fall2025/susan_branch
sen5217 Nov 4, 2025
8eeabf9
Update README.md
sw5556 Nov 4, 2025
14d3c54
fixed main for pickup and added to ReadMe
yungsemitone Nov 4, 2025
7ff7bed
Merge pull request #13 from swe-students-fall2025/fix_main_pickup
sen5217 Nov 4, 2025
7fe09ec
Adding fixes to __main__.py and testing build.yaml badge
sen5217 Nov 4, 2025
f760ddf
updated banter.py
sw5556 Nov 4, 2025
08d8f84
Merge pull request #15 from swe-students-fall2025/susan_branch
sen5217 Nov 4, 2025
6c8d2ec
Merge pipfile-experiment into smallTalk
sen5217 Nov 4, 2025
cfc7eb0
Adding fixes to __main__.py and testing build.yaml badge after test_b…
sen5217 Nov 4, 2025
72d92b3
Update funfact defaulting behavior for CLI
Alif-4 Nov 4, 2025
6e8f9ca
added parsing argument for pickup
yungsemitone Nov 4, 2025
ebc2db0
Merge pull request #16 from swe-students-fall2025/funfacts-v2
sen5217 Nov 4, 2025
169fe40
Merge pull request #17 from swe-students-fall2025/parse_pickup
sen5217 Nov 4, 2025
1643eb0
Adding example.py and testing changes to build.yaml
sen5217 Nov 4, 2025
12a1e97
Add compliment integration and fix CLI parser
serena0615 Nov 5, 2025
d71b0fa
Merge pull request #19 from swe-students-fall2025/serena-cli-update
sen5217 Nov 5, 2025
b3d6422
Merge branch 'pipfile-experiment' into smallTalk
serena0615 Nov 5, 2025
3d2f3da
Merge pull request #18 from swe-students-fall2025/smallTalk
serena0615 Nov 5, 2025
746e129
Changes to name of package, pyproject.toml, and example.py
sen5217 Nov 5, 2025
7fb2d06
added description, features, example output, functions, and directory…
yungsemitone Nov 5, 2025
fcdce89
Merge pull request #20 from swe-students-fall2025/smallTalk
serena0615 Nov 5, 2025
784eef2
Merge pull request #21 from swe-students-fall2025/update_readme
sen5217 Nov 5, 2025
77a9fe6
Add example.py section in README
sen5217 Nov 5, 2025
31351d3
Merge pull request #22 from swe-students-fall2025/smallTalk
yungsemitone Nov 5, 2025
ba4cd4b
updated readme with installation and usage instructions
sw5556 Nov 5, 2025
9e62a3a
Merge pull request #23 from swe-students-fall2025/susan_branch
sen5217 Nov 5, 2025
910b2e3
Update README.md
sw5556 Nov 5, 2025
9eb83c2
minor update to readme file
sw5556 Nov 5, 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
42 changes: 42 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI / CD
on:
pull_request:
branches: pipfile-experiment
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
python-version: ["3.9", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Install Python, pipenv and Pipfile packages
uses: kojoru/prepare-pipenv@v1
with:
python-version: ${{ matrix.python-version }}
- name: Turn on 'editable' mode
run: |
pipenv install -e .
- name: Test with pytest
run: |
pipenv install pytest
pipenv --venv
pipenv run python -m pytest
deliver:
needs: [build]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Install Python, pipenv and Pipfile packages
uses: kojoru/prepare-pipenv@v1
- name: Build package
run: |
pipenv install build
pipenv run python -m build .
- name: Publish to PyPI test server
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
2 changes: 1 addition & 1 deletion .github/workflows/event-logger.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: log github events
on:
on:
push:
branches: [main, master, pipfile-experiment]
pull_request:
Expand Down
16 changes: 16 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
pytest = "*"
chatterpy = {file = ".", editable = true}

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

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

Large diffs are not rendered by default.

289 changes: 287 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,288 @@
# Python Package Exercise
![CI / CD](https://github.com/swe-students-fall2025/3-python-package-team_mistral/actions/workflows/build.yaml/badge.svg)

An exercise to create a Python package, build it, test it, distribute it, and use it. See [instructions](./instructions.md) for details.

# ChatterPy

ChatterPy is a lighthearted Python package that helps spark **fun conversations** by giving you a random **fun fact**, **small talk question**, **compliment**, or even a **pickup line** for when things get quiet.

## Group Members

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

[Sydney Nadeau](https://github.com/sen5217)

[Susan Wang](https://github.com/sw5556)

[Aden Juda](https://github.com/yungsemitone)

[Serena Wang](https://github.com/serena0615)


## Installation

### For Users: Install via pip
```bash
pip install chatterpy
```

### For Contributors: Set Up Development Environment

If you want to contribute to ChatterPy, follow these steps:

1. **Clone the repository:**
```bash
git clone https://github.com/swe-students-fall2025/3-python-package-team_mistral.git
cd 3-python-package-team_mistral
```

2. **Install pipenv** (if you don't have it):
```bash
pip install pipenv
```

3. **Install dependencies:**
```bash
pipenv install --dev
```

4. **Activate the virtual environment:**
```bash
pipenv shell
```

5. **Run tests:**
```bash
pipenv run pytest
```

6. **Build the package:**
```bash
pipenv run python -m build
```

---

## Usage

### Importing ChatterPy in Your Code

After installing with `pip install chatterpy`, you can import and use any function:
```python
from chatterpy import fun_fact, smallTalk, pickUpLine, compliment, banter

# Get a random fun fact
print(fun_fact())

# Get a fun fact from a specific category
print(fun_fact(category="science", rarity="rare"))

# Get small talk - question
print(smallTalk(question=True))

# Get small talk - comment
print(smallTalk(question=False))

# Get a pickup line
print(pickUpLine(kind="poetic", name="Alex"))

# Get a compliment
print(compliment(name="Jordan", intensity=2, style="classic", category="personality"))

# Get playful banter
print(banter(intensity="mild", name="Sam"))
```

**See [example.py](src/example.py) for a complete interactive demonstration.**

To run the example program:
```bash
python src/example.py
```

## Command-Line Interface

### Using the CLI After Installation

Once installed via pip, you can use ChatterPy from the command line, for example:

```bash
chatterpy --smalltalk --comment
```

## Example Output

When you run these commands, you'll get different outputs:

### Small Talk (Comment)

```bash
python -m chatterpy --smalltalk --comment
```

You might see something like this:

```

Avocado toast is overrated, but I’d still eat it.

```

### Small Talk (Question)

```bash
python -m chatterpy --smalltalk --question
```
You might get:

```

I’ve been meaning to start reading/watching something new — any recommendations?

```

### Pickup Line (No Name)

```bash
python -m chatterpy --pickup --kind poetic
```

You could see:

```

your presence feels like morning sunshine.

```

### Pickup Line (With Name)

```bash
python -m chatterpy --pickup --kind nerdy --name Susan
```

The output might be:

```

Susan, you’re a clean solution in a messy codebase.

```

### Compliment (With Name)

```bash
python -m chatterpy --compliment --name Sydney --intensity medium
```
This might return:

```

Sydney, You always add something unique to your look.

```

### Fun Facts (No parameters)

```bash
python -m chatterpy --fact
```

Could get you:

```

Bananas are berries, but strawberries aren’t.

```

### Fun Facts (With parameters)

```bash
python -m chatterpy --fact --category history --rarity rare
```

Might spit out:

```

Ancient Roman concrete can 'self-heal'.


```

### Banter (No name)

```bash
python -m chatterpy --banter --intensity medium
```

Will say:

```

you look like something I drew with my left hand.

```

### Banter (With name)

```bash
python -m chatterpy --banter --intensity mild --name Aden
```

Will return:

```
Aden, you're like a software update: nobody asked for you.


```



---

## Features

| Function | Description |
| ----------------------------- | -------------------------------------------------------------- |
| `fun_fact(category: str = "general", rarity: str = "common")` | Returns a random fun fact from one of four categories: `general`, `science`, `history`, or `animals`, with varying rarity|
| `smallTalk(question: bool)` | Returns either a fun question (`True`) or a random comment (`False`). |
| `pickUpLine(kind: str, name: str = "")` | Returns a pickup line of a certain type (`classic`, `poetic`, `funny`, `nerdy`). Optionally includes a name at the start. |
| `compliment(name: str, intensity: str)` | Returns a compliment of a specific intesity(`mild`, `medium`, `intense`). Includes a name at the start. |
| `banter(intensity: str, name: str = "")` | Returns a playful roast or joke depending on the chosen intensity (`mild`, `medium`, `intense`). Optionally includes a name to personalize it. |



## Project Structure

```
3-python-package-team_mistral/
├──src/
│ ├───chatterpy/
│ ├── __init__.py
│ ├── __main__.py
│ ├── funfacts.py
│ ├── smalltalk.py
│ ├── pickuplines.py
│ └── banter.py
│ └── compliments.py
│ ├─── example.py
├──tests/
│ ├── test_funfacts.py
│ ├── test_smalltalk.py
│ ├── test_pickuplines.py
│ └── test_compliments.py
│ └── test_banter.py
├── Pipfile
├── pyproject.toml
└── README.md
```

## example.py

[Link to example.py](src/example.py)

example.py is a standalone Python script that demonstrates the functionality of the chatterpy package. It calls each of the package’s functions: fun facts, small talk, banter, pickup lines, and compliments.

This script is separate from the CLI interface in that it can be run directly with Python, and is intended for demonstration or testing purposes, rather than as a command-line tool for user input.
Loading
Loading