Skip to content

Conversation

@gctucker
Copy link
Collaborator

@gctucker gctucker commented Oct 17, 2023

Rework the kernelci.cli module and kci entry point using the Click framework.

@gctucker gctucker mentioned this pull request Oct 18, 2023
40 tasks
@gctucker gctucker force-pushed the kci-click-rework branch 5 times, most recently from 567f9a6 to 33bf479 Compare October 19, 2023 19:30
@gctucker gctucker force-pushed the kci-click-rework branch 2 times, most recently from 33a51eb to c306094 Compare October 23, 2023 19:18
Copy link
Member

@nuclearcat nuclearcat left a comment

Choose a reason for hiding this comment

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

LGTM, works on staging (legacy, api, pipeline), i assume new functionality was tested by author

@nuclearcat nuclearcat added this pull request to the merge queue Oct 24, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Oct 24, 2023
@nuclearcat nuclearcat added this pull request to the merge queue Oct 24, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Oct 24, 2023
@nuclearcat nuclearcat added this pull request to the merge queue Oct 24, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Oct 24, 2023
Copy link
Collaborator Author

@gctucker gctucker left a comment

Choose a reason for hiding this comment

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

@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>
@nuclearcat
Copy link
Member

Thanks, works for me

@nuclearcat nuclearcat added this pull request to the merge queue Oct 24, 2023
Merged via the queue into kernelci:main with commit 2e0ce38 Oct 24, 2023
@gctucker gctucker deleted the kci-click-rework branch October 24, 2023 18:02
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