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
Comments
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
changed the title
Python support: prevent duplicated code
Python support: avoid duplicated code
Nov 26, 2019
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 ourSimulation 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).
The text was updated successfully, but these errors were encountered: