-
Notifications
You must be signed in to change notification settings - Fork 93
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
601: gscan groups #2024
601: gscan groups #2024
Conversation
I wonder if it would be better to define grouping in the user's
|
This looks good, on a quick test. I wonder if we could have a combined status summary for all group members though? (may be too difficult, just wondering...) |
It's certainly something I'm planning on trying to do - there's a few bits that'll be a pain to do given how we extract status information from suites but I don't see it as not being possible. |
I can see both sides of this tbh. @cylc/core - any preferences either way and if we went down @hjoliver's route how you'd ideally like to see this configured? |
So, we've had a bit of a chat on our end (primarily me and @dpmatthews) and can see both arguments for where the configuration option should be. On the one hand, putting it in the suite.rc seems the natural place to put it and exposes the setting to the user rather than burying it away in a gcylc.rc file where it risks being forgotten about/not used and becomes an extra file to modify etc. On the other having it in the gcylc file would mean you could easily change the grouping for running suites after, say, spinning up a set of operational suites and then having to subsequently reload them to apply a change in grouping. In the long term there's no reason why we couldn't support both with e.g. gcylc.rc providing default group values which then suite.rc entries could override. For now though, we'd prefer to go with the solution here and then, based on uptake/usage, we could extend to the gcylc.rc as well in a future pull request. Does this sound ok to you @hjoliver? |
Yep, that's fine. I like the idea of defaulting to settings in gscan.rc (if any), but that can be another PR. |
Coming back round to this now - been distracted elsewhere. Working on trying to get group summaries up and running. |
a0d65b0
to
072b8da
Compare
In theory all working now. @oliver-sanders @hjoliver please review 1 and 2 respectively. |
|
@oliver-sanders - sorry rebased and broke things. Should be fine now. |
Those black boxes are ‘unknown’ status, FYI From: Oliver Sanders [mailto:notifications@github.com] I've got some strange issues with status icons appearing as black boxes also some (possibly un-related) traceback. [screenshot-cylc gscan-1]https://cloud.githubusercontent.com/assets/16705946/20137754/4e3cfd6a-a674-11e6-902b-a382da8fc628.png [screenshot-untitled window-1]https://cloud.githubusercontent.com/assets/16705946/20137765/620878b0-a674-11e6-8189-8c7772bf26c4.png — |
@oliver-sanders - black box issue resolved, along with a few others. |
Cannot reproduce the traceback problem - I believe this isn't a result of this change though. |
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.
Works great, code looks fine. Couple of very minor points.
@@ -1123,10 +1181,35 @@ def update(self): | |||
) | |||
title = suite_info.get("title") | |||
|
|||
group = suite_info.get("group") | |||
if group is None: | |||
group = "" |
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.
group="Un-grouped"
might be more helpful.
@@ -1144,27 +1227,31 @@ def update(self): | |||
if state != TASK_STATUS_RUNAHEAD: | |||
# 'runahead' states are usually hidden. | |||
states_text += '%s %d ' % (state, number) | |||
# Extractable counts here? |
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.
Nope?
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.
As it turned out, no
Moved traceback issue to #2061. |
Feedback from @oliver-sanders addressed. Over to you @hjoliver (or @matthewrmshin if you want to take it) |
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.
Minor comments. OK otherwise.
@@ -1123,10 +1181,35 @@ def update(self): | |||
) | |||
title = suite_info.get("title") | |||
|
|||
group = suite_info.get("group") | |||
if group is None: | |||
group = "ungrouped" |
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 wonder if a string like (default)
is better here?
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 "ungrouped" is clearer.
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.
In which case, can we do (ungrouped)
in bracket to make it clearer that we have not got a group called ungrouped?
@@ -203,6 +203,7 @@ def _coerce_parameter_list(value, keys, _): | |||
SPEC = { | |||
'title': vdr(vtype='string', default=""), | |||
'description': vdr(vtype='string', default=""), | |||
'group': vdr(vtype='string', default=""), |
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.
Worth adding a simple validate test for this new setting?
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.
What did you have in mind?
Conflicts: lib/cylc/gui/gscan.py
2a85934
to
7030712
Compare
@matthewrmshin - default group is now "(ungrouped)". Validation test added. |
(Nice work y'all) |
Adds "group" config item to allow collapsing groups of suites in gscan.
A simple suite like this:
will appear under a "Group" heading of "test group", if displayed in gscan.
@oliver-sanders - can you take an initial cursory look as someone else who's had to work with this recently? (also includes the indexing "fix" discussed)
Not ready for full review/merge yet.