Rework kernelci.cli with Click framework#2133
Merged
nuclearcat merged 4 commits intokernelci:mainfrom Oct 24, 2023
Merged
Conversation
b5ba6a4 to
a815fd7
Compare
a815fd7 to
70c689f
Compare
567f9a6 to
33bf479
Compare
This was referenced Oct 20, 2023
33a51eb to
c306094
Compare
nuclearcat
approved these changes
Oct 24, 2023
Member
nuclearcat
left a comment
There was a problem hiding this comment.
LGTM, works on staging (legacy, api, pipeline), i assume new functionality was tested by author
c306094 to
340b8cb
Compare
gctucker
commented
Oct 24, 2023
Collaborator
Author
gctucker
left a comment
There was a problem hiding this comment.
@nuclearcat It's rebased now so ready for review. You can test it manually with ./kci whoami. It also comes with unit tests but that's run automatically by GitHub already.
Add click to the list of requirements with version 8.1.3 which is the same as in Debian stable (bookworm). This is to be used as the new framework for the kci command line tool. Link: https://lore.kernel.org/all/9acfa649-4ae0-2e56-16b8-b7c24ab60a30@collabora.com/ Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Rewrite the base kernelci.cli module using the Click framework rather than argparse. This provides a Kci base class for implementing commands that can load default values from TOML settings, and KciS with added secrets also loaded from TOML. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Add a tests/test_cli.py module to cover the new kernelci.cli implementation. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Rework the kci entry point to use the new kernelci.cli module and Click. Only implement `kci whoami` for now which can be used to check that TOML settings and secrets are loaded correctly. Also drop "kci config validate" from the Makefile tests for now as this needs to be reimplemented. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Member
|
Thanks, works for me |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rework the
kernelci.climodule andkcientry point using the Click framework.