Giter VIP home page Giter VIP logo

im-viz's Introduction

IM-Viz Web-app

Processmining web application for displaying internal steps of the Inductive Miner

The tool is publicly accessible here: https://im-viz.informatik.uni-mannheim.de

Note: the tool works seamlessly in both Chrome and Firefox, whereas in Safari we occasionally experience issues when displaying the DFG

The corresponding video is provided in this git repository and can be accessed using this link: https://raw.githubusercontent.com/badrecursionbrb/im-viz/main/imdemo.mp4

README

TODO CHECK FOR PRODUCTION

  1. set logging level accordingly (front-end and back-end)
  2. set debug = False in flask app
  3. set new secret key in python flask main.py
  4. When cloning from github onto a server change the constants in /im-app/src/assets/constants.js according to your set up, i.e. most importantly IP address / domain name and the port.
  5. Assure the firewall is configured properly (e.g. firewalld or ufw), also that CORS (in the back-end) is configured properly

How to install?

  1. Having npm / node.js installed: Manual:
https://kinsta.com/blog/how-to-install-node-js/

Download & install node js from here

https://nodejs.org/en/download
  1. verify node / npm (node package manager)
npm --version
Node --version
  1. Install graphviz executables According to the OS you are using follow the steps listed on the following page: https://stackoverflow.com/questions/35064304/runtimeerror-make-sure-the-graphviz-executables-are-on-your-systems-path-aft

  2. check-out (clone) this project to the folder of your choice

  3. Have Python version 3.9+ installed (3.8+ may also be fine)

  4. In the venv folder in

im-viz/pythonproject/venv/Script/

execute the activate file to activate the virtual environment (venv) select the venv python executable in ...../venv/Scripts/ and execute the setup.py like in the following line:

python setup.py install

OR run the setup.py file in the pythonproject folder manually using the venv python.exe

When navigated into the folder of the python.exe:

.\python.exe ..\..\setup.py install
  1. Clone the contained project (pm4py fork) with the venv (if the previous step could not install it using the setup.py):
pip install -e git+https://github.com/badrecursionbrb/pm4py-core.git#egg=pm4py
  1. Execute the flask_app.py using the venv

Now back to the front-end:

  1. Open another terminal instance, as the old one is now running the back-end (can already be tested using Postman)

  2. navigate to im-viz/im-app/

  3. then, to install the node modules, execute:

npm install 

or 

npm i
  1. Run the production build with:
npm run build

then follow the instructions: https://cli.vuejs.org/guide/deployment.html

  1. To compile the fron-end and start the app run (this always has to be run when the app is (re)started, otherwise autocompiles if front-end is changed):
npm run serve
  1. Lints and fixes files
npm run lint
  1. Customize configuration See Configuration Reference.

Vue dependencies

The following list is listed here for the sake of completeness. The application should install with the provided package list in the package.json


####
npm i @fortawesome/fontawesome-free

npm i --save @fortawesome/fontawesome-svg-core

#### Free icons styles
npm i --save @fortawesome/free-solid-svg-icons
npm i --save @fortawesome/free-regular-svg-icons
npm i --save @fortawesome/free-brands-svg-icons

npm i --save @fortawesome/vue-fontawesome@latest-3
npm install @mdi/font
#### More dependencies


npm install @mui/material @emotion/react @emotion/styled
npm install @fontsource/roboto 
npm install @mui/icons-material

npm install webcola --save
npm install -g grunt-cli
npm install -g http-server

also needed for material ui: 
npm init @eslint/config

npm install d3

npm install axios

npm install vuetify
npm install html2canvas
npm install jspdf --save

npm install vue3-picture-swipe

How to install the Python back-end:

Run the setup.py in the subfolder pythonproject (if not already done in the previous steps above)

if the installation of the contained modified PM4PY project does not work, try: pip install -e git+https://github.com/badrecursionbrb/pm4py-core.git#egg=pm4py

Is also for editing the contained modified pm4py forked project

How to debug Flask:

Two ways:

  1. set debug=True in flask_app.run() call in flask_app.py (reloads if code is changed! --> good)
  2. set debug=False in flask_app.run() call in flask_app.py AND then debug with vscode, enables breakpoints!

How to extend the Application?

  1. There are two projects actually:

    • First there is this main project having the python back-end using a Flask API running on Gunicorn and the front-end using Vue with Vuetify and Axios for requests
    • Second there is the project that is a fork of PM4PY. Within that project the changes that are needed on the inductive miner implementations are done.
  2. The second project is contained as a package in the src folder in the virtual environment (venv)

    • To extend the project to more algorithms additionally to the changes that might be needed in the front-end, e.g. like parameter settings, there need to be changes in the backend.
    • It may be necessary to add a json file to have other cases of the inductive miner algorithm or a different description of the algorithm. This description is then edited in a json file in the assets folder.
    • Firstly in the API so the flask_app.py file, to unpack parameters.
    • Secondly in the main.py file a case for the new algorithm variant is needed
    • Most importantly then in the second project (the fork of the PM4PY project) the algorithm_modified_v2.py file has to be modified.
      • a new Variant has to be added to the Enum
      • the case has to be handled in the apply function of that file
    • Then a modified version of the algorithm has to be created like the imf_custom.py or im_custom.py, there it is necessary to look for all the places where the algorithm descends into the tree i.e. a step is done, at each step a pt_node attribute is written in the ProcessTree object that is created and returned by the IM algorithm implementations It is very important to write the DFG in the parameters.
    • It may also be that there are changes needed in the visualization data objects. That depends on the requirements of the IM algorithm algorithm.

im-viz's People

Contributors

badrecursionbrb avatar a-rebmann avatar

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.