-
-
Notifications
You must be signed in to change notification settings - Fork 301
refactor(init): code cleanup and better test coverage #1424
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(init): code cleanup and better test coverage #1424
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the order of these configs matter here?
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.
Nop
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.
Thanks.
| def _ask_version_provider(self) -> str: | ||
| """Ask for setting: version_provider""" | ||
|
|
||
| OPTS = { |
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.
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