Page MenuHomeSoftware Heritage

cli: add support for aliases in click command groups
ClosedPublic

Authored by douardda on May 16 2019, 4:07 PM.

Details

Summary

this allows to rename (sub)commands while keeping the old name working,
albeit not listed in help messages.

Say one wants to rename:

swh scheduler api-server

as

swh scheduler rpc-serve

but keep the former version usable.

Also fix logging config in main's swh command
we want the root logger configured there, not the cli one.

Related to T1671.

Diff Detail

Repository
rDCORE Foundations and core functionalities
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

douardda created this revision.May 16 2019, 4:07 PM
douardda retitled this revision from cli: add spport for aliases in click command groups to cli: add support for aliases in click command groups.May 16 2019, 4:19 PM
olasd accepted this revision.May 16 2019, 6:07 PM
This revision is now accepted and ready to land.May 16 2019, 6:07 PM
olasd added a comment.May 16 2019, 6:07 PM

Please add click in requirements-test.txt :-)

In D1479#32945, @olasd wrote:

Please add click in requirements-test.txt :-)

Woopidoops! good catch, thx!

douardda updated this revision to Diff 4858.May 17 2019, 9:37 AM

add click in requirement-tests

This revision was landed with ongoing or failed builds.May 17 2019, 9:38 AM
This revision was automatically updated to reflect the committed changes.