How should I structure/organize a complex python project?

67 Views Asked by At

Problem

I can't wrap my head around this problem, my project is fairly complex and I can't find a way to organize it in order to fill my needs.

I understand this might be very broad statement, so I'll show what I did and then explain the task at hand...

How it's currently organized

Project

  • docs (useful documentation)
  • images (needed for the project)
  • tests (might be useful)
  • main.py
  • utils
  1. init.py
  2. class.py
  3. accuracy.py
  4. template_matching.py
  5. homography.py
  6. sorting_2d.py

Task

I separated my problem into smaller ones:

  1. Compute homography
  2. Perform template matching
  3. 2D sorting
  4. Compute accuracy

I also have a class that is used all across the previously enumerated, some however, need their own class that is only used in 1 file.

I don't know how to organize it better, I feel it's not congruent enough and I might be missing a standard procedure here... I fear it will become hard to interpret or crumble into a pile of spaghetti errors.

If anyone could indicate similar problems that I can take as an example would be great. Or even try to figure how you would organize this one.

Thank you in advance!

0

There are 0 best solutions below