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

tui: add vr #5381

Merged
merged 3 commits into from
Apr 1, 2023
Merged

tui: add vr #5381

merged 3 commits into from
Apr 1, 2023

Conversation

oliver-sanders
Copy link
Member

Response to user feedback:

  • Add a --yes option to cylc reinstall / cylc vr.
  • Add cylc vr into cylc tui.

This also presents a box which tells the user that a command is running to avoid confusion with longer-running commands e.g. play, clean, validate-reinstall.

Check List

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

@oliver-sanders
Copy link
Member Author

(bandit a little unhappy)

@oliver-sanders
Copy link
Member Author

(codecov a lottle unhappy)

Copy link
Member

@wxtim wxtim left a comment

Choose a reason for hiding this comment

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

  • Code seems sensible.
  • Tested locally as working.
  • Confirm all tests are failing due to CI issues - Not true!
    • All functional tests passing (failure is on codecov)

I'd observe that VR seems pretty slow, especially to play, _after the task runnin has been closed. I was wondering if we could parse the stderr of the subprocess as it's running and announce when each step is done.

@wxtim wxtim self-requested a review March 23, 2023 11:18
@oliver-sanders
Copy link
Member Author

especially to play, _after the task runnin has been closed.

???

@oliver-sanders
Copy link
Member Author

oliver-sanders commented Mar 23, 2023

I'd observe that VR seems pretty slow

Only as slow as cylc vr itself!

cylc tui displays a command running dialogue so you know it's working.

@oliver-sanders
Copy link
Member Author

I was wondering if we could parse the stderr of the subprocess as it's running and announce when each step is done.

We could stream stdout/err for all commands but that's a big job for another day!

@wxtim
Copy link
Member

wxtim commented Mar 23, 2023

I was wondering if we could parse the stderr of the subprocess as it's running and announce when each step is done.

We could stream stdout/err for all commands but that's a big job for another day!

I spent a few minutes looking and came to this conclusion. I'm jotting it on my training day stuff.

@oliver-sanders
Copy link
Member Author

Those integration test failures don't make a lick of sense, closing / re-opening on the wild offchange that it makes a difference.

@wxtim
Copy link
Member

wxtim commented Mar 23, 2023

I've repro'd the fails locally in a clean environment. :(

@oliver-sanders
Copy link
Member Author

I've got tests passing with Python 3.7 and failing with 3.9 locally, yikes!

@oliver-sanders
Copy link
Member Author

Ach, gottit, the --yes option was only being added if cylc-rose is installed, derp!

@wxtim
Copy link
Member

wxtim commented Mar 24, 2023

Ach, gottit, the --yes option was only being added if cylc-rose is installed, derp!

This fixes it for me - still needs a deconflict.

Haven't approved so that you can poke me and I can press merge once you've sorted it.

Copy link
Member

@MetRonnie MetRonnie left a comment

Choose a reason for hiding this comment

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

Mostly works well. See my comment about the empty error. Another small thing is that when there is an error, the "running command" box still remains so you have to press q again to dismiss it

cylc/flow/tui/data.py Show resolved Hide resolved
cylc/flow/tui/data.py Outdated Show resolved Hide resolved
@oliver-sanders
Copy link
Member Author

when there is an error, the "running command" box still remains so you have to press q again to dismiss it

I think that's right correct behaviour right, it allows the user to read the error message?

)
out, err = proc.communicate()
if proc.returncode != 0:
raise ClientError(f'Error in command {" ".join(cmd)}\n{err}')
Copy link
Member

Choose a reason for hiding this comment

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

What do you think of

Suggested change
raise ClientError(f'Error in command {" ".join(cmd)}\n{err}')
raise ClientError(f'Error in command {" ".join(cmd)}\n{err or out}')

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure the output viewer is up to scratch for displaying the full output (small narrow section of the window).

@hjoliver hjoliver merged commit 16d0bfd into cylc:master Apr 1, 2023
@oliver-sanders oliver-sanders deleted the tui-vr branch April 3, 2023 09:05
@MetRonnie
Copy link
Member

MetRonnie commented May 12, 2023

Wait a minute, doesn't this need to be included in 8.1.x?

Edit: actually just the bit about the empty error box

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

Successfully merging this pull request may close these issues.

4 participants