<#3156 Refactor add/add_related logic from 'cli.ad...
# meltano-repo-activity
g
#3156 Refactor add/add_related logic from 'cli.add' and 'cli.utils' into ProjectAddService and update tests Issue created by MeltyBot Migrated from GitLab: https://gitlab.com/meltano/meltano/-/issues/3230 Originally created by @kgpayne on 2022-02-10 115503 --- Currently the implementation of
ProjectAddService
includes methods for
add()
and
add_related()
for adding plugins and their related file bundles. There is also related logic inside the
cli.add
,
cli.install
and
cli.utils
modules for calling
add()
and
add_related()
and combining outputs. This causes issues during testing (e.g. when testing if file bundles are correctly added), as the logic defined for
cli.add
cannot easily be exercised using the underlying service
add
and
add_related
methods. I propose we consolidate these methods and helper-functions onto the
ProjectAddService
, providing args to determine if related plugins should be installed (as is implemented at the CLI level). meltano/meltano