From 553298aa98b6ce2448e7130a8da7534886b01d63 Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti Date: Tue, 10 Dec 2024 10:23:58 +0100 Subject: [PATCH 1/5] Simplify `pixi` environments --- pyproject.toml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5fc968178..1ef4bfb1b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -187,10 +187,8 @@ platforms = ["linux-64", "osx-arm64", "osx-64"] [tool.pixi.environments] # We resolve only two groups: cpu and gpu. # Then, multiple environments can be created from these groups. -default = { solve-group = "cpugroup" } -gpu = { features = ["gpu"], solve-group = "gpugroup" } -tasks-cpu = { features = ["test", "examples"], solve-group = "cpugroup" } -tasks-gpu = { features = ["test", "examples", "gpu"], solve-group = "gpugroup" } +default = { features = ["test", "examples"] } +gpu = { features = ["test", "examples", "gpu"] } # --------------- # feature.default From f5e1c4801c696891704f6b8076b71f02cc97b0b1 Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti Date: Tue, 10 Dec 2024 10:24:29 +0100 Subject: [PATCH 2/5] Remove `jaxlib` version constraint for `pixi` --- pyproject.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1ef4bfb1b..030d9ad76 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -266,9 +266,7 @@ system-requirements = { cuda = "12" } [tool.pixi.feature.gpu.dependencies] cuda-version = "12.*" -# Pinning a specific version awaiting the following to get addressed: -# https://github.com/conda-forge/jaxlib-feedstock/issues/285 -jaxlib = { version = "<0.4.31", build = "*cuda*" } +jaxlib = { version = "*", build = "*cuda*" } [tool.pixi.feature.gpu.tasks] gpu-tests = { cmd = "pytest --gpu-only", depends_on = ["pipcheck"] } From 9bb10593cf283e2370382ef12376a8da6d6f8314 Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti Date: Tue, 10 Dec 2024 10:24:42 +0100 Subject: [PATCH 3/5] Rename GPU test command in pyproject.toml for clarity --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 030d9ad76..571402692 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -269,4 +269,4 @@ cuda-version = "12.*" jaxlib = { version = "*", build = "*cuda*" } [tool.pixi.feature.gpu.tasks] -gpu-tests = { cmd = "pytest --gpu-only", depends_on = ["pipcheck"] } +test-gpu = { cmd = "pytest --gpu-only", depends_on = ["pipcheck"] } From c12f5e772aa8f77ac2047bce60922efc4eb9a1a3 Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti Date: Tue, 10 Dec 2024 10:25:02 +0100 Subject: [PATCH 4/5] Add `jupyter` extra to `black` dependency --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 571402692..783ce8b8f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -236,7 +236,7 @@ test = { cmd = "pytest", depends_on = ["pipcheck"] } benchmark = { cmd = "pytest --benchmark-only", depends_on = ["pipcheck"] } [tool.pixi.feature.test.dependencies] -black = "24.*" +black-jupyter = "24.*" idyntree = "*" isort = "*" pre-commit = "*" From e4fb2ff355ab932fa19d77475f7e961e99c75790 Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti Date: Tue, 10 Dec 2024 10:31:46 +0100 Subject: [PATCH 5/5] Add `lint` task to `pixi` --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 783ce8b8f..a5c271c30 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -232,8 +232,9 @@ jaxsim = { path = "./", editable = true } [tool.pixi.feature.test.tasks] pipcheck = "pip check" -test = { cmd = "pytest", depends_on = ["pipcheck"] } benchmark = { cmd = "pytest --benchmark-only", depends_on = ["pipcheck"] } +lint = { cmd = "pre-commit run --all-files --hook-stage=manual" } +test = { cmd = "pytest", depends_on = ["pipcheck"] } [tool.pixi.feature.test.dependencies] black-jupyter = "24.*"