-
Notifications
You must be signed in to change notification settings - Fork 741
Comparing changes
Open a pull request
base repository: learn-co-curriculum/python-p3-freebie-tracker
base: main
head repository: silvanos-eric/python-p3-freebie-tracker
compare: main
- 8 commits
- 9 files changed
- 1 contributor
Commits on Sep 19, 2024
-
feat: add Freebie model and seed script
- Add Faker package to Pipfile - Create Alembic migration for Freebie model - Define Freebie model in models.py - Implement seed script to generate fake data for Freebie model
Configuration menu - View commit details
-
Copy full SHA for be93f41 - Browse repository at this point
Copy the full SHA be93f41View commit details -
feat(models): add association table for companies and devs
- Create a new Alembic migration to add the `companies_devs` association table. - Update `models.py` to define the `companies_devs` table and add relationships between `Company` and `Dev`. - Modify `seed.py` to include seeding logic for `Company` and `Dev` models and establish many-to-many relationships through `companies_devs`. This change enhances the database schema to support many-to-many relationships between companies and developers, facilitating more complex queries and data associations.
Configuration menu - View commit details
-
Copy full SHA for 0a72d49 - Browse repository at this point
Copy the full SHA 0a72d49View commit details -
feat: make company_id non-nullable
- Updated freebies.db binary file. - Created migration to make company_id non-nullable. - Updated Freebie model to set company_id as non-nullable. - Modified seed script to delete all Company and Dev entries before seeding data and to assign random company_id to Freebie objects.
Configuration menu - View commit details
-
Copy full SHA for 0d4399e - Browse repository at this point
Copy the full SHA 0d4399eView commit details -
feat(models): add session management and new methods
- Import `create_engine` and `sessionmaker` from SQLAlchemy - Create engine and session for database interactions - Add `oldest_company` class method to `Company` model - Add `give_freebie` method to `Company` model with type checks and error handling - Define `FreebieAlreadyGivenError` exception
Configuration menu - View commit details
-
Copy full SHA for c2a8198 - Browse repository at this point
Copy the full SHA c2a8198View commit details -
feat(models): add methods to give away and check receipt of freebies
- Added `received_one` method to check if a `Dev` has received a specific item - Added `give_away` method to transfer a freebie to another `Dev` - Added `FreebieNotMineToGiveError` exception for unauthorized transfer attempts
Configuration menu - View commit details
-
Copy full SHA for a29372c - Browse repository at this point
Copy the full SHA a29372cView commit details -
feat(debug): enhance debug script with session management and queries
Added session management using SQLAlchemy's sessionmaker to the `debug.py`. Included queries to: 1. Retrieve and print the company name for the first freebie. 2. Retrieve and print a collection of all freebies for the first company.
Configuration menu - View commit details
-
Copy full SHA for 9f428a2 - Browse repository at this point
Copy the full SHA 9f428a2View commit details -
feat(debug): enhance debug script with error handling and give_freebi…
…e tests - Import FreebieAlreadyGivenError and FreebieNotMineToGiveError in debug.py - Add tests for FreebieNotMineToGiveError and give_freebie function in debug.py - Fix give_freebie method in models.py to include self parameter and raise FreebieNotMineToGiveError
Configuration menu - View commit details
-
Copy full SHA for 93b2d29 - Browse repository at this point
Copy the full SHA 93b2d29View commit details -
docs: add docstrings to models.py methods and improve existing ones
Added and improved docstrings for methods in the `Company`, `Dev`, and `Freebie` classes in `models.py` to enhance code readability and provide detailed information about method functionality, parameters, and exceptions. - Added detailed docstrings to `Company.oldest_company` and `Company.give_freebie` - Added detailed docstrings to `Dev.received_one` and `Dev.give_away` - Improved existing docstrings to follow a consistent format - Added type hints and descriptions for parameters and return values - Added exception descriptions for methods that raise exceptions
Configuration menu - View commit details
-
Copy full SHA for 3f03b06 - Browse repository at this point
Copy the full SHA 3f03b06View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...main