Skip to content
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

Merged
merged 8 commits into from
Nov 17, 2016
Merged

601: gscan groups #2024

merged 8 commits into from
Nov 17, 2016

Conversation

arjclark
Copy link
Contributor

@arjclark arjclark commented Oct 4, 2016

Adds "group" config item to allow collapsing groups of suites in gscan.

A simple suite like this:

title = "Test Suite"
description="Testing grouping options"
group="test group"

[scheduling]
[[dependencies]]
graph = foo

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.

@arjclark arjclark added this to the soon milestone Oct 4, 2016
@arjclark arjclark changed the title 601b.gscan groups 601: gscan groups Oct 4, 2016
@hjoliver
Copy link
Member

hjoliver commented Oct 10, 2016

I wonder if it would be better to define grouping in the user's gscan.rc, for the following reasons:

  • these groups only affect display in gscan (at least I can't think of other uses at this stage...)
  • you can see all group members at a glance (else, have to grep through all suite definitions?)
  • easy to use this new functionality without editing existing (and potentially running) suites

@hjoliver
Copy link
Member

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...)

@arjclark
Copy link
Contributor Author

I wonder if we could have a combined status summary for all group members though

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.

@arjclark
Copy link
Contributor Author

I wonder if it would be better to define grouping in the user's gscan.rc, for the following reasons:

  • these groups only affect display in gscan (at least I can't think of other uses at this stage...)
  • you can see all group members at a glance (else, have to grep through all suite definitions?)
  • easy to use this new functionality without editing existing (and potentially running) suites

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?

@arjclark
Copy link
Contributor Author

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?

@hjoliver
Copy link
Member

Yep, that's fine. I like the idea of defaulting to settings in gscan.rc (if any), but that can be another PR.

@arjclark arjclark self-assigned this Oct 19, 2016
@arjclark
Copy link
Contributor Author

Coming back round to this now - been distracted elsewhere. Working on trying to get group summaries up and running.

@arjclark
Copy link
Contributor Author

arjclark commented Nov 8, 2016

In theory all working now.

@oliver-sanders @hjoliver please review 1 and 2 respectively.

@arjclark arjclark modified the milestones: next release, soon Nov 8, 2016
@arjclark arjclark removed their assignment Nov 8, 2016
@oliver-sanders
Copy link
Member

I'm getting this for the example in the original comment.

screenshot-untitled window

Am I doing something wrong?

@oliver-sanders
Copy link
Member

t/pep8 is failing.

@arjclark
Copy link
Contributor Author

arjclark commented Nov 9, 2016

@oliver-sanders - sorry rebased and broke things. Should be fine now.

@oliver-sanders
Copy link
Member

I've got some strange issues with status icons appearing as black boxes also some (possibly un-related) traceback.

screenshot-cylc gscan-1

screenshot-untitled window-1

@benfitzpatrick
Copy link
Contributor

Those black boxes are ‘unknown’ status, FYI

From: Oliver Sanders [mailto:notifications@github.com]
Sent: 09 November 2016 12:04
To: cylc/cylc
Cc: Fitzpatrick, Ben; Team mention
Subject: Re: [cylc/cylc] 601: gscan groups (#2024)

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


You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHubhttps://github.com//pull/2024#issuecomment-259399423, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABFenTnEbUXZHrWpsscs2Q7uB5dk5VRXks5q8basgaJpZM4KNvZ_.

@arjclark
Copy link
Contributor Author

@oliver-sanders - black box issue resolved, along with a few others.

@arjclark
Copy link
Contributor Author

Cannot reproduce the traceback problem - I believe this isn't a result of this change though.

Copy link
Member

@oliver-sanders oliver-sanders left a 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 = ""
Copy link
Member

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?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope?

Copy link
Contributor Author

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

@oliver-sanders
Copy link
Member

Moved traceback issue to #2061.

@arjclark
Copy link
Contributor Author

Feedback from @oliver-sanders addressed. Over to you @hjoliver (or @matthewrmshin if you want to take it)

@oliver-sanders oliver-sanders removed their assignment Nov 14, 2016
Copy link
Contributor

@matthewrmshin matthewrmshin left a 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"
Copy link
Contributor

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?

Copy link
Member

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.

Copy link
Contributor

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=""),
Copy link
Contributor

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?

Copy link
Contributor Author

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?

@arjclark
Copy link
Contributor Author

@matthewrmshin - default group is now "(ungrouped)". Validation test added.

@matthewrmshin matthewrmshin merged commit 26fa00a into cylc:master Nov 17, 2016
@arjclark arjclark deleted the 601b.gscan_groups branch November 22, 2016 08:41
@hjoliver
Copy link
Member

(Nice work y'all)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants