Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
ec44d31
Add structural files
MajesticSeagull26 Oct 28, 2025
be19a93
Added pick_color function
MajesticSeagull26 Oct 29, 2025
a0c1829
update README.md to include overview of the package
MajesticSeagull26 Oct 29, 2025
ef700ee
Add team member info
MajesticSeagull26 Oct 29, 2025
a9f7992
Merge pull request #1 from swe-students-fall2025/color_function
Coffee859 Oct 30, 2025
b980109
Update decisionMaking.py
Coffee859 Oct 30, 2025
949c82a
rename files
MajesticSeagull26 Oct 31, 2025
b710c5b
Configure package build with pyproject.toml
MajesticSeagull26 Oct 31, 2025
1eef3d4
Add unit test for pick_color function
MajesticSeagull26 Nov 1, 2025
a2f9320
Implement pick_food function
MariaLuo826 Nov 2, 2025
6cefcfe
Merge remote-tracking branch 'origin/pipfile-experiment' into food_fu…
MariaLuo826 Nov 2, 2025
3385b20
Add yml file for github action
MajesticSeagull26 Nov 3, 2025
38e5fd5
Fix directory for pytest in github action
MajesticSeagull26 Nov 3, 2025
0bd6617
Merge pull request #2 from swe-students-fall2025/color_function_tests
MajesticSeagull26 Nov 3, 2025
eac4e70
Merge pull request #3 from swe-students-fall2025/food_function
aa10150 Nov 3, 2025
f674dfb
Added name to team members
aa10150 Nov 3, 2025
2ec298b
debugging
MajesticSeagull26 Nov 3, 2025
0b693b4
Merge branch 'pipfile-experiment' of https://github.com/swe-students-…
MajesticSeagull26 Nov 3, 2025
0c6932d
Attempt github action fix
MajesticSeagull26 Nov 3, 2025
80538e1
Attempt fix part 2
MajesticSeagull26 Nov 3, 2025
5807726
fix test path
MajesticSeagull26 Nov 3, 2025
0414b24
Fix Python version in Pipfile
MajesticSeagull26 Nov 3, 2025
d2df610
Added Github Action badge
MajesticSeagull26 Nov 3, 2025
acf0f7a
Implemented pick_activity function
aa10150 Nov 3, 2025
2ff05b8
Fix README formatting; commenting out deliver part for during develop…
MajesticSeagull26 Nov 3, 2025
164281f
Merge pull request #4 from swe-students-fall2025/activity_function
MajesticSeagull26 Nov 3, 2025
d9e88da
Unit tests for pick_activity
aa10150 Nov 3, 2025
8ba1236
Fixes to unit tests
aa10150 Nov 3, 2025
cc1e637
More fixes for pick_activity unit tests
aa10150 Nov 3, 2025
886c011
Pt 3 fixes for pick_activity unit tests
aa10150 Nov 3, 2025
5834b23
Merge pull request #7 from swe-students-fall2025/activity_function
MajesticSeagull26 Nov 3, 2025
0f7ade5
Change Github Action to only run on pull requests
MajesticSeagull26 Nov 3, 2025
48f8997
Update pick_food with expanded food restrictions
MariaLuo826 Nov 3, 2025
66d631c
Added pick_clothes function to dailyDecision.py
Coffee859 Nov 3, 2025
b8883ec
Fixed dailyDecision.py and added TestPickClothes
Coffee859 Nov 3, 2025
5c43d1b
Update README.md
Coffee859 Nov 3, 2025
4086676
Bug fix
MajesticSeagull26 Nov 4, 2025
f621ddc
bug fix part 2
MajesticSeagull26 Nov 4, 2025
6004af4
Merge pull request #9 from swe-students-fall2025/food_function
MariaLuo826 Nov 4, 2025
f746617
Update README.md
MariaLuo826 Nov 4, 2025
f05cbfd
Added example program that uses all functions
MajesticSeagull26 Nov 4, 2025
1638577
Merge branch 'pipfile-experiment' into clothes_function
MajesticSeagull26 Nov 4, 2025
2e87fed
Merge branch 'pipfile-experiment' into example-usage
MajesticSeagull26 Nov 4, 2025
c94d506
Fix merge issue
MajesticSeagull26 Nov 4, 2025
d507691
Merge pull request #8 from swe-students-fall2025/clothes_function
MariaLuo826 Nov 4, 2025
5161fc8
Merge branch 'pipfile-experiment' into example-usage
aa10150 Nov 4, 2025
f471eef
Merge pull request #10 from swe-students-fall2025/example-usage
aa10150 Nov 4, 2025
8a0ce7a
Test if package can be built and uploaded
MajesticSeagull26 Nov 4, 2025
2f08978
Remove github.ref
MajesticSeagull26 Nov 4, 2025
eb0f250
Remove email from toml file and add deliver check in workflow
MajesticSeagull26 Nov 4, 2025
2b569dc
Fix version
MajesticSeagull26 Nov 4, 2025
0e54aff
Merge pull request #11 from swe-students-fall2025/workflow
MajesticSeagull26 Nov 4, 2025
7675363
Update README; fix variable names in exampleUsage.py, dailyDecision.p…
MajesticSeagull26 Nov 4, 2025
eb722a7
Update README to include usage; update exampleUsage.py to match the i…
MajesticSeagull26 Nov 4, 2025
d7bf872
Fix issue where pick_activity could potentially return nothing
MajesticSeagull26 Nov 4, 2025
7b56856
Implemented TestPickFood and changes to pick_food
MariaLuo826 Nov 4, 2025
d04c2da
Update installation instructions
MajesticSeagull26 Nov 4, 2025
81669b7
Add pick_music function with unit test
nateisnataliehan 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
43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
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 tests/tests.py -v
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/
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]
dailydecisionpackage = {file = ".", editable = true}

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

