This PR refactors the command-line argument parsing in the entrypoint.py file of the airbyte-cdk/python directory from argparse to Click. It also updates the setup.py file to include Click as a dependency and modifies the unit tests in test_entrypoint.py to test the new Click commands and options.
Summary of Changes
In entrypoint.py:
Replaced the parse_args function with a Click group and commands.
Each command now has options corresponding to the previous argparse arguments.
Updated the run function to use the Click context and arguments instead of the parsed args from argparse.
In setup.py:
Added Click to the list of install_requires to ensure it is installed when the package is installed.
In test_entrypoint.py:
Updated the unit tests to test the new Click commands and options.
These changes improve the consistency and readability of the codebase by using Click, which provides a more user-friendly and intuitive interface for command-line argument parsing.
Fixes #1.
To checkout this PR branch, run the following command in your terminal:
Description
This PR refactors the command-line argument parsing in the
entrypoint.py
file of theairbyte-cdk/python
directory from argparse to Click. It also updates thesetup.py
file to include Click as a dependency and modifies the unit tests intest_entrypoint.py
to test the new Click commands and options.Summary of Changes
entrypoint.py
:parse_args
function with a Click group and commands.run
function to use the Click context and arguments instead of the parsed args from argparse.setup.py
:install_requires
to ensure it is installed when the package is installed.test_entrypoint.py
:These changes improve the consistency and readability of the codebase by using Click, which provides a more user-friendly and intuitive interface for command-line argument parsing.
Fixes #1.
To checkout this PR branch, run the following command in your terminal: