A project developed by team EQI for the 2024 Fall semester course.
Team Members:
- Emily Riley (GitHub Profile) - Developer
- Quang Bui (GitHub Profile) - Developer
- Israel Gonzalez (GitHub Profile) - Developer
This project is a collaborative effort developed by Team EQI for the Fall 2024 semester as part of the CSCI 420 course. The primary focus of the course is to encourage collaboration, teamwork, and the principles of software development in a group setting. Throughout the semester, the team will work together to design, build, and refine a functional software program.
Our project aims to showcase the collective skills of the team by integrating individual contributions into a cohesive system. By leveraging version control, effective communication, and shared responsibility, this project emphasizes the importance of collaboration in modern software development. The program's final product will demonstrate core programming concepts while fostering an environment of continuous learning and teamwork.
-
Python version: To ensure compatibility, the Python version must be 3.12.x (where 'x' can be any sub-version). You can download and install the latest version of Python 3.12 from the official website here Download Python 3.12.
-
pip: Ensure that
pip
is installed, as it is required to create the virtual environment and install dependencies. Ifpip
is not installed, follow the instructions on how to install it here.
Please make sure to update your environment accordingly.
Follow these steps to set up and run the project on your local machine:
Clone the project repository from GitHub to your local machine using the appropriate command for your operating system:
- Windows (Powershell):
git clone https://github.com/mucsci-students/2024fa-420-EQI.git; cd 2024fa-420-EQI
- macOS and Linux:
git clone https://github.com/mucsci-students/2024fa-420-EQI.git && cd 2024fa-420-EQI
-
Then create the virtual environment by typing the commands below:
-
Windows (Powershell):
python -m venv venv
-
macOS and Linux:
python3 -m venv venv
- To run GUI
- Windows (Powershell):
python build.py
- macOS and Linux:
python3 build.py
- To run CLI
- Windows (Powershell):
python build.py --cli
- macOS and Linux:
python3 build.py --cli
To run all tests and generate a coverage report in XML format, use the following command:
Note: If you haven't run build.py, ensure that dependencies like pytest and coverage are installed by running:
pip install -r requirements.txt
Then, to execute tests and create a coverage report:
-
Run tests and create a coverage report:
python run_tests.py
This project utilizes several design patterns to promote efficient, maintainable, and scalable code. Below is an outline of the main patterns implemented:
-
Purpose: Separates the application into three interconnected components, allowing for modularity and separation of concerns.
-
Components:
- Model: Handles core data structures and business logic, including class and relationship management.
- View: Manages user interface elements and displays data to the user. Both GUI and CLI views are provided.
- Controller: Acts as an intermediary between Model and View, processing input and updating the Model and View accordingly.
-
Purpose: Implements a publish-subscribe model where observers are notified of changes in the subject they are observing. This allows for automatic updates across components.
-
Components:
- Observable (Subject): UMLModel — Notifies observers when changes are made to the model.
- Observers: Defined in uml_observer.py located at 2024fa-420-EQI/UML_MVC/uml_observer.py .Various classes subscribe to UMLModel to respond to updates, ensuring synchronized changes.
-
Purpose: Provides a way to encapsulate actions (commands) as objects, allowing for operations such as undo and redo. This design pattern is especially useful for maintaining an action history.
-
Components:
-
Invoker: Manages executing commands and handling the history stack for undo/redo.
-
Command Interface: Each action (like adding, deleting, or modifying elements) implements this interface, making these operations reversible.
-
Concrete Commands: Specific command objects for each action, holding the necessary data for undoing and redoing operations.
-
Location in Code: The Command Pattern for undo and redo is implemented within 2024fa-420-EQI/UML_MVC/uml_command_pattern.py
-
-
Purpose: Ensures a class has only one instance and provides a global point of access to that instance
-
Components:
- MainWindow: The MainWindow class uses the Singleton pattern to limit the application to a single main window instance. This centralizes all GUI interactions, preventing multiple conflicting windows and ensuring unified control over the interface.
-
Implementation:
- Private Instance Variable: _instance holds the single instance of MainWindow.
- Custom new Method: Overrides the default constructor to check if _instance is None before creating a new instance, raising an error if a second instance is attempted.
- path: 2024FA-420-EQI/UML_MVC/UML_VIEW/uml_gui_view.py