[requires]
python_version = "3"
468 changes: 468 additions & 0 deletions Pipfile.lock

Large diffs are not rendered by default.

117 changes: 115 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,116 @@
# Python Package Exercise
[![CI / CD](https://github.com/swe-students-fall2025/3-python-package-team_aurora/actions/workflows/test.yml/badge.svg)](https://github.com/swe-students-fall2025/3-python-package-team_aurora/actions/workflows/test.yml)

An exercise to create a Python package, build it, test it, distribute it, and use it. See [instructions](./instructions.md) for details.
# Python Package Exercise - Daily Decision Helper

## Overview

Do you ever struggle to make everyday decisions? Whether it's choosing what to eat for lunch, picking an outfit color, or deciding what music to listen to, sometimes the smallest choices can feel overwhelming. DailyDecisions is here to help! This Python package takes the stress out of life's minor decisions by providing randomized suggestions when you need them most.

## Installation

1. Install the package using `pipenv`: `pipenv install -i https://pypi.org/simple/dailyDecisionPackage`
2. Activate the virtual environment: `pipenv shell`
3. Create a Python program file that imports the package and uses it, e.g.:
```
from dailyDecisionPackage import dailyDecision

# This would print out the randomly suggested color
dailyDecision.pick_color()
```
4. Run the program: `python filename.py`
5. Exit the virutal environment: `exit`

## Features

This package provides a few functions to help with your daily decision making:

- `dailyDecision.pick_clothes(weather, occasion)` - a function to help you pick clothes based on the weather and/or occasion.
- `dailyDecision.pick_food(dietary_restriction)` - a function to help you pick a food based on your dietary restriction.
- `dailyDecision.pick_color(mood, season)` - a function to help you pick a color (of clothing) based on your mood and/or the season.
- `dailyDecision.pick_activity(weather, energy_level)` - a function to help you pick an activity to do based on your energy level and/or the weather.

## Usage
### Import the Package
`from dailyDecisionPackage import dailyDecision`

### Function Documentation
1. `dailyDecision.pick_clothes(weather, occasion)`
Suggests clothing items based on weather conditions and/or the occasion.

**Parameters**:
- `weather` (optional): The weather condition - "sunny", "rainy", "snowy", or "windy"
- `occasion` (optional): The occasion or dress code - "casual", "formal", "athletic", "party", or "beach"

**Behavior**:
- No arguments: Returns a random clothing item from all available options
- Only weather: Returns clothing appropriate for that weather
- Only occasion: Returns clothing appropriate for that occasion
- Both valid arguments: Returns clothing that fits both criteria (or suggests separate items if no match exists)
- Invalid input: Displays valid options and suggests a random item from all available options


2. `dailyDecision.pick_food(dietary_restriction)`
Suggests food options based on dietary restrictions.

**Parameters**:
- `dietary_restriction` (optional): Your dietary need - "halal", "high_protein", "jain", "keto", "kosher", "low_carb", "no_dairy", "no_eggs", "no_gluten", "no_nuts", "no_soy", "paleo", "pescatarian", "vegan", or "vegetarian"

**Behavior**:
- No argument: Returns a random food from all available options
- Valid restriction: Returns food that meets the specified dietary restriction
- Invalid restriction: Displays valid options and suggests a random food from all available options

3. `dailyDecision.pick_color(mood, season)`
Suggests colors based on your mood and/or the current season.

**Parameters**:
- `mood` (optional): Your emotional state - "happy", "sad", "calm", "energetic", or "angry"
- `season` (optional): The current season - "winter", "fall", "summer", or "spring"

**Behavior**:
- No arguments: Returns a random color from all available options
- Only mood: Returns a color matching that mood
- Only season: Returns a color matching that season
- Both valid arguments: Returns a color that fits both (or suggests separate colors if no perfect match)
- Both arguments, but only mood is valid: Displays valid options for seasons and suggests a random color matching the mood
- Both arguments, but only season is valid: Displays valid options for moods and suggests a random color matching the season
- Invalid input: Displays valid options and suggests a random color from all available options

4. `dailyDecision.pick_activity(weather, energy_level)`
Suggests activities based on weather conditions and/or your energy level.

**Parameters**:
- `weather` (optional): The weather condition - "sunny", "cloudy", "rainy", or "snowy"
- `energy_level` (optional): Your current energy - "low", "medium", or "high"

**Behavior**:
- No arguments: Returns a random activity from all available options
- Only weather: Returns activities suitable for that weather
- Only energy level: Returns activities matching your energy level
- Both arguments: Returns activities that fit both criteria
- Invalid input: Displays valid options and suggests a random activity from all available options

### Example
For a complete example program that demonstrates all four functions with various parameter combinations, see [exampleUsage.py](./examples/exampleUsage.py).
To run the example from root: `python examples/exampleUsage.py`

## Contributing
Want to contribute to this project? Here's how to get started:
1. **Clone the repository:**
`https://github.com/swe-students-fall2025/3-python-package-team_aurora.git`
2. **Install pipenv** (if not already installed): `pip install pipenv`
3. **Install dependencies:** `pipenv install --dev`
4. **Activate the virtual environment:** `pipenv shell`

### Unit tests
Run the unit tests using pytest: `pipenv run pytest tests/tests.py`

### Building the Package
To build the package locally: `pipenv run python -m build`

## Team members:

[Maria Lee](https://github.com/MariaLuo826)
[Reece Huey](https://github.com/Coffee859)
[Jubilee Tang](https://github.com/MajesticSeagull26)
[Anshu Aramandla](https://github.com/aa10150)
157 changes: 157 additions & 0 deletions examples/exampleUsage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
from dailyDecisionPackage import dailyDecision

print("=" * 70)
print("DAILY DECISION PACKAGE - EXAMPLE USAGE")
print("=" * 70)
print()

# PICK COLOR FUNCTION
print("\n" + "=" * 70)
print("1. pick_color(mood, season) - Get color suggestions based on mood and/or season")
print("=" * 70)
print()

print("Example 1.1: No arguments - random color")
print("-" * 70)
dailyDecision.pick_color()
print()

print("Example 1.2: Only mood provided")
print("-" * 70)
dailyDecision.pick_color(mood="happy")
print()

print("Example 1.3: Only season provided")
print("-" * 70)
dailyDecision.pick_color(season="summer")
print()

print("Example 1.4: Both mood and season provided")
print("-" * 70)
dailyDecision.pick_color(mood="happy", season="summer")
print()

print("Example 1.5: Invalid mood")
print("-" * 70)
dailyDecision.pick_color(mood="upset")
print()

print("Example 1.6: Invalid season")
print("-" * 70)
dailyDecision.pick_color(season="test")
print()

print("Example 1.7: Valid season but invalid mood")
print("-" * 70)
dailyDecision.pick_color(season="summer", mood="upset")
print()

print("Example 1.8: Valid mood but invalid season")
print("-" * 70)
dailyDecision.pick_color(season="test", mood="energetic")
print()

print("Example 1.9: Both invalid")
print("-" * 70)
dailyDecision.pick_color(season="test", mood="upset")
print()

# PICK CLOTHES FUNCTION
print("\n" + "=" * 70)
print(
"2. pick_clothes(weather, occasion) - Get clothing suggestions based on weather and/or occasion"
)
print("=" * 70)
print()

print("Example 2.1: No arguments - random clothing")
print("-" * 70)
dailyDecision.pick_clothes()
print()

print("Example 2.2: Only weather provided")
print("-" * 70)
dailyDecision.pick_clothes(weather="sunny")
print()

print("Example 2.3: Only occasion provided")
print("-" * 70)
dailyDecision.pick_clothes(occasion="casual")
print()

print("Example 2.4: Both weather and occasion provided")
print("-" * 70)
dailyDecision.pick_clothes(weather="rainy", occasion="formal")
print()

print("Example 2.5: Invalid weather")
print("-" * 70)
dailyDecision.pick_clothes(weather="invalid")
print()

print("Example 2.6: Invalid occasion")
print("-" * 70)
dailyDecision.pick_clothes(occasion="invalid")


# PICK FOOD FUNCTION
print("\n" + "=" * 70)
print(
"3. pick_food(dietary_restriction) - Get food suggestions based on dietary restrictions"
)
print("=" * 70)
print()

print("Example 3.1: No restriction - random food")
print("-" * 70)
dailyDecision.pick_food()
print()

print("Example 3.2: dietary_restriction provided")
print("-" * 70)
dailyDecision.pick_food("vegetarian")
print()

print("Example 3.3: Unsupported restriction")
print("-" * 70)
dailyDecision.pick_food("invalid")
print()

# PICK ACTIVITY FUNCTION
print("\n" + "=" * 70)
print(
"4. pick_activity(weather, energy_level) - Get activity suggestions based on weather and/or energy level"
)
print("=" * 70)
print()

print("Example 4.1: No arguments - random activity")
print("-" * 70)
dailyDecision.pick_activity()
print()

print("Example 4.2: Only weather provided")
print("-" * 70)
dailyDecision.pick_activity(weather="sunny")
print()

print("Example 4.3: Only energy level provided")
print("-" * 70)
dailyDecision.pick_activity(energy_level="high")
print()

print("Example 4.4: Both weather and energy level provided")
print("-" * 70)
dailyDecision.pick_activity(weather="snowy", energy_level="low")
print()

print("Example 4.5: Invalid weather")
print("-" * 70)
dailyDecision.pick_activity(weather="invalid")
print()

print("Example 4.6: Invalid energy level")
print("-" * 70)
dailyDecision.pick_activity(energy_level="invalid")
print()

37 changes: 37 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "dailyDecisionPackage"
description = "A lighthearted Python package that helps you make everyday decisions."
version = "0.1.2"
authors = [
{ name = "Jubilee Tang" },
{ name = "Maria Lee" },
{ name = "Reece Huey" },
{ name = "Anshu Aramandla"}
]
license = "GPL-3.0-or-later"
license-files = ["LICENSE"]
readme = "README.md"
keywords = ["python", "package", "daily", "decision", "helper", "color", "food"]
requires-python = ">=3.9"
classifiers = [
"Programming Language :: Python :: 3",
"Intended Audience :: Education",
"Operating System :: OS Independent",
]

[project.optional-dependencies]
dev = ["pytest", "build", "twine"]

[project.urls]
"Homepage" = "https://github.com/swe-students-fall2025/3-python-package-team_aurora"
"Repository" = "https://github.com/swe-students-fall2025/3-python-package-team_aurora.git"

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

[tool.setuptools.package-data]
dailyDecisionPackage = ["*.txt", "*.md"]
Empty file.
Loading
Loading