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

Python support: merge duplicated code #2225

Closed
agarny opened this issue Nov 24, 2019 · 0 comments
Closed

Python support: merge duplicated code #2225

agarny opened this issue Nov 24, 2019 · 0 comments
Assignees
Labels
Milestone

Comments

@agarny
Copy link
Contributor

agarny commented Nov 24, 2019

As a result of our Python support, some bits of code had to be duplicated (yuck!). One such code is the one for opening a simulation. Indeed, that code can be used either from our new Python Console window (in which case, it will involve our Simulation Experiment view, if it is loaded) or from a standard Python shell (see here and here, respectively).

Now, as might be expected, there is quite a bit of overlap in that kind of code, which in turn means that it could potentially cause problems when it comes to maintenance (easy to forget to update the "duplicated" code). So, to solve that problem, we should rely on inline code (as we are already doing for our CLI/GUI utilities; see here for example).

@agarny agarny added the Task label Nov 24, 2019
@agarny agarny added this to the 0.7 milestone Nov 24, 2019
@agarny agarny self-assigned this Nov 24, 2019
@agarny agarny changed the title Python support: improve "duplicated" code Python support: prevent duplicated code Nov 24, 2019
agarny added a commit to agarny/opencor that referenced this issue Nov 26, 2019
agarny added a commit to agarny/opencor that referenced this issue Nov 26, 2019
agarny added a commit to agarny/opencor that referenced this issue Nov 26, 2019
@agarny agarny changed the title Python support: prevent duplicated code Python support: avoid duplicated code Nov 26, 2019
@agarny agarny changed the title Python support: avoid duplicated code Python support: merge duplicated code Nov 26, 2019
agarny added a commit to agarny/opencor that referenced this issue Nov 26, 2019
agarny added a commit to agarny/opencor that referenced this issue Nov 26, 2019
agarny added a commit to agarny/opencor that referenced this issue Nov 26, 2019
agarny added a commit to agarny/opencor that referenced this issue Nov 26, 2019
agarny added a commit to agarny/opencor that referenced this issue Nov 27, 2019
agarny added a commit to agarny/opencor that referenced this issue Nov 27, 2019
agarny added a commit to agarny/opencor that referenced this issue Nov 27, 2019
@agarny agarny closed this as completed in 734637c Nov 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant