egglog 7.2.0__tar.gz → 8.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of egglog might be problematic. Click here for more details.

Files changed (139) hide show
  1. {egglog-7.2.0 → egglog-8.0.1}/.github/dependabot.yml +15 -0
  2. {egglog-7.2.0 → egglog-8.0.1}/.github/workflows/CI.yml +32 -20
  3. {egglog-7.2.0 → egglog-8.0.1}/.github/workflows/version.yml +9 -6
  4. {egglog-7.2.0 → egglog-8.0.1}/.gitignore +2 -1
  5. egglog-8.0.1/.pre-commit-config.yaml +8 -0
  6. egglog-8.0.1/.python-version +1 -0
  7. {egglog-7.2.0 → egglog-8.0.1}/.readthedocs.yaml +8 -15
  8. {egglog-7.2.0 → egglog-8.0.1}/Cargo.lock +175 -68
  9. egglog-8.0.1/Cargo.toml +38 -0
  10. egglog-8.0.1/Makefile +40 -0
  11. {egglog-7.2.0 → egglog-8.0.1}/PKG-INFO +32 -31
  12. {egglog-7.2.0 → egglog-8.0.1}/docs/changelog.md +16 -0
  13. {egglog-7.2.0 → egglog-8.0.1}/docs/conf.py +8 -0
  14. egglog-8.0.1/docs/explanation/2023_07_presentation.ipynb +12102 -0
  15. {egglog-7.2.0 → egglog-8.0.1}/docs/explanation/2023_11_09_portland_state.ipynb +9 -9
  16. egglog-8.0.1/docs/explanation/2023_11_17_pytensor.ipynb +2530 -0
  17. {egglog-7.2.0 → egglog-8.0.1}/docs/explanation/2023_11_pydata_lightning_talk.ipynb +12 -14
  18. egglog-8.0.1/docs/explanation/pldi_2023_presentation.ipynb +4930 -0
  19. egglog-8.0.1/docs/how-to-guides.md +21 -0
  20. {egglog-7.2.0 → egglog-8.0.1}/docs/index.md +2 -11
  21. {egglog-7.2.0 → egglog-8.0.1}/docs/reference/bindings.md +1 -1
  22. {egglog-7.2.0 → egglog-8.0.1}/docs/reference/contributing.md +12 -11
  23. {egglog-7.2.0 → egglog-8.0.1}/docs/reference/python-integration.md +54 -0
  24. {egglog-7.2.0 → egglog-8.0.1}/docs/tutorials/getting-started.ipynb +4 -13
  25. egglog-8.0.1/docs/tutorials/sklearn.ipynb +6640 -0
  26. {egglog-7.2.0 → egglog-8.0.1}/pyproject.toml +30 -6
  27. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/bindings.pyi +107 -53
  28. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/builtins.py +49 -6
  29. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/conversion.py +32 -9
  30. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/declarations.py +82 -4
  31. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/egraph.py +260 -179
  32. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/egraph_state.py +149 -66
  33. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/examples/higher_order_functions.py +4 -9
  34. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/exp/array_api.py +278 -93
  35. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/exp/array_api_jit.py +4 -8
  36. egglog-8.0.1/python/egglog/exp/array_api_loopnest.py +149 -0
  37. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/exp/array_api_numba.py +1 -1
  38. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/exp/array_api_program_gen.py +62 -25
  39. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/exp/program_gen.py +23 -17
  40. egglog-8.0.1/python/egglog/functionalize.py +91 -0
  41. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/ipython_magic.py +1 -1
  42. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/pretty.py +88 -44
  43. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/runtime.py +53 -40
  44. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/thunk.py +30 -18
  45. egglog-8.0.1/python/egglog/visualizer.css +1 -0
  46. egglog-8.0.1/python/egglog/visualizer.js +35774 -0
  47. egglog-8.0.1/python/egglog/visualizer_widget.py +39 -0
  48. egglog-8.0.1/python/tests/__snapshots__/test_array_api/TestLDA.test_optimize.py +75 -0
  49. {egglog-7.2.0 → egglog-8.0.1}/python/tests/__snapshots__/test_array_api/TestLDA.test_source_optimized.py +9 -9
  50. egglog-8.0.1/python/tests/__snapshots__/test_array_api/TestLDA.test_trace.py +77 -0
  51. egglog-8.0.1/python/tests/__snapshots__/test_bindings/TestEGraph.test_parse_program.py +178 -0
  52. {egglog-7.2.0 → egglog-8.0.1}/python/tests/conftest.py +1 -1
  53. {egglog-7.2.0 → egglog-8.0.1}/python/tests/test_array_api.py +73 -37
  54. egglog-8.0.1/python/tests/test_bindings.py +278 -0
  55. egglog-8.0.1/python/tests/test_functionalize.py +61 -0
  56. {egglog-7.2.0 → egglog-8.0.1}/python/tests/test_high_level.py +9 -8
  57. egglog-8.0.1/python/tests/test_no_import_star.py +12 -0
  58. {egglog-7.2.0 → egglog-8.0.1}/python/tests/test_program_gen.py +5 -4
  59. {egglog-7.2.0 → egglog-8.0.1}/python/tests/test_py_object_sort.py +12 -9
  60. {egglog-7.2.0 → egglog-8.0.1}/python/tests/test_runtime.py +1 -1
  61. {egglog-7.2.0 → egglog-8.0.1}/python/tests/test_typing.py +1 -1
  62. egglog-8.0.1/python/tests/test_unstable_fn.py +368 -0
  63. egglog-8.0.1/rust-toolchain.toml +2 -0
  64. {egglog-7.2.0 → egglog-8.0.1}/src/conversions.rs +147 -111
  65. {egglog-7.2.0 → egglog-8.0.1}/src/egraph.rs +20 -33
  66. {egglog-7.2.0 → egglog-8.0.1}/src/error.rs +6 -3
  67. {egglog-7.2.0 → egglog-8.0.1}/src/lib.rs +14 -4
  68. {egglog-7.2.0 → egglog-8.0.1}/src/py_object_sort.rs +47 -42
  69. {egglog-7.2.0 → egglog-8.0.1}/src/serialize.rs +10 -1
  70. {egglog-7.2.0 → egglog-8.0.1}/stubtest_allow +0 -1
  71. egglog-8.0.1/uv.lock +2819 -0
  72. egglog-7.2.0/.pre-commit-config.yaml +0 -39
  73. egglog-7.2.0/Cargo.toml +0 -33
  74. egglog-7.2.0/docs/explanation/2023_07_presentation.ipynb +0 -12126
  75. egglog-7.2.0/docs/explanation/2023_11_17_pytensor.ipynb +0 -2552
  76. egglog-7.2.0/docs/explanation/pldi_2023_presentation.ipynb +0 -4951
  77. egglog-7.2.0/docs/how-to-guides.md +0 -30
  78. egglog-7.2.0/docs/tutorials/sklearn.ipynb +0 -6639
  79. egglog-7.2.0/python/egglog/graphviz_widget.py +0 -34
  80. egglog-7.2.0/python/egglog/widget.css +0 -6
  81. egglog-7.2.0/python/egglog/widget.js +0 -50
  82. egglog-7.2.0/python/tests/__snapshots__/test_array_api/TestLDA.test_optimize.py +0 -68
  83. egglog-7.2.0/python/tests/__snapshots__/test_array_api/TestLDA.test_trace.py +0 -75
  84. egglog-7.2.0/python/tests/test_bindings.py +0 -234
  85. egglog-7.2.0/python/tests/test_unstable_fn.py +0 -184
  86. egglog-7.2.0/rust-toolchain.toml +0 -2
  87. {egglog-7.2.0 → egglog-8.0.1}/CITATION.cff +0 -0
  88. {egglog-7.2.0 → egglog-8.0.1}/LICENSE +0 -0
  89. {egglog-7.2.0 → egglog-8.0.1}/README.md +0 -0
  90. {egglog-7.2.0 → egglog-8.0.1}/conftest.py +0 -0
  91. {egglog-7.2.0 → egglog-8.0.1}/docs/.gitignore +0 -0
  92. {egglog-7.2.0 → egglog-8.0.1}/docs/_templates/comments.html +0 -0
  93. {egglog-7.2.0 → egglog-8.0.1}/docs/environment.yml +0 -0
  94. {egglog-7.2.0 → egglog-8.0.1}/docs/explanation/.gitignore +0 -0
  95. {egglog-7.2.0 → egglog-8.0.1}/docs/explanation/2023_12_02_congruence_closure-1.png +0 -0
  96. {egglog-7.2.0 → egglog-8.0.1}/docs/explanation/2023_12_02_congruence_closure-2.png +0 -0
  97. {egglog-7.2.0 → egglog-8.0.1}/docs/explanation/2023_12_02_congruence_closure.md +0 -0
  98. {egglog-7.2.0 → egglog-8.0.1}/docs/explanation/2024_03_17_community_talk.ipynb +0 -0
  99. {egglog-7.2.0 → egglog-8.0.1}/docs/explanation/2024_03_17_map.svg +0 -0
  100. {egglog-7.2.0 → egglog-8.0.1}/docs/explanation/big_graph.svg +0 -0
  101. {egglog-7.2.0 → egglog-8.0.1}/docs/explanation/define_and_define.md +0 -0
  102. {egglog-7.2.0 → egglog-8.0.1}/docs/explanation/ecosystem-graph.png +0 -0
  103. {egglog-7.2.0 → egglog-8.0.1}/docs/explanation/egg.png +0 -0
  104. {egglog-7.2.0 → egglog-8.0.1}/docs/explanation/indexing_pushdown.ipynb +0 -0
  105. {egglog-7.2.0 → egglog-8.0.1}/docs/explanation/moa.png +0 -0
  106. {egglog-7.2.0 → egglog-8.0.1}/docs/explanation/optional_values.md +0 -0
  107. {egglog-7.2.0 → egglog-8.0.1}/docs/explanation.md +0 -0
  108. {egglog-7.2.0 → egglog-8.0.1}/docs/reference/egglog-translation.md +0 -0
  109. {egglog-7.2.0 → egglog-8.0.1}/docs/reference/high-level.md +0 -0
  110. {egglog-7.2.0 → egglog-8.0.1}/docs/reference/usage.md +0 -0
  111. {egglog-7.2.0 → egglog-8.0.1}/docs/reference.md +0 -0
  112. {egglog-7.2.0 → egglog-8.0.1}/docs/tutorials/screenshot-1.png +0 -0
  113. {egglog-7.2.0 → egglog-8.0.1}/docs/tutorials/screenshot-2.png +0 -0
  114. {egglog-7.2.0 → egglog-8.0.1}/docs/tutorials.md +0 -0
  115. {egglog-7.2.0 → egglog-8.0.1}/increment_version.py +0 -0
  116. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/__init__.py +0 -0
  117. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/config.py +0 -0
  118. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/examples/README.rst +0 -0
  119. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/examples/__init__.py +0 -0
  120. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/examples/bool.py +0 -0
  121. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/examples/eqsat_basic.py +0 -0
  122. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/examples/fib.py +0 -0
  123. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/examples/lambda_.py +0 -0
  124. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/examples/matrix.py +0 -0
  125. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/examples/ndarrays.py +0 -0
  126. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/examples/resolution.py +0 -0
  127. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/examples/schedule_demo.py +0 -0
  128. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/exp/__init__.py +0 -0
  129. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/exp/siu_examples.py +0 -0
  130. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/py.typed +0 -0
  131. {egglog-7.2.0 → egglog-8.0.1}/python/egglog/type_constraint_solver.py +0 -0
  132. {egglog-7.2.0 → egglog-8.0.1}/python/tests/__init__.py +0 -0
  133. {egglog-7.2.0 → egglog-8.0.1}/python/tests/__snapshots__/test_program_gen/test_to_string.py +0 -0
  134. {egglog-7.2.0 → egglog-8.0.1}/python/tests/test_convert.py +0 -0
  135. {egglog-7.2.0 → egglog-8.0.1}/python/tests/test_modules.py +0 -0
  136. {egglog-7.2.0 → egglog-8.0.1}/python/tests/test_pretty.py +0 -0
  137. {egglog-7.2.0 → egglog-8.0.1}/python/tests/test_type_constraint_solver.py +0 -0
  138. {egglog-7.2.0 → egglog-8.0.1}/src/utils.rs +0 -0
  139. {egglog-7.2.0 → egglog-8.0.1}/test-data/unit/check-high-level.test +0 -0
@@ -9,11 +9,26 @@ updates:
9
9
  directory: "/"
10
10
  schedule:
11
11
  interval: "weekly"
12
+ groups:
13
+ rust-production:
14
+ dependency-type: "production"
15
+ rust-development:
16
+ dependency-type: "development"
12
17
  - package-ecosystem: "github-actions"
13
18
  directory: "/"
14
19
  schedule:
15
20
  interval: "weekly"
21
+ groups:
22
+ actions-production:
23
+ dependency-type: "production"
24
+ actions-development:
25
+ dependency-type: "development"
16
26
  - package-ecosystem: "pip"
17
27
  directory: "/"
18
28
  schedule:
19
29
  interval: "weekly"
30
+ groups:
31
+ python-production:
32
+ dependency-type: "production"
33
+ python-development:
34
+ dependency-type: "development"
@@ -25,56 +25,68 @@ jobs:
25
25
  - "3.10"
26
26
  steps:
27
27
  - uses: actions/checkout@v4
28
- - uses: dtolnay/rust-toolchain@1.71.1
28
+ - uses: astral-sh/setup-uv@v3
29
+ with:
30
+ enable-cache: true
31
+ - uses: dtolnay/rust-toolchain@1.79.0
29
32
  - uses: Swatinem/rust-cache@v2
