Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganize complex functions and adjust flake8 conf appropriately #149

Open
SeBecker opened this issue Sep 10, 2018 · 3 comments
Open

Reorganize complex functions and adjust flake8 conf appropriately #149

SeBecker opened this issue Sep 10, 2018 · 3 comments

Comments

@SeBecker
Copy link
Member

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

  • print_info in simulate/simulate_auxiliary.py
  • print_logfile and write_comparison in estimate/estimate_output.py
  • test2 and test4 in test/test_unit.py
  • check_types and process in red/red_auxiliary.py
  • read_desc in test/auxiliary.py
  • generate_random_dict and print_dict in test/random_init.py
@SeBecker
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Small enhancements debugging
  
Awaiting triage
Development

No branches or pull requests

1 participant