Overview
Project details
Epic users must help fast-food restaurants manage the burger-making process, including ingredient tracking and order fulfillment.
Tracks: Design Patterns
360
number of points you will earn
3
launches to complete the project
9
tasks to complete the project
This project is part of the following tracks:
Learning outcomes
-
Get adapted to the EpicLaunchX learning style.
-
Understand the flow actions at EpicLaunchX.
-
Explore PR and code best practices, and earn your first points.
-
Learn more about GitHub and master the conventional commit style.
-
Use Makefile extensively, explore code formatting, linting style, etc.
-
Usage of Builder design pattern.
Project Launches & Tasks
launch_1
-
task_1 (45 points)
-
Create a
domain/models.py
file for domain modeling. -
Create a
Burger
class withbread
,patty
,sauce
, andtoppings
class fields. -
The
bread
,patty
, andsauce
fields must bestr
type, toppings field must belist
of strings. -
bread
andpatty
must be a required field, butsauce
andtoppings
can be optional. It has to beNone
if it isn't declared. -
Give
__str__
method to represent the burger. If there isn't sauce or toppings, replace them with "no sauce" or "no toppings" in the__str__
method. -
Remember to implement unit tests for the
Burger
class, use pytest for tests.
-
-
task_2 (25 points)
-
Add marshmallow with version as a production dependency in
pyproject.toml
. -
Use as a reference the given link for the right version of Marshmallow: https://marshmallow.readthedocs.io/en/stable/
-
After adding the marshmallow with the proper version, you have to install it with the make install command.
-
You have to add version
3.21.3
.
-
launch_2
-
task_5 (50 points)
-
Create a
service/burger.py
file to create abstract and concrete builders. -
Create a
BurgerBuilder
class with 5 abstract methods:bread
,meat
,sauce
,toppings
, and build. -
The
bread
method will take 2 arguments:self
andbread
(asstr
). -
The
patty
method will take 2 arguments:self
andpatty
(asstr
). -
The
sauce
method will take 2 arguments:self
andsauce
(asstr
). -
The
toppings
method will take 2 arguments:self
andtoppings
(as list(str
)). -
Raise an error (
NotImplementedError
) if these methods are used without being overridden. -
Remember to implement unit tests for the
BurgerBuilder
class, use pytest for tests.
-
-
task_6 (45 points)
-
Create a
CheeseBurgerBuilder
class which is inherited from theBurgerBuilder
class. -
The class must be located in
service/burger.py
. -
Initialize the class by setting
_bread
,_patty
,_sauce
and_toppings
toNone
-
Implement the
BurgerCreatorBuilder
class's abstract methods for setting given arguments with default values and return self. -
Remember to implement unit tests for the
ChesseBurgerBuilder
class, use pytest for tests.
-