You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then [install Rust](https://www.rust-lang.org/tools/install) and get a Python environment set up with a compatible version. Using [miniconda](https://formulae.brew.sh/cask/miniconda) this would be:
23
+
Then [install Rust](https://www.rust-lang.org/tools/install) and get a Python environment set up with a compatible version. Using [uv](https://docs.astral.sh/uv/getting-started/installation/) this would be:
24
24
25
25
```bash
26
26
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
27
-
brew install --cask miniconda
28
-
conda create -n egglog-python python
29
-
conda activate egglog-python
27
+
curl -LsSf https://astral.sh/uv/install.sh | sh
30
28
```
31
29
32
30
Then install the package in editable mode with the development dependencies:
33
31
34
32
```bash
35
-
maturin develop -E dev,docs,test,array
33
+
uv sync --all-extras
36
34
```
37
35
38
-
Anytime you change the rust code, you can run `maturin develop` to recompile the rust code.
36
+
Anytime you change the rust code, you can run `uv sync` to recompile the rust code.
39
37
40
38
If you would like to download a new version of the visualizer source, run `make clean; make`. This will download
41
39
the most recent released version from the github actions artifact in the [egraph-visualizer](https://github.com/egraphs-good/egraph-visualizer) repo. It is checked in because it's a pain to get cargo to include only one git ignored file while ignoring the rest of the files that were ignored.
@@ -45,33 +43,33 @@ the most recent released version from the github actions artifact in the [egraph
45
43
To run the tests, you can use the `pytest` command:
46
44
47
45
```bash
48
-
pytest
46
+
uv run pytest
49
47
```
50
48
51
49
All code must pass ruff linters and formaters. This will be checked automatically by the pre-commit if you run `pre-commit install`.
52
50
53
51
To run it manually, you can use:
54
52
55
53
```bash
56
-
pre-commit run --all-files ruff
54
+
uv run pre-commit run --all-files ruff
57
55
```
58
56
59
57
If you make changes to the rust bindings, you can check that the stub files accurately reflect the rust code by running:
60
58
61
59
```bash
62
-
pre-commit run --all-files --hook-stage manual stubtest
60
+
make stubtest
63
61
```
64
62
65
63
All code must all pass MyPy type checking. To run that locally use:
66
64
67
65
```bash
68
-
pre-commit run --all-files --hook-stage manual mypy
66
+
make mypy
69
67
```
70
68
71
69
Finally, to build the docs locally and test that they work, you can run:
72
70
73
71
```bash
74
-
pre-commit run --all-files --hook-stage manual docs
0 commit comments