30
33
  - name: Setup python ${{ matrix.py }}
31
34
  uses: actions/setup-python@v5
32
35
  with:
33
36
  python-version: ${{ matrix.py }}
34
- cache: "pip"
35
- - run: pip install -e .[test]
36
- - run: pytest --benchmark-disable -vvv
37
+ - run: uv sync --extra test --locked
38
+ - run: uv run pytest --benchmark-disable -vvv
37
39
  mypy:
38
40
  runs-on: ubuntu-latest
39
41
  steps:
40
42
  - uses: actions/checkout@v4
41
- - uses: dtolnay/rust-toolchain@1.71.1
43
+ - uses: astral-sh/setup-uv@v3
44
+ with:
45
+ enable-cache: true
46
+ - uses: dtolnay/rust-toolchain@1.79.0
42
47
  - uses: Swatinem/rust-cache@v2
43
48
  - uses: actions/setup-python@v5
44
49
  with:
50
+ # Run on oldest Python version to catch more errors
45
51
  python-version: "3.10"
46
- cache: "pip"
47
- - run: pip install -e .[test] mypy pre-commit
48
- - run: pre-commit run --hook-stage manual --all-files mypy
49
- - run: pre-commit run --hook-stage manual --all-files stubtest
52
+ - run: uv sync --extra test --locked
53
+ - run: make mypy
54
+ - run: make stubtest
55
+
50
56
  benchmark:
