-
Notifications
You must be signed in to change notification settings - Fork 133
Redesign some elements of the experiment view #13272
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,7 @@ class _Column(IntEnum): | |
| _NUM_COLUMNS = max(_Column).value + 1 | ||
| _COLUMN_TEXT = { | ||
| 0: "Name", | ||
| 1: "Created at", | ||
| 1: "Created", | ||
| } | ||
|
|
||
|
|
||
|
|
@@ -83,6 +83,11 @@ def data(self, index: QModelIndex, role: Qt.ItemDataRole) -> Any: | |
| elif role == Qt.ItemDataRole.ToolTipRole: | ||
| if col == _Column.TIME: | ||
| return str(self._start_time) | ||
| elif role == Qt.ItemDataRole.UserRole: | ||
| if col == _Column.TIME: | ||
| return self._start_time | ||
| if col == _Column.NAME: | ||
| return self._name | ||
|
|
||
| return None | ||
|
|
||
|
|
@@ -118,6 +123,11 @@ def data( | |
| if self._children | ||
| else "None" | ||
| ) | ||
| elif role == Qt.ItemDataRole.UserRole: | ||
| if col == _Column.NAME: | ||
| return self._name | ||
| if col == _Column.TIME: | ||
| return self._children[0]._start_time if self._children else None | ||
|
Comment on lines
+126
to
+130
|
||
|
|
||
| return 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.
setExperiment()wraps the created-at computation in a broadexcept Exception, which can silently hide real bugs (e.g., storage access problems) and make UI issues hard to diagnose. Sincestarted_atappears to be adatetime, this can be handled without a blanket exception by filtering/handling empty iterables explicitly (e.g., computeminwith a default, or guard on an empty list) and only catching the specific exceptions you expect.