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

Generate content for verdi code show command from input CLI fields #5916

Merged

Conversation

ConradJohnston
Copy link
Contributor

@ConradJohnston ConradJohnston commented Mar 6, 2023

Some CLI commands like verdi code show have relied on printing various node attributes 'by hand' and so may miss certain attributes and must be maintained 'by hand' on an ongoing basis.

Here instead, we use get_cli_options to populate the output table for the show subcommand automatically, so as to ensure completeness of output and to simplify future maintenance.

@ConradJohnston ConradJohnston changed the title Generate content for verdi something list commands dynamically Generate content for verdi something show commands dynamically Mar 6, 2023
@ConradJohnston ConradJohnston force-pushed the Improve_verdi_something_list_commands branch from 4fd5e10 to 6bd795b Compare March 6, 2023 19:50
@ConradJohnston ConradJohnston changed the title Generate content for verdi something show commands dynamically Generate content for verdi code show commands dynamically Mar 6, 2023
@ConradJohnston ConradJohnston changed the title Generate content for verdi code show commands dynamically Generate content for verdi code show commands from input CLI fields Mar 6, 2023
@ConradJohnston ConradJohnston force-pushed the Improve_verdi_something_list_commands branch from 910258d to 7e8b9b0 Compare March 6, 2023 21:41
@ConradJohnston ConradJohnston changed the title Generate content for verdi code show commands from input CLI fields Generate content for verdi code show command from input CLI fields Mar 6, 2023
@ConradJohnston ConradJohnston marked this pull request as ready for review March 6, 2023 21:42
@ConradJohnston ConradJohnston force-pushed the Improve_verdi_something_list_commands branch 2 times, most recently from 6adfc7f to eb667ac Compare March 6, 2023 21:49
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.

Beat me to it while I was reviewing. Might still consider the suggestion for brevity

aiida/cmdline/commands/cmd_code.py Outdated Show resolved Hide resolved
aiida/cmdline/commands/cmd_code.py Outdated Show resolved Hide resolved
Some CLI commands like `verdi code show` rely on printing various node
attributes 'by hand' and so may miss certain attributes and must be
maintained 'by hand' on an ongoing basis.

This commit uses `get_cli_options` to populate the output table for the
`show` subcommand automatically, so as to ensure completeness of output
and to simplify future maintenance.
@ConradJohnston ConradJohnston force-pushed the Improve_verdi_something_list_commands branch from eb667ac to d18320a Compare March 7, 2023 19:23
@sphuber
Copy link
Contributor

sphuber commented Mar 8, 2023

Thanks a lot @ConradJohnston

@sphuber sphuber merged commit 68cc062 into aiidateam:main Mar 8, 2023
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.

None yet

2 participants