51
57
  runs-on: ubuntu-latest
52
58
  steps:
53
59
  - uses: actions/checkout@v4
54
- - uses: dtolnay/rust-toolchain@1.71.1
60
+ - uses: astral-sh/setup-uv@v3
61
+ with:
62
+ enable-cache: true
63
+ - uses: dtolnay/rust-toolchain@1.79.0
55
64
  - uses: Swatinem/rust-cache@v2
56
65
  - uses: actions/setup-python@v5
57
66
  with:
58
- python-version: "3.12"
59
- cache: "pip"
60
- - run: pip install -e .[test]
61
- - uses: CodSpeedHQ/action@v2
67
+ python-version-file: ".python-version"
68
+ - run: uv sync --extra test --locked
69
+ - uses: CodSpeedHQ/action@v3
62
70
  with:
63
71
  token: ${{ secrets.CODSPEED_TOKEN }}
64
- run: pytest -vvv -n auto
72
+ # allow updating snapshots due to indeterministic benchmarks
73
+ run: uv run pytest -vvv -n auto --snapshot-update
74
+
65
75
  docs:
66
76
  runs-on: ubuntu-latest
67
77
  steps:
68
78
  - uses: actions/checkout@v4
69
- - uses: dtolnay/rust-toolchain@1.71.1
79
+ - uses: astral-sh/setup-uv@v3
80
+ with:
81
+ enable-cache: true
82
+ - uses: dtolnay/rust-toolchain@1.79.0
70
83
  - uses: Swatinem/rust-cache@v2
71
84
  - uses: actions/setup-python@v5
72
85
  with:
73
- python-version: "3.10"
74
- cache: "pip"
86
+ python-version-file: ".python-version"
75
87
  - name: Install graphviz
76
88
  run: |
77
89
  sudo apt-get update
78
90
  sudo apt-get install -y graphviz
