Skip to content

yatamp/MultiplyLabs

Repository files navigation

*GRex Process Scheduler & Analyzer *

This project is a Flask-based API with SimPy-based job scheduling for GRex processes, providing:

  • Process Execution Analysis
  • Module Downtime Calculation
  • Job Scheduling with Precedence Constraints
  • Parallel Execution Support
  • REST API for Frontend Interaction

Set Up a Virtual Environment

python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate

Install Dependencies

pip install -r requirements.txt

Running the Flask API

python server.py

Running Tests

pytest tests/

Running the Frontend

cd frontend npm install npm start

Running pytest Fails with ModuleNotFoundError: No module named 'src'

export PYTHONPATH=$(pwd) pytest tests/

*GRex Process Scheduler & Analyzer From Terminal *

Running the Simulation for scheduling(you can give n number of files as input)

python -m scripts.run_simulations --schedule data/grex_process_1.csv data/grex_process_2.csv data/grex_process_2.csv --mapping data/human_readable_information.csv

Running the Simulation for analyzing(you can give n number of files as input)

python -m scripts.run_simulations --analyze data/grex_process_1.csv data/grex_process_2.csv --mapping data/human_readable_information.csv

Debugging

If you are encountering any issues while running the installation(pip install -r requirements.txt), follow the below instructions to complete the installation

from macro 'kh_complex_hash_equal' (kh_floats_hash_equal(a.real, b.real) && kh_floats_hash_equal(a.imag, b.imag)) ~^~~~~ pandas/_libs/src/klib/khash_python.h:127:53: note: expanded from macro 'kh_floats_hash_equal' #define kh_floats_hash_equal(a, b) ((a) == (b) || ((b) != (b) && (a) != (a))) ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. error: command '/usr/bin/clang' failed with exit code 1 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pandas Failed to build numpy pandas ERROR: Failed to build installable wheels for some pyproject.toml based projects (numpy, pandas)

Fix:

  1. Upgrade pip, setuptools, and wheel

pip install --upgrade pip setuptools wheel

  1. Install Required System Libraries For macOS:

brew install llvm export PATH="/usr/local/opt/llvm/bin:$PATH" export LDFLAGS="-L/usr/local/opt/llvm/lib" export CPPFLAGS="-I/usr/local/opt/llvm/include" export CC=/usr/local/opt/llvm/bin/clang export CXX=/usr/local/opt/llvm/bin/clang++

For Ubuntu / Debian:

sudo apt update && sudo apt install -y build-essential python3-dev libopenblas-dev liblapack-dev gfortran

For Windows (WSL / MSYS2):

pacman -S mingw-w64-x86_64-gcc

and then run

pip install -r requirements.txt

If you are still having issues installing the dependencies, run the below command to skip creating the virtual environment for managing the dependencies

pip install --no-build-isolation numpy pandas flask flask-cors simpy pytest pytest-cov

About

Assesmnet given by multiply labs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors