Overview

Project details

In a futuristic smart city, the traffic management system is entirely autonomous and responsible for ensuring smooth traffic flow, minimizing congestion, and responding to incidents.


Tracks: Python

845

number of points you will earn

5

launches to complete the project

19

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 Domain Driven Design(DDD).


Project Launches & Tasks

Note: Only the first 2 of 5 launches are shown below as a preview.

launch_1

  • task_1 (50 points)
    • Create a domain/models.py file to manage the traffic lights state.

    • Create a TrafficLightState class that inherits from the Enum class.

    • Use the enum to change the traffic lights state.

    • Traffic light states must be RED, YELLOW, and GREEN.

    • __str__ method has to return the key's value.

    • Remember to implement unit tests for traffic light states, and use pytest for tests.

  • task_2 (45 points)
    • Create an Intersection class with id and connected_roads class fields.

    • Class must be located in domain/entities.py.

    • The id field must be str type, connected_roads field must be a list of strings.

    • Remember to implement unit tests for an Intersection class, use hypothesis for tests.

launch_2

  • task_6 (35 points)
    • Create a Vehicle class with id, type, speed, current_route, and current_position class fields.

    • Class must be located in domain/entities.py.

    • The id and type fields must be str type, the speed field must be int type, the current_route field must be list of Intersection, and the current_position field must be Intersection type and optional.

    • Implement the move_to_next_intersection method to update the vehicle's current position.

    • Implement the has_reached_destination method to check if the vehicle has reached its final destination. It has to return the bool type.

    • Remember to implement unit tests for a ** Vehicle ** class and its methods, use pytest for tests.

  • task_7 (35 points)
    • Create a function called vehicle_factory with id, type, speed, current_route, and current_position arguments.

    • The function must be located in domain/entities.py.

    • id and type arguments must be str type, speed argument must be int type, current_route argument must be list of Intersection and current_position argument must be Intersection type and optional.

    • Factory should return the type as a Vehicle class object.

    • Remember to implement unit tests for a vehicle_factory function, use pytest for tests.

Log in to launch project