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

Refactor if-else hierarchy in GeneralOpt #232

Closed
ljvmiranda921 opened this issue Aug 21, 2018 · 0 comments
Closed

Refactor if-else hierarchy in GeneralOpt #232

ljvmiranda921 opened this issue Aug 21, 2018 · 0 comments
Assignees
Labels
refactor Better code quality, idiomatic Python v.1.1.0 In pipeline for next version

Comments

@ljvmiranda921
Copy link
Owner

The if-else hierarchy we have works, but looks convoluted & unmaintainable. Better refactor this with private functions or a dict.

Or maybe we should work on how the backend topologies were implemented. I'm thinking of using *args and **kwargs for this, still not sure.

Reference: https://stackoverflow.com/questions/14626279/inheritance-best-practice-args-kwargs-or-explicitly-specifying-parameters

@ljvmiranda921 ljvmiranda921 changed the title **Refactor if-else hierarchy in GeneralOpt** Refactor if-else hierarchy in GeneralOpt Aug 21, 2018
@ljvmiranda921 ljvmiranda921 self-assigned this Aug 21, 2018
@ljvmiranda921 ljvmiranda921 added the refactor Better code quality, idiomatic Python label Aug 21, 2018
@ljvmiranda921 ljvmiranda921 added the v.1.1.0 In pipeline for next version label Sep 9, 2018
@ljvmiranda921 ljvmiranda921 added this to the Refactor Sprint 2018 milestone Sep 9, 2018
This was referenced Sep 10, 2018
ljvmiranda921 added a commit that referenced this issue Oct 1, 2018
This commit removes the if-else hierarchy in GeneralOptimizer
by abstracting some parts of the topologies.
Resolves #232

Signed-off-by: Lester James V. Miranda <[email protected]>
ljvmiranda921 added a commit that referenced this issue Jan 29, 2019
This commit removes the if-else hierarchy in GeneralOptimizer
by abstracting some parts of the topologies.
Resolves #232

Signed-off-by: Lester James V. Miranda <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Better code quality, idiomatic Python v.1.1.0 In pipeline for next version
Projects
None yet
Development

No branches or pull requests

1 participant