From ab6a269e0d96d1229df8460d6c02da7ba9094539 Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti Date: Wed, 27 Nov 2024 16:50:47 +0100 Subject: [PATCH 1/7] Update `.gitignore` with `pixi` files --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 54579b8..2440c4d 100644 --- a/.gitignore +++ b/.gitignore @@ -130,3 +130,7 @@ dmypy.json # IDE .idea + +# pixi environments +.pixi +*.egg-info From fa039811d6154b13b549c6bca5d671721cd73ec4 Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti Date: Wed, 27 Nov 2024 16:51:26 +0100 Subject: [PATCH 2/7] Add `pixi` support to `pyproject.toml` --- pyproject.toml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 0b9079d..1152161 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -164,3 +164,19 @@ ignore = [ [tool.ruff.lint.per-file-ignores] # Ignore `E402` (import violations) in all `__init__.py` files "__init__.py" = ["F401", "F821"] + +[tool.pixi.project] +channels = ["conda-forge"] +platforms = ["linux-64"] + +[tool.pixi.pypi-dependencies] +rod = { path = ".", editable = true } + +[tool.pixi.environments] +default = { solve-group = "default" } +all = { features = ["all", "style", "pptree", "testing"], solve-group = "default" } +pptree = { features = ["pptree"], solve-group = "default" } +style = { features = ["style"], solve-group = "default" } +testing = { features = ["testing"], solve-group = "default" } + +[tool.pixi.tasks] From 9023b34566ccb1aa3d72f69f807ae6e727d12036 Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti Date: Wed, 27 Nov 2024 16:51:53 +0100 Subject: [PATCH 3/7] Add `.gitattributes` --- .gitattributes | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..8f61a8e --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# SCM syntax highlighting +pixi.lock linguist-language=YAML linguist-generated=true From d857fbef6d2af877d6d1ee75dc4ad00589844817 Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti Date: Wed, 27 Nov 2024 17:07:31 +0100 Subject: [PATCH 4/7] Load `pixi.lock` to LFS --- .gitattributes | 3 +++ pixi.lock | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 pixi.lock diff --git a/.gitattributes b/.gitattributes index 8f61a8e..4e53a29 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,5 @@ +# LFS +pixi.lock filter=lfs diff=lfs merge=lfs -text + # SCM syntax highlighting pixi.lock linguist-language=YAML linguist-generated=true diff --git a/pixi.lock b/pixi.lock new file mode 100644 index 0000000..6f9010f --- /dev/null +++ b/pixi.lock @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad5c217ec910b6fb75d18e454db364169b66ecc039e8aa706a75ad269661e1df +size 100593 From 1bbb592e5f34fee68ee86d5ac31e183b96b59134 Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti Date: Wed, 27 Nov 2024 17:19:46 +0100 Subject: [PATCH 5/7] Add `pixi` specific deps --- pyproject.toml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 1152161..555e179 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -165,10 +165,27 @@ ignore = [ # Ignore `E402` (import violations) in all `__init__.py` files "__init__.py" = ["F401", "F821"] + +# ================== +# Pixi configuration +# ================== + [tool.pixi.project] channels = ["conda-forge"] platforms = ["linux-64"] +[tool.pixi.dependencies] +resolve-robotics-uri-py = "*" +trimesh = "*" +xmltodict = "*" +coloredlogs = "*" +mashumaro = "*" +gz-tools2 = "*" +libsdformat13 = "*" +numpy = "*" +scipy = "*" +packaging = "*" + [tool.pixi.pypi-dependencies] rod = { path = ".", editable = true } From 6c00e1b4c7ca17503d49d528ff2479a072025aeb Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti Date: Wed, 27 Nov 2024 17:20:03 +0100 Subject: [PATCH 6/7] Add test task --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 555e179..a6308b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -196,4 +196,5 @@ pptree = { features = ["pptree"], solve-group = "default" } style = { features = ["style"], solve-group = "default" } testing = { features = ["testing"], solve-group = "default" } -[tool.pixi.tasks] +[tool.pixi.feature.testing.tasks] +test = "pytest -vv" From 97b6c09b614296fdfc66117ce08737b62192169a Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti Date: Thu, 28 Nov 2024 16:21:05 +0100 Subject: [PATCH 7/7] Add `pixi` installation instruction in README --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 9559fa6..57db28e 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,26 @@ This will automatically install `sdformat` and `gz-tools`. +
+Using pixi + +[`pixi`](https://pixi.sh) definetly provides the quickest way to start using ROD. You can run the tests by executing: + +```bash +pixi run test +``` + +or install the default dependencies with: + +```bash +pixi install +``` + +check out the [pyproject.toml](./pyproject.toml) file for the list of all available features and read the [`pixi`](https://pixi.sh) documentation for more information. + +
+ +
Using pip