-
-
Notifications
You must be signed in to change notification settings - Fork 11
feat: Add conflict
command to differentiate versioning
#292
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
Conversation
No significant changes currently retry |
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
conflict
command to differentiate versioning
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.
Pull Request Overview
This PR adds a new conflict
command to the nixopus CLI to check for tool version conflicts. The implementation includes comprehensive version checking, comparison logic, and configuration parsing capabilities.
- Adds a new
conflict
command with comprehensive version checking for system tools - Updates dependency version specifications to use explicit version ranges
- Improves error handling in service command
Reviewed Changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated 6 comments.
Show a summary per file
File | Description |
---|---|
helpers/config.prod.yaml | Updates dependency version specifications from simple values to explicit version ranges |
cli/pyproject.toml | Adds packaging dependency and updates requests version |
cli/app/main.py | Integrates conflict command into main CLI application |
cli/app/commands/service/command.py | Improves error handling with null check |
cli/app/commands/conflict/tests/test_conflict.py | Comprehensive test suite for conflict checking functionality |
cli/app/commands/conflict/messages.py | Message constants for conflict command |
cli/app/commands/conflict/conflict.py | Core conflict checking logic and version comparison |
cli/app/commands/conflict/command.py | CLI command implementation for conflict checking |
cli/Makefile | Enhanced Makefile with better documentation and convenience targets |
Comments suppressed due to low confidence (2)
cli/app/commands/conflict/conflict.py:86
- [nitpick] The tool name 'postgresql' maps to 'psql' command, but this is inconsistent with the dependency name 'postgres' that might be used in config files. Consider using 'postgres' as the key or adding both variants to handle common naming conventions.
'postgresql': ['psql', '--version'],
cli/app/commands/conflict/tests/test_conflict.py:158
- The test covers basic version requirement parsing but doesn't test edge cases like invalid version formats, malformed requirements, or boundary conditions. Consider adding tests for error handling and edge cases.
self.assertEqual(checker.parse_version_requirement("^1.20.0"), ">=1.20.0, <2.0.0")
@conflict_app.callback(invoke_without_command=True) | ||
def conflict_callback( | ||
ctx: typer.Context, | ||
config_file: str = typer.Option("helpers/config.prod.yaml", "--config-file", "-c", help="Path to configuration file"), |
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.
use config to load this default option
…o feat/cli_/conflict
try: | ||
logger.info(checking_conflicts_info) | ||
|
||
config = ConflictConfig( |
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.
make use of the timeout wrapper here like other commands instead of passing the timeout variable
Sample :