Skip to content

MOA (Matrix Operations Application) is a simple web app for editing your Excel matrix.

Notifications You must be signed in to change notification settings

AhmetKaanGuney/moa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MOA

Made with Python Version: 3.9.4

How to Run:

  1. Create a venv inside moa directory
  2. Install requirements in the requirements.txt
  3. Activate venv
  4. Go to moa/app directory
  5. Run python app.py

Description:

MOA (Matrix Operations Application) is a simple web app for editing your Excel matrix.

It's designed for people who want to group the rows and columns inside their Excel matricies quickly and easily. If you have a matrix at the size of 10x10, of course you can do it by hand. But what if you had a matrix size of 64x64. Then things would get really slow and tedious. So MOA was created.

Explaining Modules:

MOA exists of two parts:

  • Matrix processor
  • Web app
  • Inside the moa/app you can see a directory called matrix_processor. That is the part that handles matricies and file conversions. The rest of the files and folders inside moa/app is for the web app part.

    --- Python Modules ---

    Matrix Processor ( moa/app/matrix_processor ):
    Inside matrix_processor directory there are five modules:

    1. converters.py:
      This module handles .xls and .xlsx file formats. It has two classes XlsFile() and XlsxFile(). These classes have a parse() method which will parse the file and return a Matrix() object. They can also take a Matrix() object and write it to a file with their write() method.

    2. errors.py:
      This module has custom errors defined inside it.

    3. group_manager.py:
      This module has a method called build_with() which reads the blueprint that the client has sent and returns a Matrix() object.

    4. matrix_processor.py:
      This is the module that app.py interacts with. This module calls all of the other modules inside this directory.

    5. matrix.py:
      Matrix() object is defined inside here.


    --- Web App Modules ---

    1. /db:
      Has matricies.db inside it. When a client uploads their Excel file it'll get converted to a Matrix() object. Then that Marix() object will be stored inside this table with client's session_id.

    2. /downloads:
      When the client sends an export request, the blueprint that the client sent will be automatically converted to a file and written to this location.

    3. /static:
      Static folder for Flask (a Python framework for web applications). Has gifs, images and JavaScript files inside.

    4. /templates:
      Templates folder for Flask. Has the HTML files inside.

    5. app.py:
      Entry point for the Flask app. Handles serving the web page and client requests.

    6. config.py:
      A config file for Flask. Assigns download location, secret key, etc.

    7. session_id.py:
      Has a Session_ID class. It's just for generating an ID for each session so that it can be stored inside the matricies.db. It has a max limit of 10.000 so after that it'll start from 0 again. So the database cannot get to big. This is to prevent breaking the max memory limit of the pythonanywhere.com.

    Other Files:

    • moa/requirements.txt:
      For creating a venv with pip.
    • moa/env.json:
      For computer specific variables.
    • moa/remote.txt:
      Link to github repo
    • moa/docs: Has buch of documents. You can just ignore these.

    About

    MOA (Matrix Operations Application) is a simple web app for editing your Excel matrix.

    Topics

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published