refactor(init): code cleanup and better test coverage#1424
refactor(init): code cleanup and better test coverage#1424bearomorphism wants to merge 4 commits intocommitizen-tools:refactorsfrom
Conversation
b3d3048 to
a36b7ef
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## refactors #1424 +/- ##
=============================================
+ Coverage 97.87% 98.41% +0.54%
=============================================
Files 57 57
Lines 2677 2656 -21
=============================================
- Hits 2620 2614 -6
+ Misses 57 42 -15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| check_pre_commit_config([CZ_HOOK_CONFIG]) | ||
|
|
||
|
|
||
| class TestNoPreCommitInstalled: |
There was a problem hiding this comment.
test_pre_commit_not_installed is not working as expected...
| 'version = "0.0.1"\n' | ||
| "update_changelog_on_bump = true\n" | ||
| "major_version_zero = true\n" | ||
| 'version = "0.0.1"\n' |
There was a problem hiding this comment.
Does the order of these configs matter here?
| def _ask_version_provider(self) -> str: | ||
| """Ask for setting: version_provider""" | ||
|
|
||
| OPTS = { |
There was a problem hiding this comment.
Ideally, the VersionProvider ABC class should include identifier and description. Which would allow us to do something like
providers = metadata.entry_points(group=PROVIDER_ENTRYPOINT)
{provider.identifier: provider.description for provider in providers} This way, custom user made providers would also appear in the init functions.
Just to be clear, this is optional, I hardcoded them here because it would help 90% of the users and I didn't want to go further.
c028883 to
380f5fd
Compare
380f5fd to
ef6fa32
Compare
baee83e to
a9cd957
Compare
ef6fa32 to
233b55d
Compare
Description
Checklist
Code Changes
poetry alllocally to ensure this change passes linter check and testsDocumentation Changes
poetry doclocally to ensure the documentation pages renders correctlyExpected Behavior
Steps to Test This Pull Request
Additional Context