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

Remove useless text editor config. #4993

Merged
merged 3 commits into from
Jul 25, 2022

Conversation

hjoliver
Copy link
Member

This is a small change with no associated Issue:

  • remove "your favourite text editor" config items, and associated code.

The primary reasons for having a configurable editor in Cylc were the cylc trigger --edit and cylc edit commands, neither of which exist any more. (Although the config reference docs still say it is to configure "your favourite editor for editing workflow definitions").

The only remaining use of the configured editor is:

  • cylc cat-log --mode=edit
  • cylc view (which weirdly defaults to edit instead of stdout)

These are essentially pointless - if you want to view output in your editor, direct the stdout to a file first, or to your editor's stdin.

NB: the config change proposal notes that we agreed in the workshop to keep the editor config but discourage its use. Maybe we had not decided the fate of cylc edit at that point though.

Requirements 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.
  • Does not need tests (code removal only).
  • Appropriate change log entry included.
  • No documentation update required.

@hjoliver hjoliver self-assigned this Jul 21, 2022
@hjoliver hjoliver added this to the cylc-8.0.0 milestone Jul 21, 2022
@hjoliver
Copy link
Member Author

(Not a blocker for 8.0 obviously, but it removes some crud and should be a trivial review-and-merge)

@oliver-sanders
Copy link
Member

oliver-sanders commented Jul 21, 2022

or to your editor's stdin

Valid advice providing you s/(code|emacs)/vim.

cylc view (which weirdly defaults to edit instead of stdout)

That's long bugged me.

@hjoliver hjoliver marked this pull request as ready for review July 21, 2022 23:35
@hjoliver
Copy link
Member Author

Tests all passing now. One review will do.

@wxtim wxtim self-requested a review July 22, 2022 10:09
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.

  • Mostly happy
  • Played with locally

Asking for addition of obsoletion messages so that anyone with an older config gets a useful message.

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.

Happy with that.

Perhaps another day we could implement an additional upgrader method, something like quiet, which works the same as obsolete, but only logs at debug?

@hjoliver
Copy link
Member Author

(Spurious test failure - artifact upload timed out)

@oliver-sanders oliver-sanders merged commit 0c0039d into cylc:master Jul 25, 2022
@oliver-sanders
Copy link
Member

(not worried about the changelog)

@hjoliver hjoliver deleted the remove-editor-garbage branch July 25, 2022 22:26
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.

3 participants