79
- - run: pip install -e .[docs] pre-commit
80
- - run: pre-commit run --hook-stage manual --all-files docs
91
+ - run: uv sync --extra docs --locked
92
+ - run: make docs
@@ -53,7 +53,9 @@ jobs:
53
53
  - uses: actions/checkout@v4
54
54
  with:
55
55
  ref: version-${{ needs.bump.outputs.version }}
56
- - uses: PyO3/maturin-action@v1.42.1
56
+ - name: Setup QEMU
57
+ uses: docker/setup-qemu-action@v3
58
+ - uses: PyO3/maturin-action@v1.45.0
57
59
  with:
58
60
  manylinux: auto
59
61
  command: build
@@ -72,7 +74,7 @@ jobs:
72
74
  - uses: actions/checkout@v4
73
75
  with:
74
76
  ref: version-${{ needs.bump.outputs.version }}
75
- - uses: PyO3/maturin-action@v1.42.1
77
+ - uses: PyO3/maturin-action@v1.45.0
76
78
  with:
77
79
  command: build
78
80
  args: --release -o dist --find-interpreter
@@ -90,10 +92,11 @@ jobs:
90
92
  - uses: actions/checkout@v4
91
93
  with:
92
94
  ref: version-${{ needs.bump.outputs.version }}
93
- - uses: PyO3/maturin-action@v1.42.1
95
+ - uses: PyO3/maturin-action@v1.45.0
94
96
  with:
95
97
  command: build
96
- args: --release -o dist --universal2 --find-interpreter
98
+ target: universal2-apple-darwin
99
+ args: --release -o dist --find-interpreter
97
100
  - name: Upload wheels
98
101
  uses: actions/upload-artifact@v4
99
102
  with:
@@ -111,7 +114,7 @@ jobs:
111
114
  pattern: wheels-*
112
115
  merge-multiple: true
113
116
  - name: Publish to PyPI
114
- uses: PyO3/maturin-action@v1.42.1
117
+ uses: PyO3/maturin-action@v1.45.0
115
118
  env:
116
119
  MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
117
120
  with:
@@ -128,7 +131,7 @@ jobs:
128
131
  - run: |
129
132
  git tag "v$VERSION"
130
133
  git push --tags
131
- gh pr merge --admin --delete-branch --merge
134
+ gh pr merge --admin --delete-branch --merge --auto
132
135
  env:
133
136
  VERSION: ${{ needs.bump.outputs.version }}
134
137
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -69,7 +69,6 @@ docs/_build/
69
69
  .vscode/
70
70
 
71
71
  # Pyenv
72
- .python-version
73
72
 
74
73
  TODO
75
74
  *.code-workspace
@@ -83,3 +82,5 @@ Source.*
83
82
  3
84
83
  4
85
84
  inlined
85
+ visualizer.tgz
86
+ package
@@ -0,0 +1,8 @@
1
+ exclude: ^python/tests/__snapshots__/
2
+ repos:
3
+ - repo: https://github.com/astral-sh/ruff-pre-commit
4
+ rev: v0.7.0
5
+ hooks:
6
+ - id: ruff
7
+ args: [--fix, --exit-non-zero-on-fix]
8
+ - id: ruff-format
@@ -0,0 +1 @@
1
+ 3.12
@@ -12,24 +12,17 @@ build:
12
12
  python: "3.12"
13
13
  # # You can also specify other tool versions:
14
14
  # # nodejs: "16"
15
- rust: "1.70"
15
+ rust: "1.78"
16
16
  # golang: "1.17"
17
17
  apt_packages:
18
18
  - graphviz
19
+ commands:
20
+ - asdf plugin add uv
21
+ - asdf install uv latest
22
+ - asdf global uv latest
23
+ - uv sync --extra docs --frozen
24
+ - uv run -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html
25
+
19
26
  # Build documentation in the docs/ directory with Sphinx
20
27
  sphinx:
21
28
  configuration: docs/conf.py
22
-
23
- # If using Sphinx, optionally build your docs in additional formats such as PDF
24
- # formats:
25
- # - pdf
26
-
27
- # Optionally declare the Python requirements required to build your docs
28
- python:
29
- install:
30
- - method: pip
31
- path: .
32
- extra_requirements:
33
- - docs
34
- # conda:
35
- # environment: docs/environment.yml