-
Notifications
You must be signed in to change notification settings - Fork 158
Move commandline interface to typer #2751
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
base: main
Are you sure you want to change the base?
Conversation
ace7dab
to
fb35cbd
Compare
@Conan-Kudo I'm mostly interested in getting the open questions from the checklist answered, so no need to do an in-depth review of the code changes as it's time consuming. Thanks much |
In addition to docopt also support the typer commandline interface. This is relevant for kiwi versions that has moved to typer. OSInside/kiwi#2751
In addition to docopt also support the typer commandline interface. This is relevant for kiwi versions that has moved to typer. OSInside/kiwi#2751
In addition to docopt also support the typer commandline interface. This is relevant for kiwi versions that has moved to typer. OSInside/kiwi#2751
In addition to docopt also support the typer commandline interface. This is relevant for kiwi versions that has moved to typer. OSInside/kiwi#2751
In addition to docopt also support the typer commandline interface. This is relevant for kiwi versions that has moved to typer. OSInside/kiwi#2751
In addition to docopt also support the typer commandline interface. This is relevant for kiwi versions that has moved to typer. OSInside/kiwi#2751
We can't drop Python 3.9 support since that's required for CentOS/RHEL 9. |
I found a fix to make it work on 3.9 too |
In addition to docopt also support the typer commandline interface. This is relevant for kiwi versions that has moved to typer. OSInside/kiwi#2751
In addition to docopt also support the typer commandline interface. This is relevant for kiwi versions that has moved to typer. OSInside/kiwi#2751
In addition to docopt also support the typer commandline interface. This is relevant for kiwi versions that has moved to typer. OSInside/kiwi#2751
In addition to docopt also support the typer commandline interface. This is relevant for kiwi versions that has moved to typer. OSInside/kiwi#2751
In addition to docopt also support the typer commandline interface. This is relevant for kiwi versions that has moved to typer. OSInside/kiwi#2751
In addition to docopt also support the typer commandline interface. This is relevant for kiwi versions that has moved to typer. OSInside/kiwi#2751
@Conan-Kudo I finished the Cli change and also updated the plugins. The plugins continues to support both docopt and typer such that they can continue to work also with older versions of kiwi. The upstream kiwi should change to typer and the interface is a drop-in-replacement such that there should be no difference in the former caller semantic. The only open question is if the typer python module is available in all distros we support. I did a short test on Virtualization:Appliances:Staging/python-kiwi and it would build the package for all targets that exists there except for ALP which is an issue that I need to resolve prior merge Also I appreciate your feedback with regards to the other OS'es Thanks |
And there is also the question on the min version of typer in the pyproject.toml to be ok or not |
I'll give it a test on Staging |
In addition to docopt also support the typer commandline interface. This is relevant for kiwi versions that has moved to typer. OSInside/kiwi#2751
In addition to docopt also support the typer commandline interface. This is relevant for kiwi versions that has moved to typer. OSInside/kiwi#2751
ok some results here.
How can we go from there ? Or does that mean we leave this PR open until our OS Matrix allows the move smoothly ? |
I also figured typer 0.9.0 only works for python version < 3.8 because it imports |
Overall such a change is a pita but I had hoped with the kiwi v10.x.x constraints it could be done... maybe a mistake ? |
In addition to docopt also support the typer commandline interface. This is relevant for kiwi versions that has moved to typer. OSInside/kiwi#2751
In addition to docopt also support the typer commandline interface. This is relevant for kiwi versions that has moved to typer. OSInside/kiwi#2751
We could consider this for kiwi 11 and decide we do a kiwi 11 next year? |
In addition to docopt also support the typer commandline interface. This is relevant for kiwi versions that has moved to typer. OSInside/kiwi#2751
In addition to docopt also support the typer commandline interface. This is relevant for kiwi versions that has moved to typer. OSInside/kiwi#2751
ok, I did that on this PR and the plugin PRs. btw are Fedora 38 and xUbuntu_23.04 still supported targets ? |
No. Our minimum for Fedora is currently Fedora 40. And Ubuntu is at 24.04. |
Even though we will add support for the typer Cli with kiwi-11 I want our integration test images to be able to build with the open PR #2751. Debian 12 is the only target in the support matrix which uses a too old veryion of typer. Therefore to be able to test this target I built a newer version of typer in an update repo for Debian 12 and added it to the integration test description
ok I dropped those. For the Debian 12 part I added an updated typer to the Staging project which allows me to finally run all integration tests with a changed kiwi that contains this new cli interface. All tests built which is good. So I will keep this and the plugin PRs open with a kiwi-11 label set to be merged in 2026 |
6ca82a6
to
ea0e919
Compare
This commit moves the kiwi commandline and plugin interface to typer and drops the use of docopt. Typer is based on python type hints and allows for a more modern way to define Cli interfaces and auto completion, even for plugins. Also docopt is split into an old and a next generation variant and allows us to get rid of spec file hacks as well as documentation rendering hacks.
This commit moves the kiwi commandline and plugin interface to
typer
and drops the use ofdocopt
. Typer is based on python type hints and allows for a more modern way to define Cli interfaces and auto completion, even for plugins. Also docopt is split into an old and a next generation variant and allows us to get rid of spec file hacks as well as documentation rendering hacks.