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

✨ NEW: Add verdi tui #6071

Merged
merged 3 commits into from
Sep 17, 2023
Merged

✨ NEW: Add verdi tui #6071

merged 3 commits into from
Sep 17, 2023

Conversation

chrisjsewell
Copy link
Member

@chrisjsewell chrisjsewell commented Jul 5, 2023

Proof of concept to use https://github.com/Textualize/trogon, a https://github.com/textualize/textual extension, to generate a Textual UI for exploring the verdi command-line interface.
It is a simple way for users to see all the available commands in verdi, without having to dig through the help of each subcommand.

image

As you see, its is only 2-lines of code, so no real problem in that respect.

But obviously it adds additional dependencies, which has to be considered (and currently is not on conda: Textualize/trogon#49 (comment))


In the future, I would also suggest that Textual could be used to write improved interfaces for some of the CLI commands, such as exploring the provenance graph and process statuses.
I think its an interesting middle ground between CLIs, which are lightweight but have limited interactivity, and GUIs which generally require technologies outside of Python, REST APIs, etc

@sphuber
Copy link
Contributor

sphuber commented Sep 13, 2023

@chrisjsewell Think this is very cool indeed. Maybe we can simply make it an optional requirement by adding the tui extra in the dependencies. Then in the docs, we can add a tip admonition near the install/config instructions to add this in addition to verdi. Question: if you install this, can verdi only be used in the textual way? Or can you still execute commands in the normal way?

@chrisjsewell
Copy link
Member Author

Maybe we can simply make it an optional requirement by adding the tui extra in the dependencies.

Sure

Question: if you install this, can verdi only be used in the textual way? Or can you still execute commands in the normal way?

It shouldn't affect normal verdi functioning in any way; just adding the extra tui command

@sphuber sphuber marked this pull request as ready for review September 17, 2023 19:33
Copy link
Contributor

@sphuber sphuber left a comment

Choose a reason for hiding this comment

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

Cheers @chrisjsewell . Made it properly optional by catching import errors and added a note to the docs.

@sphuber sphuber merged commit a42e09c into aiidateam:main Sep 17, 2023
25 checks passed
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.

2 participants