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

Added ability to use URLs as a configuration file location #295

Merged
merged 7 commits into from
Feb 6, 2025

Conversation

coordt
Copy link
Member

@coordt coordt commented Feb 5, 2025

Fixes #148

Introduce `ConfigOption` and related utilities in `bumpversion.click_config` to handle configuration file paths or URLs. Includes tests for processing options, resolving paths/URLs, and handling errors in `resolve_conf_location` and `download_url`.
Refactor `process_value` to handle `None` values and raise a `BumpVersionError` for non-existent files. Update related tests to ensure correct behavior for missing, existing, and URL-based config paths. These changes enhance robustness and user feedback in handling configuration inputs.
Replaced the manual `--config-file` option setup with the `@config_option` decorator for cleaner and reusable configuration management. This change simplifies the code and enhances maintainability by consolidating the configuration logic.
Copy link

github-actions bot commented Feb 5, 2025

Version hint: minor
Current version: 0.31.1
New version (when merged): 0.32.0

Comment ID: Display the version hint-auto-generated

Copy link

github-actions bot commented Feb 5, 2025

PR Preview Action v1.6.0
Preview removed because the pull request was closed.
2025-02-06 15:31 UTC

Copy link

codecov bot commented Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.63%. Comparing base (6a33724) to head (279838a).
Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #295      +/-   ##
==========================================
+ Coverage   93.42%   93.63%   +0.21%     
==========================================
  Files          28       29       +1     
  Lines        1855     1918      +63     
  Branches      196      198       +2     
==========================================
+ Hits         1733     1796      +63     
  Misses         92       92              
  Partials       30       30              
Flag Coverage Δ
python-3.10 93.63% <100.00%> (+0.21%) ⬆️
python-3.11 93.63% <100.00%> (+0.21%) ⬆️
python-3.12 93.63% <100.00%> (+0.21%) ⬆️
python-3.13 93.63% <100.00%> (+0.21%) ⬆️
python-3.9 93.63% <100.00%> (+0.21%) ⬆️

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 coordt merged commit 008752a into master Feb 6, 2025
16 of 17 checks passed
@coordt coordt deleted the allow-remote-config branch February 6, 2025 15:30
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.

Read configuration from remote URL
1 participant