-
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: add restore functionality to snapshot restore page #97
Merged
shilorigins
merged 8 commits into
pcdshub:master
from
shilorigins:devagr/restore-snapshot
Nov 12, 2024
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
887d84e
ENH: add restore button and dialog
shilorigins e15f288
MNT: use client._gather_leaves in IOCFactory.from_entries
shilorigins 97c2533
TST: add second linac snapshot
shilorigins 12a3b03
TST: add second linac snapshot to demo config for comparison
shilorigins 26a7ab9
DOCS: pre-release notes
shilorigins 687802d
TST: add basic restore page and dialog tests
shilorigins 630072e
TST: check proper row removed in test_page:test_restore_dialog_remove_pv
shilorigins a7d0268
MNT: replace deleteLater() with close() in RestoreDialog.restore
shilorigins File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
docs/source/upcoming_release_notes/97-restore_functionality.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
97 restore functionality | ||
################# | ||
|
||
API Breaks | ||
---------- | ||
- N/A | ||
|
||
Features | ||
-------- | ||
- add RestorePage table tooltips with PV name, status, and severity | ||
- add working restore button and dialog to RestorePage | ||
|
||
Bugfixes | ||
-------- | ||
- N/A | ||
|
||
Maintenance | ||
----------- | ||
- use signals and slots to coordinate RestorePage table live data display status | ||
- add second linac snapshot, and include in demo config | ||
|
||
Contributors | ||
------------ | ||
- shilorigins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,4 @@ ca = true | |
pva = true | ||
|
||
[demo] | ||
fixtures = linac_data | ||
fixtures = linac_data comparison_linac_snapshot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>Form</class> | ||
<widget class="QWidget" name="Form"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>382</width> | ||
<height>395</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Form</string> | ||
</property> | ||
<layout class="QGridLayout" name="gridLayout"> | ||
<item row="0" column="0" colspan="2"> | ||
<widget class="QLabel" name="topLabel"> | ||
<property name="text"> | ||
<string>PVs to Restore</string> | ||
</property> | ||
<property name="alignment"> | ||
<set>Qt::AlignCenter</set> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="1" column="0" colspan="2"> | ||
<widget class="QTableWidget" name="tableWidget"/> | ||
</item> | ||
<item row="2" column="1"> | ||
<widget class="QPushButton" name="restoreButton"> | ||
<property name="text"> | ||
<string>Restore</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="2" column="0"> | ||
<widget class="QPushButton" name="cancelButton"> | ||
<property name="text"> | ||
<string>Cancel</string> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
<resources/> | ||
<connections/> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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'm not sure I'm on board with requiring the
IocFactory
to also be passed a client, when all it's doing is gathering leaf entries. That means if we want to use this elsewhere, we need to construct a validClient
with a backend that holds the entries.I know it's a bit repetitious, but here I think it could be justified
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 like it either. I don't mind re-implementing the gather method if we have to, but the entries being passed had UUID children that needed to be resolved. I can look into why the UUIDs were swapped in, but lazy loading feels like it's causing duplicate code in multiple places, and maybe we should revisit its implementation.
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.
Agreed 100%. I think throughout the UI it's not unreasonable to expect the client to exist, and call its
.fill()
method or something similar. (Maybe we add afilled=True
optional argument toClient.search()
or something as well)I think in the test suite unless elsewise specified it's ok to have all the Entry's be filled. I think if you ever use the Filestore backend you'll end up getting lazy
Entry
's