Skip to content
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

Fixes issues with external config files in git repos #219

Merged
merged 5 commits into from
Aug 6, 2024

Conversation

coordt
Copy link
Member

@coordt coordt commented Aug 6, 2024

Introduced the repository_root field to store the root path of the repository in the data classes. Refactored subprocess handling to use a new run_command utility for improved readability and error handling consistency. Removed unnecessary dependency from .pre-commit-config.yaml to streamline dependencies.

coordt added 2 commits August 5, 2024 11:08
Introduced the `repository_root` field to store the root path of the repository in the data classes. Refactored subprocess handling to use a new `run_command` utility for improved readability and error handling consistency. Removed unnecessary dependency from `.pre-commit-config.yaml` to streamline dependencies.
Replaced ChainMap with MutableMapping in function signatures and types. Enhanced SCM info handling by splitting code into dedicated methods for commit and revision info retrieval. Added logic to prevent config file updates when the file is outside the repo and implemented corresponding test.
Copy link

github-actions bot commented Aug 6, 2024

Version hint: minor
Current version: 0.24.3
New version (when merged): 0.25.0

Comment ID: Display the version hint-auto-generated

Copy link

github-actions bot commented Aug 6, 2024

PR Preview Action v1.4.7
🚀 Deployed preview to https://callowayproject.github.io/bump-my-version/pr-preview/pr-219/
on branch gh-pages at 2024-08-06 17:52 UTC

Copy link

codecov bot commented Aug 6, 2024

Codecov Report

Attention: Patch coverage is 89.53488% with 9 lines in your changes missing coverage. Please review.

Project coverage is 93.75%. Comparing base (e0ba544) to head (890b692).
Report is 1 commits behind head on master.

Files Patch % Lines
bumpversion/scm.py 90.76% 4 Missing and 2 partials ⚠️
bumpversion/config/files.py 0.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #219      +/-   ##
==========================================
- Coverage   94.07%   93.75%   -0.33%     
==========================================
  Files          25       25              
  Lines        1570     1617      +47     
  Branches      311      318       +7     
==========================================
+ Hits         1477     1516      +39     
- Misses         68       73       +5     
- Partials       25       28       +3     
Flag Coverage Δ
python-3.10 93.75% <89.53%> (-0.33%) ⬇️
python-3.11 93.75% <89.53%> (-0.33%) ⬇️
python-3.8 93.66% <89.53%> (-0.33%) ⬇️
python-3.9 93.66% <89.53%> (-0.33%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

coordt added 3 commits August 6, 2024 11:07
Changed the return type of run_command from CompletedProcess[str] to CompletedProcess. This was done to remove unnecessary type specificity and ensure compatibility with different Python versions. The update maintains functionality and improves code readability.
Replaced the bitwise OR operator with the update method for merging dictionaries for 3.8 support
Extracted error formatting to a dedicated function and applied it across the codebase. Improved command path handling in `add_path` and enhanced test coverage with necessary imports and logging configurations.
@coordt coordt merged commit 6f2448a into master Aug 6, 2024
10 of 15 checks passed
@coordt coordt deleted the 216-support-external-config-files branch August 6, 2024 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support commit flag when running bump-my-version with an external config file
1 participant