Overview
Project details
Epic users must implement/fix the critical problem in the Restaurant app. The app lacks proper management of available branches in the Cities and the available specific dishes in those cities.
Tracks: Design Patterns
535
number of points you will earn
3
launches to complete the project
13
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 Abstract Factory design pattern.
Project Launches & Tasks
launch_1
-
task_1 (30 points)
-
Create a
domain/models.py
file for domain modeling. -
Create a
City
class withname
,country
, andpopulation
class fields. -
The
name
andcountry
fields must bestr
type and thepopulation
field must be int type. -
Remember to implement unit tests for the City class, and use pytest for tests
-
-
task_2 (25 points)
-
Create a function called
city_factory
withname
,country
, andpopulation
arguments. -
The function must be located in
domain/models.py
. -
name
andcountry
arguments must bestr
type, andpopulation
arguments must be int type. -
The factory should return the type as a
City
class object. -
Remember to implement unit tests for the city_factory method, use pytest for tests.
-
launch_2
-
task_5 (30 points)
-
Create a
Restaurant
class withuuid
,dishes
, andcity
class fields. -
The class must be located in
domain/models.py
. -
uuid
fields must beUUID
type,city
field must beCity
type, anddishes
field must belist
ofDish
. -
Remember to implement unit tests for the Restaurant class, use pytest for tests.
-
-
task_6 (25 points)
-
Create a function called
restaurant_factory
with city and dishes arguments. -
The function must be located in
domain/models.py
. -
city
argument must beCity
type,dishes
argument must belist
type which takesDish
type as value. -
uuid
must be created by generating a random function fromuuid
module. -
The factory should return the type as a
Restaurant
class object. -
Remember to implement unit tests for the restaurant_factory function, use pytest for tests.
-