-
Notifications
You must be signed in to change notification settings - Fork 535
feat: short circuit composition support #3540
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
Merged
Merged
Changes from 22 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
377825a
initial commit for short circuit composition
prsabahrami 2bf8204
add short-circuit composition tests
prsabahrami af9319c
fix pre-commit
prsabahrami e3a2202
refactor: replace macro vec![] with Vec::from()
prsabahrami 34268fb
test: add task5 to short-circuit composition tests and verify output …
prsabahrami 079d09a
chore: update schema
prsabahrami 5099cec
docs: add shorthand syntax for task composition in advanced_tasks.md
prsabahrami ebb1684
remove string from short circuit definition
prsabahrami cb45ad2
minor update of the docs
prsabahrami 9910fc5
Update docs/workspace/advanced_tasks.md
prsabahrami c50448c
docs: remove extra file and paragraph
prsabahrami 49ca2f5
Rearrange and add todos
Hofer-Julian af7c3e1
feat: update pixi task alias
prsabahrami 7028332
refactor: update pixi.toml snippets and remove todos in advanced_task…
prsabahrami 6c5814e
Merge branch 'main' into short_circuit
prsabahrami 875c491
Doc improvements
Hofer-Julian 09347f6
Update schema
Hofer-Julian 44f3761
Improve test
Hofer-Julian 5910e7a
test: add integration test for pixi task alias command
prsabahrami 2eb36be
minor fix
prsabahrami 582c9db
replace alias with tasks in the test
prsabahrami 3161fc1
fix the tests
prsabahrami 4c1423a
improve test
prsabahrami 114cfb9
do not load the manifest twice in the test
prsabahrami 5a10fe9
fix pre-commit
prsabahrami File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| [workspace] | ||
| channels = ["https://prefix.dev/conda-forge"] | ||
| name = "pixi" | ||
| platforms = ["linux-64", "win-64", "osx-64", "osx-arm64", "linux-aarch64"] | ||
|
|
||
| # --8<-- [start:all] | ||
| # --8<-- [start:not-all] | ||
| [tasks] | ||
| fmt = "ruff" | ||
| lint = "pylint" | ||
| # --8<-- [end:not-all] | ||
| style = [{ task = "fmt" }, { task = "lint" }] | ||
| # --8<-- [end:all] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1235,3 +1235,22 @@ def test_pixi_task_list_platforms(pixi: Path, tmp_pixi_workspace: Path) -> None: | |
| verify_cli_command( | ||
| [pixi, "task", "list", "--manifest-path", manifest], stderr_contains=["foo", "bar"] | ||
| ) | ||
|
|
||
|
|
||
| def test_pixi_add_alias(pixi: Path, tmp_pixi_workspace: Path) -> None: | ||
| manifest = tmp_pixi_workspace.joinpath("pixi.toml") | ||
| toml = """ | ||
| [workspace] | ||
| name = "test" | ||
| channels = [] | ||
| platforms = ["linux-64", "win-64", "osx-64"] | ||
| """ | ||
| manifest.write_text(toml) | ||
|
|
||
| verify_cli_command([pixi, "task", "alias", "dummy-a", "dummy-b", "dummy-c", "--manifest-path", manifest]) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's also test |
||
|
|
||
| with open(manifest, "rb") as f: | ||
| manifest_content = tomllib.load(f) | ||
|
|
||
| assert "dummy-a" in manifest_content["tasks"] | ||
| assert manifest_content["tasks"]["dummy-a"] == [{"task": "dummy-b"}, {"task": "dummy-c"}] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Let's add
osx-arm64