cylc-ui icon indicating copy to clipboard operation
cylc-ui copied to clipboard

added cyclepoint grouping with subgraphs

Open markgrahamdawson opened this issue 10 months ago • 2 comments

Partly addresses #1130

  • Added button to graph view to group nodes by cycle point.
  • Works for timeseries and integer
  • Option state saves when moving between workflows

---initial notes on work--- For the time being - figure out a means of drawing a dotted box around nodes that share a cyclepoint. This can be done with graphviz subgraphs The graphviz dot code is returned from the getDotCode function in Graph.vue view Dot code can be rendered with dot foo.dot -Tpng -o foo.png ultimately in the svg there will need to be a rect tag added...

Check List

  • [x] I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • [x] Contains logically grouped changes (else tidy your branch by rebase).
  • [x] Does not contain off-topic changes (use other PRs for other changes).
  • [x] Applied any dependency changes to both setup.cfg (and conda-environment.yml if present).
  • [x] Tests are included (or explain why tests are not needed).
  • [x] CHANGES.md entry included if this is a change that can affect users
  • [x] Cylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.
  • [x] If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

markgrahamdawson avatar Apr 19 '24 15:04 markgrahamdawson

The amount of margin between subgraphs is random unless made explicit

No margin image

Margin set in code image

Im guessing the second one is better?

markgrahamdawson avatar Apr 22 '24 16:04 markgrahamdawson

Def prefer the second one.

hjoliver avatar Apr 22 '24 23:04 hjoliver

Bumping this forward to the 8.3 meta-release as this should be ready to go in before cylc-flow blockers.

It would be good to get a screenshot of this into the "changes" section in cylc-doc: https://cylc.github.io/cylc-doc/nightly_8.3/html/reference/changes.html#cylc-8-3

oliver-sanders avatar May 14 '24 09:05 oliver-sanders

Got a PR against this at https://github.com/markgrahamdawson/cylc-ui/pull/5

MetRonnie avatar May 14 '24 18:05 MetRonnie

Managed to get a workflow into a state where there's an grouping with the title "undefined".

And transposing this graph gives a console error (resolved)

image

MetRonnie avatar May 14 '24 18:05 MetRonnie

to a state where there's an grouping with the title "undefined". And transposing this graph gives a console error. Will see if I can figure out anything else tomorrow

Do you have the flow.cylc file?

markgrahamdawson avatar May 15 '24 09:05 markgrahamdawson

I've also noticed that on the complex workflow switching on the 'group by cycle point' it can result in some graph edges (I think thats the correct term for arrows) go nowhere...

'group by cycle point off' image

'group by cycle point on' image

markgrahamdawson avatar May 15 '24 10:05 markgrahamdawson

Hmm, I didn't notice any issues with the complex workflow when I tested it. Will need the dot code to debug this. Given that the edges (yes that's right word) lead outside of the subgraph, I expect there may be an issue with the formatting of the subgraph dot code.

When I read through the code I think I spotted a missing newline at the end of the subgraph. I thought it was harmless, but it might be worth checking that's not causing issues.

oliver-sanders avatar May 15 '24 10:05 oliver-sanders

Managed to get a workflow into a state where there's an grouping with the title "undefined"

Also the 3 tasks are showing as "state unknown" while the jobs are showing as running. But these are from an earlier cycle and have actually already succeeded. Might be something to do with simulation mode. Or actually #1635?

MetRonnie avatar May 15 '24 10:05 MetRonnie

Got a fix for the arrows pointing nowhere (and the console error) in https://github.com/markgrahamdawson/cylc-ui/pull/5

MetRonnie avatar May 15 '24 12:05 MetRonnie

:+1:

oliver-sanders avatar May 17 '24 11:05 oliver-sanders

(added a changes entry in cylc-doc https://github.com/cylc/cylc-doc/pull/733)

oliver-sanders avatar May 17 '24 12:05 oliver-sanders