feat(tasks): enhance pixi task add#3884
feat(tasks): enhance pixi task add#3884DishankChauhan wants to merge 6 commits intoprefix-dev:mainfrom
pixi task add#3884Conversation
…pends-on parsing with environment and arguments - Add task arguments with default values support - Enable alias creation via depends-on without commands - Add inputs and outputs glob patterns support - Add validation to ensure either commands or dependencies are provided - Maintain backward compatibility with existing functionality - Fix clippy linting issues and update tests - Fixes prefix-dev#3828
ruben-arts
left a comment
There was a problem hiding this comment.
Great additions! It's not yet hooked up properly as i found out with the inputs and outputs. I really like the idea of the splitting you implemented on the args and depends on!
Could you add all possible new commands as an integration test?
The best location for that would be: tests/integration_python/test_main_cli.py.
src/cli/task.rs
Outdated
| depends_on, | ||
| inputs: None, | ||
| outputs: None, | ||
| inputs: value.inputs, |
There was a problem hiding this comment.
The inputs and outputs are not serialized when adding e.g.:
pixi task add test10 --inputs "*.rs" --outputs "target" echo hello
results in:
test10 = { cmd = "echo hello" }|
I removed the I would like to converse about the listing of the inputs, maybe But I wasn't confident about that... |
pixi task add
|
@DishankChauhan Do you think you could take another look at this? |
Summary
This PR enhances the
pixi task addCLI command to address all requirements from issue #3828.Changes Made
🔧 Enhanced CLI Features
task:envandtask::arg1,arg2formats--arg nameand--arg name=defaultInputs/outputs support:Removed to unblock PR--inputs "*.rs"and--outputs "target/*"--depends-onwithout commands🔄 Backward Compatibility
✅ Testing
Example Usage
Partly resolves #3828