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

Devops: Remove verdi tui from CLI reference documentation #6464

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

sphuber
Copy link
Contributor

@sphuber sphuber commented Jun 6, 2024

The verdi-autodocs pre-commit hook automatically generates the reference documentation for verdi. It does so based on the available commands. The verdi tui command is added dynamically if and only if the optional dependency trogon is installed.

Since having the dependency installed slows down the loading time verdi significantly, many dev environments prefer not to install it. However, this leads to the verdi-autodocs hook always failing as it removes the verdi tui section from the docs. The developer then has to manually reset the changes and run git commit with --no-verify.

This is annoying enough that as a workaround the verdi-autodocs hook now skips the verdi tui command when generating the docs.

The `verdi-autodocs` pre-commit hook automatically generates the
reference documentation for `verdi`. It does so based on the available
commands. The `verdi tui` command is added dynamically if and only if
the optional dependency `trogon` is installed.

Since having the dependency installed slows down the loading time
`verdi` significantly, many dev environments prefer not to install it.
However, this leads to the `verdi-autodocs` hook always failing as it
removes the `verdi tui` section from the docs. The developer then has
to manually reset the changes and run `git commit` with `--no-verify`.

This is annoying enough that as a workaround the `verdi-autodocs` hook
now skips the `verdi tui` command when generating the docs.
@sphuber sphuber requested a review from agoscinski June 6, 2024 15:46
Copy link

codecov bot commented Jun 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.77%. Comparing base (ef60b66) to head (b41cfe3).
Report is 112 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6464      +/-   ##
==========================================
+ Coverage   77.51%   77.77%   +0.27%     
==========================================
  Files         560      562       +2     
  Lines       41444    41759     +315     
==========================================
+ Hits        32120    32475     +355     
+ Misses       9324     9284      -40     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sphuber sphuber merged commit 1b4a19a into aiidateam:main Jun 6, 2024
11 of 12 checks passed
@sphuber sphuber deleted the fix/pre-commit-auto-cli-reference branch June 6, 2024 17:22
@danielhollas
Copy link
Collaborator

Thanks so much for this, it was suuuprr annoying.

It would be nice if the TUI did not slow down the normal verdi usage so much, i.e. if we good import it only lazily when user actually uses the TUI. But I haven't figured out how to do it.

@sphuber
Copy link
Contributor Author

sphuber commented Jun 6, 2024

Thanks so much for this, it was suuuprr annoying.

Yeah, now just to fix the one where the default email for the profile setup command is changed to the autofill.email config option if defined 😅

mikibonacci pushed a commit to mikibonacci/aiida-core that referenced this pull request Sep 3, 2024
…m#6464)

The `verdi-autodocs` pre-commit hook automatically generates the
reference documentation for `verdi`. It does so based on the available
commands. The `verdi tui` command is added dynamically if and only if
the optional dependency `trogon` is installed.

Since having the dependency installed slows down the loading time
`verdi` significantly, many dev environments prefer not to install it.
However, this leads to the `verdi-autodocs` hook always failing as it
removes the `verdi tui` section from the docs. The developer then has
to manually reset the changes and run `git commit` with `--no-verify`.

This is annoying enough that as a workaround the `verdi-autodocs` hook
now skips the `verdi tui` command when generating the docs.
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