From 0e3707c8ca8e1425c7dbd7d9b0f991a26d845a50 Mon Sep 17 00:00:00 2001 From: chris-ha458 Date: Sun, 20 Aug 2023 00:07:38 +0900 Subject: [PATCH 1/4] add maturin feature without this installation causes a warning on conda environments and an error on pip venvs --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 73ee2907..fd6eb705 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ setup: $(shell "${PROTOBUF_SETUP}") $(shell "${OPENSSL_SETUP}") which cargo || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - which maturin || pip install maturin + which maturin || pip install maturin[patchelf] publish: maturin publish From 9b445c4e06880a2ce74266a1648987fb615f8cb4 Mon Sep 17 00:00:00 2001 From: chris-ha458 Date: Sun, 20 Aug 2023 00:09:18 +0900 Subject: [PATCH 2/4] fix test-rust these dependencies neither seem to exist nor are they seem to be required --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fd6eb705..afa4b41e 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ test-python: pytest -vs tests/python rm -rf tests/work/* -test-rust: test-rust-clean test-rust-setup +test-rust: cargo test -- --nocapture rm -rf tests/work/* From 808f9e8a72f82d886f84e76fe2246a2a95534896 Mon Sep 17 00:00:00 2001 From: chris-ha458 Date: Sun, 20 Aug 2023 00:14:43 +0900 Subject: [PATCH 3/4] add style guide a proper `CONTRIBUTING.md` , style guide, precommit file would be hlepful as well --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 4d1d4c9a..796fb1cc 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,12 @@ make test You can choose to run just the Python or Rust tests by calling `make test-python` or `make test-rust` respectively. +## Contributing + +Before committing, use the following command +```shell +make style +``` ## Citation From 2141d07cbab0bb5d187e6b83c1e86b32c9b23035 Mon Sep 17 00:00:00 2001 From: Chris Ha Date: Tue, 22 Aug 2023 14:14:19 +0900 Subject: [PATCH 4/4] reflect patchelf dependency This path reflects that dolma relies on patchelf because maturin does. Also this way we use maturin's specific optional dependency of patchelf. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c08d6e59..d78c1598 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -107,7 +107,7 @@ dev = [ ] [build-system] requires = [ - "maturin>=1.1,<2.0", + "maturin[patchelf]>=1.1,<2.0", "setuptools >= 61.0.0", "wheel" ]