[
https://issues.apache.org/jira/browse/AIRFLOW-3358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16690425#comment-16690425
]
Iuliia Volkova commented on AIRFLOW-3358:
-----------------------------------------
[~kaxilnaik], at real, 'Click' is one of the possible variants, we can stay
with argparse and it will be ok. But need to refactor cli to match 'Command
pattern', when command execution, methods what created final command and utils
methods - separated to get possible cover each step by tests. For, example, PR
what I attached upper (I just refactor part to get possible add tests). I also
look at changes in PRs what done last time in cli and most of them without
tests and it's understandable because there is no easy way to add a test to new
feature without refactoring a big part of a code.
> POC: Refactor command line to make it more testable and easy to develop
> ------------------------------------------------------------------------
>
> Key: AIRFLOW-3358
> URL: https://issues.apache.org/jira/browse/AIRFLOW-3358
> Project: Apache Airflow
> Issue Type: Improvement
> Components: cli
> Affects Versions: 2.0.0
> Reporter: Iuliia Volkova
> Assignee: Iuliia Volkova
> Priority: Major
>
> Hi all!
> In one of PR: https://github.com/apache/incubator-airflow/pull/4174 we had a
> talk with Ashb, what will be cool to refactor the cli for getting more
> testable and readable code.
> I want to prepare POC based on one command with implementation (with Click if
> we want it to use, or with Argparse and Command Pattern) and covering with
> tests for discussing Airflow Cli architecture.
> Click already exists in Airflow dependencies.
> Main stimulus:
> - Get more readable and changeable cli - for easy adding command or changing
> commands
> - Get possible to add more tests
> Will be good to know your concerns about such initiative and if there are no
> disagrees about it, I will be happy to start POC
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)