Conversation
…and filling placeholders. Attempts helpful highlighting
…el. (to facilitate proxy models)
…ry contains placeholders (look past title/desc), add swap mode button text, filter for incomplete placeholders
…ements itself. This enables better placeholder detection
…end to template widget
…fixing dirty status issues
…ion from template
| self.convert_template_button.show() | ||
|
|
||
|
|
||
| class SnapshotPage(NestablePage[Snapshot]): | ||
|
|
||
| def setup_ui(self): | ||
| super().setup_ui() | ||
| self.convert_template_button.hide() |
There was a problem hiding this comment.
Nitpick confusion for me: what's up with the on-start show in some pages and hide in others for this button? I'd assume either they'd all have the same default state from the ui file (shown?) or the correct state in the ui file, so at least one of these would have to be redundant
There was a problem hiding this comment.
You're right, one of them is redundant. Maybe my past self was just wanting to be explicit about it.
There was a problem hiding this comment.
Makes sense, no need to dwell on it I guess
| Templating helpers. Widgets for creating and filling templates. | ||
|
|
||
| TODO: | ||
| - consider {{}} in CA requests, seems to bait out caproto errors? |
There was a problem hiding this comment.
Maybe this is because this is part of the syntax for getting many PVs at once
$ caget IM{2..5}K{2,4}:PPM:MMS
IM2K2:PPM:MMS -8.49755
IM2K4:PPM:MMS -8.6066
IM3K2:PPM:MMS -9.6155
IM3K4:PPM:MMS -5.8363
IM4K2:PPM:MMS -10.8074
IM4K4:PPM:MMS -9.2909
IM5K2:PPM:MMS -72.035
IM5K4:PPM:MMS -5.1274
There was a problem hiding this comment.
I definitely knew this at one point and forgot. This opens the door to the idea that maybe people might want to specify pvs via this multi-pv syntax... I definitely don't support that here yet
| logger = logging.getLogger(__name__) | ||
|
|
||
|
|
||
| class FillColors(Enum): |
There was a problem hiding this comment.
This stuck out to me as a nifty helper class
| self.remove_button.hide() | ||
|
|
||
|
|
||
| class HighlightProxyModel(QtCore.QIdentityProxyModel): |
There was a problem hiding this comment.
QIdentityProxyModel was a new one for me- seems useful
| NestableHeader.DESCRIPTION | ||
| ): | ||
| break | ||
| if f"{{{{{placeholder}}}}}" not in val: |
There was a problem hiding this comment.
Food for thought: this interaction between f strings and multiple brackets suggests to me that a different placeholder format should have been used- probably one not natively included in python syntax.
There was a problem hiding this comment.
That's a good point, I'm open to suggestions here. I wanted something that was unlikely to show up in an EPICS PV, and curly braces seem to conflict with built-in CA syntax. "<>" and "[]" also seem like valid characters. Maybe something non-alphanumeric?
%% * %%!! * !!
| - These widgets are "placeholder_*" | ||
|
|
||
| Right panel ("Template Substitutions") is for replacing templates with | ||
| new desired text | ||
| - These widgets are "substitute_*" |
There was a problem hiding this comment.
DOC: perhaps these widget naming schemes are out of date- I see stuff like *_placeholder below, for example- maybe should be removed or corrected?
|
Code looks super reasonable- I'm going to do interactive testing for this one because the screenshots look good |
|
I tried to open this with but it didn't quite work when I went to fill the template in the sample collection am I doing something silly? |
|
Oh whoops apparently I left out a fix I made to allow opening entries that don't yet exist in the backend. That's what I get for accumulating a bunch of minor logging fixes, I end up missing stuff in the working area |
… _Backend.save_entry (unifying with DirectoryBackend)
|
I've addressed the bugs Zach pointed out during our live QA session. These included:
|
ZLLentz
left a comment
There was a problem hiding this comment.
Re-approving, but I'll let this sit dormant/unmerged for now
Description
There's still a variety of things to do here:
Motivation and Context
One of the big asks is to be able to template Collections.
Some relatively big decisions that were made:
How Has This Been Tested?
Interactively for now
Where Has This Been Documented?
This PR
Pre-merge checklist
docs/pre-release-notes.shand created a pre-release documentation page