-
Notifications
You must be signed in to change notification settings - Fork 1.3k
cli: refactor into a module #7287
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
Conversation
1a419c3 to
463c0a3
Compare
By splitting dvc.cli into a module, we'll be able to share cli-related utilities, split parser-related stuffs into smaller parts, improve reusability and improve API for command extensions in the future.
42217c6 to
1921481
Compare
| # so won't be reused by any other subsequent run anyway. | ||
| clean_repos() | ||
| # TODO: remove in 3.0, kept for backward compatibility | ||
| from .cli import main # noqa: F401, pylint: disable=unused-import |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keeping for backward compatibility
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@skshetry Could you elaborate, please? We never promised this as an API, so looks like we can get rid of it right away.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, but I have been suggesting it to the users in Discord as a way to use dvc as a Python API in a stable manner. Could remove though.
|
@skshetry Should |
I don't think so. I have a few minor refactors after this:
|
By splitting dvc.cli into a module, we'll be able to share cli-related
utilities, split parser-related stuffs into smaller parts, improve
reusability and improve API for command extensions in the future.
This PR moves main entrypoint from
dvc.main.maintodvc.cli.main, but the old one is still kept for backward compatibility, but that should be considered deprecated after this PR is merged and set for removal in 3.0.❗ I have followed the Contributing to DVC checklist.
📖 If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here.
Thank you for the contribution - we'll try to review it as soon as possible. 🙏