-
Notifications
You must be signed in to change notification settings - Fork 105
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
Allow user to write stuff into iterDict #311
Conversation
Codecov Report
@@ Coverage Diff @@
## main #311 +/- ##
=======================================
Coverage 84.18% 84.19%
=======================================
Files 22 22
Lines 3332 3334 +2
=======================================
+ Hits 2805 2807 +2
Misses 527 527
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hmm not sure what's going on with the Windows build, I just re-triggered it. |
@@ -673,6 +673,10 @@ def _snstop(self, ktcond, mjrprtlvl, minimize, n, nncon, nnobj, ns, itn, nmajor, | |||
if not self.storeHistory: | |||
raise Error("snSTOP function handle must be used with storeHistory=True") | |||
iabort = snstop_handle(iterDict) | |||
# write iterDict again if anything was inserted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't fully understand this change. Does iterDict
get written again or overwritten? Also, does this happen strictly if anything was inserted or are you saying write it again in case anything was inserted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It gets updated (in the Python dictionary sense) by the new iterDict
, then written into the history file. There is no check so this is performed every time. What this mean is that new values/entries are written, but if the user removed an entry or something, the entry remains in the history file.
It looks like the Windows failure is unrelated to this change, so I am merging this. |
Purpose
This PR allows the user to add/modify/remove entries in the iterDict which is passed to the user. This offers a second way of adding information to the history file (the first being adding stuff into
funcs
).Expected time until merged
A few days
Type of change
Testing
Checklist
flake8
andblack
to make sure the Python code adheres to PEP-8 and is consistently formattedfprettify
or C/C++ code withclang-format
as applicable