fix: problem with spaces in path (by quoting CLI args)#79
fix: problem with spaces in path (by quoting CLI args)#79johanneskoester merged 1 commit intosnakemake:mainfrom
Conversation
📝 WalkthroughWalkthroughThe pull request introduces modifications to the Changes
The changes are primarily focused on improving the argument formatting mechanism, ensuring that quoting is applied consistently across different types of input values. No new functions were added or removed, and the overall module structure remains the same. Note: Since the changes are relatively straightforward and do not introduce a complex new flow or feature, a sequence diagram is not necessary in this case. Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)snakemake_interface_executor_plugins/utils.py (1)Pattern 🔇 Additional comments (2)snakemake_interface_executor_plugins/utils.py (2)
The change correctly propagates the
The change correctly propagates the Let's verify the impact on existing callers: ✅ Verification successfulChange is safe and consistent with test cases The verification confirms that the change is safe and well-tested:
🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Find all calls to format_cli_pos_arg to ensure they handle the quote parameter correctly
# Search for function calls with their context
rg -A 3 "format_cli_pos_arg\(" --type py
# Search for potential test cases
rg -l "test.*format_cli" --type py
Length of output: 752 Script: #!/bin/bash
# Let's examine the test file to understand the expected behavior
cat tests/tests.py
# Also check for any other usages of format_cli_value
rg "format_cli_value" --type py -A 3
Length of output: 3424 Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 (
|
Fixes #3235 Goes together with snakemake/snakemake-interface-executor-plugins#79 This PR updates tests to catch the bug (should break at least `test_path_with_spaces` and `test_with_parentheses` and snakemake/snakemake-interface-executor-plugins#79 actually fixes it <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit - **New Features** - Introduced a new rule that generates an output file with a predefined string. - **Tests** - Added a test case to verify the handling of paths containing spaces. - Enhanced temporary directory naming for clarity during test execution. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Johannes Köster <johannes.koester@tu-dortmund.de> Co-authored-by: Johannes Koester <johannes.koester@uni-due.de>
Goes together with snakemake/snakemake#3236
Fixes snakemake/snakemake#3235
I don't know if adding quoting of CLI args by default will break anything—I didn't run the whole test suite locally.
Summary by CodeRabbit
Bug Fixes
quoteparameter in CLI argument formatting for consistent behavior across single and iterable values.Chores