-
Notifications
You must be signed in to change notification settings - Fork 8
[CX-1181] Feat: lazychain #48
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #48 +/- ##
=========================================
+ Coverage 81.42% 82.32% +0.9%
=========================================
Files 16 18 +2
Lines 845 956 +111
=========================================
+ Hits 688 787 +99
- Misses 157 169 +12
Continue to review full report at Codecov.
|
6fe79cd to
4610013
Compare
afa234f to
0e2be45
Compare
| # Then | ||
| assert len(sct_dict) == 3 | ||
| assert sct_dict["has_chosen"] == check_simple.has_chosen | ||
| assert sct_dict["success_msg"] == check_simple.success_msg |
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.
Why not check the third one?
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.
Looks like a clear improvement. I think the following is still needed for maintainability:
- Add more documentation (especially to sct_syntax and sct_context)
- Improve test coverage even more
- Find a way to split up sct_syntax further
But this is no reason to block progress.
vvnkr
left a comment
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 approve, but do have some remarks.
Currently, there are 48 commits. Can we squash these into 4 commits, related to:
- Refactor of feedback
- Refactor of F to LazyChain
- Debugging logic
- Add
xwhatembeddings
If that's too much work, I'm fine with not doing it... It's just something I'd do.
protowhat/sct_context.py
Outdated
| """ | ||
| Create the globals that will be available when running the checks for the embedded technology. | ||
| Extra keyword arguments are passed to the constructor of the State for the embedded technology. |
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.
Are they? Where?
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.
This used to be true, now the only extra arg is derive_custom_state_args, whose return value is used as kwargs when constructing the state.
I will swap **kwargs by derive_custom_state_args=None in this function and refer to create_embed_state in the docstring.
protowhat/Feedback.py
Outdated
| msgs = msgs[-3:] | ||
|
|
||
| # format messages in list, by iterating over previous, current, and next message | ||
| for prev_d, d, next_d in zip([None, *msgs[:-1]], msgs, [*msgs[1:], None]): |
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.
d stands for?
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 copied this from the old method on State, it stands for 'dict' I think.
normal callables should also work
TODO: decide on consistent property name
the removed path is no longer called
fd0da87 to
0f24460
Compare
This PR builds on #42, so the full diff includes those changes as well.
Main work: