OpenSourceEconomics / grmpy

Python package for the simulation and estimation of generalized Roy model
http://grmpy.readthedocs.io
MIT License
19 stars 5 forks source link

Reorganize complex functions and adjust flake8 conf appropriately #149

Open SeBecker opened 6 years ago

SeBecker commented 6 years ago

So far our flake8 configuration file ignores complexity issues. We have to reorganize some functions. This concerns in particular:

SeBecker commented 5 years ago

I will start with this soon. The first step will include the implementations of janos' suggestions regarding the reading/printing process of the initialization files. Nevertheless this will be a bit time consuming since i have to ensure that this changes do not affect the results. I will provide an update as soon as I am able to present a first draft.

SeBecker commented 5 years ago

I reorganized the whole random init file generating process since it was far to complex for fitting the flake8 standards. I was capable of reducing the number of code lines from over 400 to a little bit more than 200 while maintaining all current features except the specification of categorical variables. You can find the current draft here. The next steps will be to reorganize the read process as well as writing tests for comparing the old and the new random init file generator/read process via our regression test battery.

SeBecker commented 5 years ago

I added a new draft for the initialization file import process (see here). The draft also includes a test setup which compares simulation results obtained with the help of the old import process with results that use the new one. This test is based on our regression test battery (see: Test3).