-
Notifications
You must be signed in to change notification settings - Fork 3
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
ENH/REF: refactor shared table views #90
Conversation
…om QTableViews for simplicity of use and ease of extensibility
…table flags, improve enum handling
808d661
to
6a25bed
Compare
…Add set_editable method to views
…leModel to be editable similar to LivePVTableModel
Not requesting a review from Devan, as he's on vacation. This was starting to snowball (as always), so I'll cut this off here. Everything was originally in service of making the cells editable. Lots of little things got hit along the way |
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.
Partial review: I'll need to start again at the views definitions when I feel less tired
value_time = await caget(address, format=dbr.FORMAT_TIME) | ||
value_ctrl = await caget(address, format=dbr.FORMAT_CTRL) |
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.
Possibly we can do this in parallel for some minor performance gains to cut the network waiting time in half
not 100% sure on syntax etc
value_time = await caget(address, format=dbr.FORMAT_TIME) | |
value_ctrl = await caget(address, format=dbr.FORMAT_CTRL) | |
value_time, value_ctrl = await asyncio.gather( | |
caget(address, format=dbr.FORMAT_TIME), | |
caget(address, format=dbr.FORMAT_CTRL), | |
) |
The result looks great though, next time I'll try to run it myself and read through the code with renewed energy |
@tangkong what's the best way for me to run superscore and try this out myself? |
This should work $ export SUPERSCORE_CFG=/path/to/repo/superscore/superscore/tests/config.cfg
$ python -m superscore ui |
Nothing in the code stands out as odd and there's a lot of qt stuff that's hard to parse through, so instead I'm going to reset my environment and approach this from a qa perspective |
I'm not sure what I'm doing wrong, maybe I don't understand how to use the ui. I can't view any of the configs. |
We don't have entry-specific pages for anything but the What are you trying to get to that isn't working? |
I guess I was expecting to be able to open a page and see one of these views in action |
…utton_cols to keep track of cols to skip setData on
Ok I clicked around on the new collection gui Feel free to ignore any of these if they are already known or are pre-existing issues
Here's the diff from my db:
Note how the description and title are arrays of strings instead of strings Anyway sorry for only having bugs to report, I think the snapshot gui from your screenshot above looks the most snazzy but I couldn't figure out how to get to it |
No, thank you for the bug reports. Helps keep me honest. The editable delegates aren't immediately accessible, since the existing pages don't support editing values by design. I'm currently working on some additional pages that should expose this more clearly (hopefully) I'll go through the bugs and see what I can fix. 👍 |
There were stray commas somehow, making strings into tuples. Validation errors and saving title/descriptions into lists should be fixed in ef4bc1f |
Tags will remain broken until we actually implement the feature. Part of the problem is that the All this to say I'm not going to work on this further for now. 😢 |
If you're interested in running a slightly modified collection builder page to see the delegates work, you can run this file:
|
It has become abundantly clear that this was written during the heat wave. The quality is awful. Thank you for being patient. I've got many test cases to write, now that I've caught so many little bugs |
I think this is probably mature enough to merge with some documentation of things to be fixed later |
Thanks for the thorough QA. I'll make some followup issues and add some tests before re-requesting a review+stamp |
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 think I only had testing nitpicks
yield view | ||
|
||
view.model().stop_polling() | ||
qtbot.wait_until(lambda: not view.model()._poll_thread.isRunning()) |
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 test has no assert statements. Is there nothing specific to test for in the basic behavior of getting values?
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 is actually a fixture that I use in the subsequent tests. In making it I did reveal to myself some smaller bugs, so in spirit it is also sort of like a test
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.
new rule: no code reviews from me after 5pm
Co-authored-by: Zachary Lentz <[email protected]>
I'll merge this now, and try to help Devan either refactor his table usage or fix it up after he merges his effort. |
Thanks everyone for the reviews! |
Description
LivePVTableView
Motivation and Context
Going about adding more functionality.
How Has This Been Tested?
Interactively, ensuring existing tests run
Where Has This Been Documented?
This PR
enum ValueDelegate
double ValueDelegate (must be < 0)
Pre-merge checklist
docs/pre-release-notes.sh
and created a pre-release documentation page