artofscience / SAOR

Sequential Approximate Optimization Repository
GNU General Public License v3.0
5 stars 1 forks source link

C901: functions too complex #71

Closed artofscience closed 2 years ago

artofscience commented 2 years ago

Running the pytests I observed some functions are too complex (up to complexity level 17): https://www.flake8rules.com/rules/C901.html

@Giannis1993 majority of those functions are the plot functions you implemented

Adding this issue to reduce complexity of functions

Giannis1993 commented 2 years ago

Some of those functions I just implemented for debugging/monitoring/getting more insights on the optimization (e.g. the plot_pair or the plot_contour functions). I don't think they should be part of the actual package, as the package is intended to be used for TO problems. If you guys think they should remain part of the package, then of course these can be improved a lot.

artofscience commented 2 years ago

Maybe it would be good then to only run flake8 over the actual package.

Giannis1993 commented 2 years ago

Imo, only the Plot class should be part of the package. Classes Plot2 and Plot3 are for developing purposes. We can move them elsewhere if needed.

Giannis1993 commented 2 years ago

Done