Refactored functions with inheritance
This MR does not add any new code, but shifts existing code around. I felt that discretize.py
was growing too big, so I refactored code into thematically fitting classes and then let discretize.py
inherit from those classes. This will also help me to easily re-use functions in the upcoming MRs.
-
basicclass.py
(NEW): almost every class now inherits from this class. Does the check for config and log parameters that used to be in each class' constructor. -
config.py
(NEW): here is now all the configuration initialization code fromdiscretize.py
. -
spatialfunctions.py
(NEW): all generic spatial functions fromdiscretize.py
(for now it's only 1 function) -
quadtile.py
(NEW): all functions fromdiscretize.py
that calculate something tile related. Inherits fromspatialfunctions.py
. -
discretize.py
now inherits from, both,config.py
andquadtile.py
.
Nothing else changed, but discretize.py
is now ~400 lines of code smaller, making it better readable and giving the project as a whole a better structure.