Giter Site home page Giter Site logo

eee231's Introduction

EEE231 Directed Graph Editor

0. Table of Contents

1. Background

1.0 Install

  • Clone GitHub Repository git clone [email protected]:Spehhhhh/EEE228.git
  • Switch to the directory cd EEE231

1.1 Usage

  • This project uses pipenv to manage the virtual environment.
  • Install Poetry curl -sSL https://install.python-poetry.org | python3 -
  • Set environment variables echo 'export PATH="$HOME/.poetry/bin:$PATH"' >> ~/.zshrc
  • Install package poetry install
  • Activate the virtual environment for the current project poetry shell
  • Generate lockfile poetry lock --no-update
  • Run the main program poetry run python main.py

1.2 Name Convention

  • Class Naming Convention: CapWords
  • Function Naming Convention: lower_with_under()
  • Variables Naming Convention: lower_with_under

1.3 Development Process

Each group develops code in its own branch. After completing the development of the features and writing the unit tests. Pull Request to Main branch.

How do I create a branch?

$ git pull
$ git checkout -b dggui
$ git push --set-upstream origin dggui

How to properly Clone a branch Branch in an upstream repository?

$ git clone https://github.com/pirlite2/EEE231-group-B.git
$ cd EEE231-group-B
$ git checkout -b dggui origin/dggui # git checkout -b {your_local_branch_name} origin/<remote_branch_name>

How do I get my own feature branch to synchronize the code in the main branch?

$ git pull
$ git checkout feature1 # The branch you want to synchronize your code with
$ git merge main

We use Black for code formatting.

2. Architecture

2.0 Module

Module Folder Location Feature Detailed documentation
directedgraph /directedgraph ๐Ÿ”—
dgutils /directedgraph/dgutils Software External Interfaces ๐Ÿ”—
dggui /directedgraph/dggui Software UI ๐Ÿ”—
dgapp /directedgraph/dgapp Software Event ๐Ÿ”—
dgcore /directedgraph/dgcore Graph Resource Model ๐Ÿ”—

2.1 Class

Class Diagram Overview

Class Diagram

Class Feature
directedgraph.dgcore.Graph Used to control Graph
directedgraph.dgcore.GraphComponent Used to control specific Arc and Node
directedgraph.dgcore.Node
directedgraph.dgcore.SourceNode
directedgraph.dgcore.GroundNode
directedgraph.dgcore.Arc
directedgraph.dggui.GraphEditorMainWindow
directedgraph.dggui.InputDialogNode Input Dialog GUI
directedgraph.dggui.InputDialogArc Input Dialog GUI
directedgraph.dggui.NodeItem Node GUI
directedgraph.dggui.SourceNodeItem SourceNode GUI
directedgraph.dggui.GroundNodeItem GroundNode GUI
directedgraph.dggui.ArcItem Arc GUI
directedgraph.dgutils.FileManager Reading and saving XML
directedgraph.dgutils.GraphSimulator Exporting Graph as a simulation file

A GraphEditorGUI instance corresponds to a software window.

A Graph Class instance corresponds to a Directed Graph.

GraphComponent Class is the software component library. All Nodes Class and Arcs Class inherit from GraphComponent.

Most of the Methods in GraphController are Use Cases, where a Method corresponds to some user action on the GUI. For example, when the user clicks the Create button, the GUI calls the Method in the GraphController instead of the GUI manipulating the database directly.

In the case of the FileManager Class, when the user calls read_graph, the function takes a local xml file as an argument, reads the data and returns a Graph instance. Typically, a local xml file will correspond to a Graph instance.

The advantage of this design is that, firstly, the software can launch multiple Graphs and multiple GUI interfaces at the same time. Secondly, the fine-grained class classification makes teamwork less difficult and the GUI team only needs to focus on interface design.

3. License

GNU General Public License v3.0

4. External Link

5. ChangeLog

  • 210507 add Development Process
  • 210501 add Branch
  • 210501 fix Contributors
  • 210414 add Architecture
  • 210412 add Naming Conventions
  • 210324 init

eee231's People

Contributors

akulllll avatar boonkean avatar ela18hy avatar eld20yz avatar github-actions[bot] avatar ipruning avatar lyb1234567 avatar pirlite2 avatar tinytytan avatar

Watchers

 avatar

Forkers

yaoreadingcode

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.