-
-
Notifications
You must be signed in to change notification settings - Fork 279
refactor(provider): split provider code and related tests into individual files for maintainability #830
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
refactor(provider): split provider code and related tests into individual files for maintainability #830
Conversation
Codecov ReportPatch coverage is
📢 Thoughts on this report? Let us know!. |
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.
Hi @davidlday , thanks for taking the time for this refactoring. I've not yet had the chance to finish the review. But left a few comments on what's need to be fixed before we merge it. The ones in test cases can be applied to all the newly created test files
pyproject.toml
Outdated
pep621 = "commitizen.providers:Pep621Provider" | ||
poetry = "commitizen.providers:PoetryProvider" | ||
scm = "commitizen.providers:ScmProvider" | ||
cargo = "commitizen.providers.cargo_provider:CargoProvider" |
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.
Should we add a commitizen/providers/__init__.py
to avoid this change?
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.
I originally added them all to __init__.py
, but ruff removed them when I ran scripts/format
due to F401 (unused import). I can override in __init__.py
, if that makes sense for you.
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.
@Lee-W - went ahead and added # noqa: F401
to the import lines in __init__.py
and reverted the changes in pyproject.toml
. Let me know if you want this handled differently.
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.
Sounds good
…preserve plugin config
might need your help to rebase from the master branch |
Will get to it in the next hour. |
…preserve plugin config
…izen into chore/provider-refactor
…preserve plugin config
LGTM as well. Thanks for this change! |
Co-authored-by: Wei Lee <weilee.rx@gmail.com>
Hi @davidlday I think we're almost good to go. Could you please rebase the branch again? Thanks! |
…preserve plugin config
Co-authored-by: Wei Lee <weilee.rx@gmail.com>
…izen into chore/provider-refactor
@Lee-W - rebased |
Hi @davidlday , sorry for being annoying 🫠 May I know how you rebase the branch? I notice there are a lot of duplicate commits. Or I could also just squash this PR into 1 commit |
Not annoying at all. I used |
@Lee-W @woile - I realize now that I've been rebasing incorrectly. At this point, I'm more than willing to close this PR & and start a new one on a fresh branch for a cleaner commit history. I should have time to do so this evening if that works for you two. Changes are easy enough to recreate. My apologies! |
@davidlday I was thinking of squashing it into a commit, but I haven't had the chance to do so yet. 🫠 However, if you'd like to make a new one, I'm completely okay with it. 👍 You don't need to apologize, you're doing an excellent job, and I really appreciate it! |
closes #812
Description
Refactor provider code and related tests into individual files for maintainability
Checklist
./scripts/format
and./scripts/test
locally to ensure this change passes linter check and testExpected behavior
N/A - refactor
Steps to Test This Pull Request
N/A - refactor
Additional context
N/A - refactor