egglog 7.2.0__cp312-none-win_amd64.whl → 8.0.1__cp312-none-win_amd64.whl

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.

@@ -0,0 +1,39 @@
1
+ import pathlib
2
+
3
+ import anywidget
4
+ import traitlets
5
+ from graphviz.backend.viewing import view
6
+ from IPython.display import display
7
+ from ipywidgets.embed import embed_minimal_html
8
+
9
+ from .ipython_magic import IN_IPYTHON
10
+
11
+ CURRENT_DIR = pathlib.Path(__file__).parent
12
+
13
+
14
+ class VisualizerWidget(anywidget.AnyWidget):
15
+ """
16
+ Widget to render multiple graphs using the interactive visualizer.
17
+
18
+ The index will choose the one that is currently displayed, defaulting to the last one.
19
+ """
20
+
21
+ _esm = CURRENT_DIR / "visualizer.js"
22
+ _css = CURRENT_DIR / "visualizer.css"
23
+ egraphs = traitlets.List[str]().tag(sync=True)
24
+
25
+ def display_or_open(self) -> None:
26
+ """
27
+ Displays the widget if we are in a Jupyter environment, otherwise saves it to a file and opens it.
28
+ """
29
+ if IN_IPYTHON:
30
+ display(self)
31
+ return
32
+ # 1. Create a temporary html file that will stay open after close
33
+ # 2. Write the widget to it with embed_minimal_html
34
+ # 3. Open the file using the open function from graphviz
35
+ file = pathlib.Path.cwd() / "tmp.html"
36
+ # https://github.com/manzt/anywidget/issues/339#issuecomment-1755654547
37
+ embed_minimal_html(file, views=[self], drop_defaults=False)
38
+ print("Visualizer widget saved to", file)
39
+ view(file)
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: egglog
3
- Version: 7.2.0
3
+ Version: 8.0.1
4
4
  Classifier: Environment :: MacOS X
5
5
  Classifier: Environment :: Win32 (MS Windows)
6
6
  Classifier: Intended Audience :: Developers
@@ -19,38 +19,39 @@ Classifier: Typing :: Typed
19
19
  Requires-Dist: typing-extensions
20
20
  Requires-Dist: black
21
21
  Requires-Dist: graphviz
22
- Requires-Dist: pydata-sphinx-theme; extra == 'docs'
23
- Requires-Dist: myst-nb; extra == 'docs'
24
- Requires-Dist: sphinx-autodoc-typehints; extra == 'docs'
25
- Requires-Dist: sphinx-gallery; extra == 'docs'
26
- Requires-Dist: nbconvert; extra == 'docs'
27
- Requires-Dist: matplotlib; extra == 'docs'
28
- Requires-Dist: anywidget; extra == 'docs'
29
- Requires-Dist: seaborn; extra == 'docs'
30
- Requires-Dist: egglog[array]; extra == 'docs'
31
- Requires-Dist: line-profiler; extra == 'docs'
32
- Requires-Dist: sphinxcontrib-mermaid; extra == 'docs'
33
- Requires-Dist: ablog; extra == 'docs'
34
- Requires-Dist: pytest; extra == 'test'
35
- Requires-Dist: mypy; extra == 'test'
36
- Requires-Dist: syrupy; extra == 'test'
37
- Requires-Dist: egglog[array]; extra == 'test'
38
- Requires-Dist: pytest-codspeed; extra == 'test'
39
- Requires-Dist: pytest-benchmark; extra == 'test'
40
- Requires-Dist: pytest-xdist; extra == 'test'
41
- Requires-Dist: scikit-learn; extra == 'array'
42
- Requires-Dist: array_api_compat; extra == 'array'
43
- Requires-Dist: numba==0.59.1; extra == 'array'
44
- Requires-Dist: llvmlite==0.42.0; extra == 'array'
45
- Requires-Dist: pre-commit; extra == 'dev'
46
- Requires-Dist: ruff; extra == 'dev'
47
- Requires-Dist: mypy; extra == 'dev'
48
- Requires-Dist: anywidget[dev]; extra == 'dev'
49
- Requires-Dist: egglog[docs,test]; extra == 'dev'
50
- Provides-Extra: docs
51
- Provides-Extra: test
22
+ Requires-Dist: anywidget
23
+ Requires-Dist: scikit-learn ; extra == 'array'
24
+ Requires-Dist: array-api-compat ; extra == 'array'
25
+ Requires-Dist: numba ==0.59.1 ; extra == 'array'
26
+ Requires-Dist: llvmlite ==0.42.0 ; extra == 'array'
27
+ Requires-Dist: ruff ; extra == 'dev'
28
+ Requires-Dist: pre-commit ; extra == 'dev'
29
+ Requires-Dist: mypy ; extra == 'dev'
30
+ Requires-Dist: anywidget[dev] ; extra == 'dev'
31
+ Requires-Dist: egglog[docs,test] ; extra == 'dev'
32
+ Requires-Dist: pytest ; extra == 'test'
33
+ Requires-Dist: mypy ; extra == 'test'
34
+ Requires-Dist: syrupy ; extra == 'test'
35
+ Requires-Dist: egglog[array] ; extra == 'test'
36
+ Requires-Dist: pytest-codspeed ; extra == 'test'
37
+ Requires-Dist: pytest-benchmark ; extra == 'test'
38
+ Requires-Dist: pytest-xdist ; extra == 'test'
39
+ Requires-Dist: pydata-sphinx-theme ; extra == 'docs'
40
+ Requires-Dist: myst-nb ; extra == 'docs'
41
+ Requires-Dist: sphinx-autodoc-typehints ; extra == 'docs'
42
+ Requires-Dist: sphinx-gallery ; extra == 'docs'
43
+ Requires-Dist: nbconvert ; extra == 'docs'
44
+ Requires-Dist: matplotlib ; extra == 'docs'
45
+ Requires-Dist: anywidget ; extra == 'docs'
46
+ Requires-Dist: seaborn ; extra == 'docs'
47
+ Requires-Dist: egglog[array] ; extra == 'docs'
48
+ Requires-Dist: line-profiler ; extra == 'docs'
49
+ Requires-Dist: sphinxcontrib-mermaid ; extra == 'docs'
50
+ Requires-Dist: ablog ; extra == 'docs'
52
51
  Provides-Extra: array
53
52
  Provides-Extra: dev
53
+ Provides-Extra: test
54
+ Provides-Extra: docs
54
55
  License-File: LICENSE
55
56
  Summary: e-graphs in Python built around the the egglog rust library
56
57
  License: MIT
@@ -0,0 +1,42 @@
1
+ egglog-8.0.1.dist-info/METADATA,sha256=o6kbuHo1dQI88faQF8xLtjIR0Py8IzppNjEq6piwkoY,3884
2
+ egglog-8.0.1.dist-info/WHEEL,sha256=VGMDu5jnp_XpyXOq-L1-cbr3x9_PzCpsKi1udyLAeSI,95
3
+ egglog-8.0.1.dist-info/licenses/LICENSE,sha256=TfaboMVZ81Q6OUaKjU7z6uVjSlcGKclLYcOpgDbm9_s,1091
4
+ egglog/bindings.pyi,sha256=Zzhm7o_UfOou_6VQw8kjsVYj8cC6VegOnuTGV0240iw,13147
5
+ egglog/builtins.py,sha256=W42Zj8uuOiG8rGMvu1U20rIbWDGPkHHeU3qDlg9cQnU,14883
6
+ egglog/config.py,sha256=mALVaxh7zmGrbuyzaVKVmYKcu1lF703QsKJw8AF7gSM,176
7
+ egglog/conversion.py,sha256=Do76TJZHGhUnENCz1DNnH9gV7q4jrq6v5YTAazcglIs,7081
8
+ egglog/declarations.py,sha256=1OZuq5hbm0_Yy8JbmJ7Sp2JXB_MQTvJ-d2Kf3kaBuCk,21265
9
+ egglog/egraph.py,sha256=VKLaZqWXKlwO3aJ_Nayi5ZyPVdQY_Ms1xB5dELt64SQ,71917
10
+ egglog/egraph_state.py,sha256=tcvd3bkIULnNXQbpO5nInRcGua-032epcy7J1tcE7Ww,25772
11
+ egglog/examples/bool.py,sha256=pWZTjfXR1cFy3KcihLBU5AF5rn83ImORlhUUJ1YiAXc,733
12
+ egglog/examples/eqsat_basic.py,sha256=ORXFYYEDsEZK2IPhHtoFsd-LdjMiQi1nn7kix4Nam0s,1011
13
+ egglog/examples/fib.py,sha256=wAn-PjazxgHDkXAU4o2xTk_GtM_iGL0biV66vWM1st4,520
14
+ egglog/examples/higher_order_functions.py,sha256=5P-_10y8eTh-z3bze5GVzKHyFTeefTM774haF8KYGig,1164
15
+ egglog/examples/lambda_.py,sha256=hQBOaSw_yorNcbkQVu2EhgSc0IZNWIny7asaOlcUk9s,8496
16
+ egglog/examples/matrix.py,sha256=_zmjgfFr2O_LjTcsTD-45_38Y_M1sP3AV39K6oFxAdw,5136
17
+ egglog/examples/ndarrays.py,sha256=T-wwef-n-3LDSjaO35zA8AZH5DXFFqq0XBSCQKEXV6E,4186
18
+ egglog/examples/README.rst,sha256=QrbfmivODBvUvmY3-dHarcbC6bEvwoqAfTDhiI-aJxU,237
19
+ egglog/examples/resolution.py,sha256=sKkbRI_v9XkQM0DriacKLINqKKDqYGFhvMCAS9tZbTA,2203
20
+ egglog/examples/schedule_demo.py,sha256=iJtIbcLaZ7zK8UalY0z7KAKMqYjQx0MKTsNF24lKtik,652
21
+ egglog/examples/__init__.py,sha256=KuhaJFOyz_rpUvEqZubsgLnv6rhQNE_AVFXA6bUnpdY,34
22
+ egglog/exp/array_api.py,sha256=svlajo4Kw0Gj1DhTt5cpg4bKMFncUK3myKnh0ATw9QQ,47776
23
+ egglog/exp/array_api_jit.py,sha256=SEKFtx96sz4YDxKiDO1QzuT3xt_9yKa2fSLzZG_3ox8,1185
24
+ egglog/exp/array_api_loopnest.py,sha256=oKKiLBMs1HkxbiLuScMbjiL_7l_-ZKc58CuPutxAmYg,4410
25
+ egglog/exp/array_api_numba.py,sha256=SDYRVV45lM4tgwIbmPmOG4GIy8o4AKsUeqLqbGKolAw,2917
26
+ egglog/exp/array_api_program_gen.py,sha256=qR6cy3O5kjgPL-5I9zZt96u5YJuxaExhfPPyWULWpjQ,21356
27
+ egglog/exp/program_gen.py,sha256=Z2IsMMIDNb6yubn4ovkJnzqStPpNagIHS-Zca5qv300,12434
28
+ egglog/exp/siu_examples.py,sha256=KZmpkSCgbL4uqHhx2Jh9Adz1_cDbkIlyXPa1Kh_0O_8,784
29
+ egglog/exp/__init__.py,sha256=G9zeKUcPBgIhgUg1meC86OfZVFETYIugyHWseTcCe_0,52
30
+ egglog/functionalize.py,sha256=6BS3BheP3NrQAbIh4dmzXDaxu746zLdYIfYTfaMvNjQ,3936
31
+ egglog/ipython_magic.py,sha256=QDw45CA2wKi9vrBbvHZXLeMaRtoHSGLBJdqyNFtvD7o,1230
32
+ egglog/pretty.py,sha256=Dk4H2O3vgpt_FvdxcxGDSmZEw-U4AxRKrO-89rEtWxw,21380
33
+ egglog/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
+ egglog/runtime.py,sha256=N2yQ9m9BMvekiN1R8tfy76hlrOTPsfRRLNXZZntTjLQ,23918
35
+ egglog/thunk.py,sha256=t71q_SIRSpYh6oqOQ-TEDqMByrrwp5xvSJbVy3XONbQ,2263
36
+ egglog/type_constraint_solver.py,sha256=MW22gwryNOqsYaB__dCCjVvdnB1Km5fovoW2IgUXaVo,5836
37
+ egglog/visualizer.css,sha256=APwI_pG4w4OXXCc5o01TqKbwv9Fp_r-3bktM3kLIFb0,259244
38
+ egglog/visualizer.js,sha256=wQnOcOwmUIUAmVdeZ4vLaSjZMdzdJJz-3K1AGaQ8z1E,3788815
39
+ egglog/visualizer_widget.py,sha256=6oFfG-mHEeeh3dzng4hjU30dNI86bKEnSXismmlJTwc,1362
40
+ egglog/__init__.py,sha256=iUrVe5fb0XFyMCS3CwTjwhKEtU8KpIkdTpJpnUhm8o0,247
41
+ egglog/bindings.cp312-win_amd64.pyd,sha256=vfUkdGiwWW_YIh9L2eEP31w2wUgmCc3U7tjnpf-Wxyo,5003264
42
+ egglog-8.0.1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: maturin (0.13.7)
2
+ Generator: maturin (1.7.4)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp312-none-win_amd64
egglog/graphviz_widget.py DELETED
@@ -1,34 +0,0 @@
1
- import pathlib
2
-
3
- import anywidget
4
- import ipywidgets
5
- import traitlets
6
-
7
-
8
- class GraphvizWidget(anywidget.AnyWidget):
9
- """
10
- Graphviz widget to render multiple graphviz graphs.
11
-
12
- The index will choose the one that is currently displayed, defaulting to the last one.
13
- If the index or the graphs change, there will be a re-rendering, with animation.
14
- """
15
-
16
- _esm = pathlib.Path(__file__).parent / "widget.js"
17
- _css = pathlib.Path(__file__).parent / "widget.css"
18
- dots = traitlets.List().tag(sync=True)
19
- index = traitlets.Int(None, allow_none=True).tag(sync=True)
20
- performance = traitlets.Bool(False).tag(sync=True)
21
-
22
-
23
- def graphviz_widget_with_slider(dots: list[str], *, performance: bool = False) -> ipywidgets.VBox:
24
- n_dots = len(dots)
25
- graphviz_widget = GraphvizWidget()
26
- graphviz_widget.dots = dots
27
- graphviz_widget.performance = performance
28
- slider_widget = ipywidgets.IntSlider(max=n_dots - 1, value=0)
29
- ipywidgets.jslink((slider_widget, "value"), (graphviz_widget, "index"))
30
- # play_widget = ipywidgets.Play(max=n_dots - 1, repeat=True, interval=4000)
31
- # ipywidgets.jslink((slider_widget, "value"), (play_widget, "value"))
32
- # top = pywidgets.HBox([play_widget, slider_widget])
33
- top = slider_widget
34
- return ipywidgets.VBox([top, graphviz_widget])
egglog/widget.css DELETED
@@ -1,6 +0,0 @@
1
- .graphviz-container {
2
- /* position: absolute;
3
- top: 0;
4
- left: 0; */
5
- /* height: 100px; */
6
- }
egglog/widget.js DELETED
@@ -1,50 +0,0 @@
1
- import * as d3 from "https://cdn.skypack.dev/pin/d3@v7.8.5-eC7TKxlFLay7fmsv0gvu/dist=es2020,mode=imports,min/optimized/d3.js";
2
- import "https://cdn.skypack.dev/-/d3-graphviz@v5.1.0-TcGnvMu4khUzCpL7Wr2k/dist=es2020,mode=imports,min/optimized/d3-graphviz.js";
3
-
4
- export function render({ model, el }) {
5
- if (!document.getElementById("graphviz_script")) {
6
- const graphviz_script = document.createElement("script");
7
- graphviz_script.setAttribute("id", "graphviz_script");
8
- graphviz_script.setAttribute("src", "https://unpkg.com/@hpcc-js/wasm/dist/graphviz.umd.js");
9
- graphviz_script.setAttribute("type", "javascript/worker");
10
-
11
- document.head.appendChild(graphviz_script);
12
- }
13
- // let getCount = () => model.get("dot");
14
-
15
- const div = document.createElement("div");
16
- div.classList.add("graphviz-container");
17
- const graphContainer = d3.select(div);
18
-
19
- let setDot = () => {
20
- const dots = model.get("dots");
21
- const performance = model.get("performance");
22
- // Use the last dots if there is no index
23
- const dot = dots[model.get("index")];
24
- // const width = div.clientWidth;
25
- // const height = div.clientHeight;
26
- const graphviz = graphContainer
27
- .graphviz({
28
- // Fit graph to that size, so that all is visible
29
- fit: true,
30
- // Set to be as big as container
31
- // width,
32
- // height,
33
- // Don't animate transitions between shapes for performance
34
- tweenPaths: !performance,
35
- tweenShapes: !performance,
36
- useWorker: true,
37
- })
38
- .transition(() => d3.transition("t").duration(2000).ease(d3.easeLinear))
39
- .renderDot(dot);
40
- // If we have made a zoom selection, reset that before transitioning
41
- // TODO: figure out how to transition BOTH zoom and dot at once
42
- // if (graphviz._zoomSelection) {
43
- // graphviz.resetZoom();
44
- // }
45
- };
46
-
47
- model.on("change:dots change:index", setDot);
48
- el.appendChild(div);
49
- requestAnimationFrame(() => setTimeout(setDot, 0));
50
- }
@@ -1,40 +0,0 @@
1
- egglog-7.2.0.dist-info/METADATA,sha256=O3Uq5oIIHWZ-bG2XVILykl-0dYyuNuoR9Dxj38v6bXs,3829
2
- egglog-7.2.0.dist-info/WHEEL,sha256=5VSD4WjrAS64a1-QM6eGcLa48TnO082fkviTtVvn8m4,96
3
- egglog-7.2.0.dist-info/license_files/LICENSE,sha256=TfaboMVZ81Q6OUaKjU7z6uVjSlcGKclLYcOpgDbm9_s,1091
4
- egglog/bindings.pyi,sha256=iFdtYHqPjuVt46qh1IE81cOI-lbGgPISKQB-3ERNzhI,11770
5
- egglog/builtins.py,sha256=p5oZLDleCgQC8G2Zp2EvmqsfVnpgmARqUHqosKSSKnQ,13120
6
- egglog/config.py,sha256=mALVaxh7zmGrbuyzaVKVmYKcu1lF703QsKJw8AF7gSM,176
7
- egglog/conversion.py,sha256=4JhocGd1_nwmFMVNCzDDwj6aWfhBFTX2hm_7Xc_DiUM,6328
8
- egglog/declarations.py,sha256=WpZ1yyw4vlWm3Xi_otPP2IU51IqNcDmJA5y20RcBFBQ,18583
9
- egglog/egraph.py,sha256=Q3ZJhtzzWcsukuarT0vT48-DkfHe17adLLUHn-pILPE,68657
10
- egglog/egraph_state.py,sha256=kXCNt4zenG1meRv5T6B8xI5oH_NreA06JMhmqv_F-og,21802
11
- egglog/examples/bool.py,sha256=pWZTjfXR1cFy3KcihLBU5AF5rn83ImORlhUUJ1YiAXc,733
12
- egglog/examples/eqsat_basic.py,sha256=ORXFYYEDsEZK2IPhHtoFsd-LdjMiQi1nn7kix4Nam0s,1011
13
- egglog/examples/fib.py,sha256=wAn-PjazxgHDkXAU4o2xTk_GtM_iGL0biV66vWM1st4,520
14
- egglog/examples/higher_order_functions.py,sha256=CBZqnqVdYGgztHw5QWtcnUhzs1nnBcw4O-gjSzAxjRc,1203
15
- egglog/examples/lambda_.py,sha256=hQBOaSw_yorNcbkQVu2EhgSc0IZNWIny7asaOlcUk9s,8496
16
- egglog/examples/matrix.py,sha256=_zmjgfFr2O_LjTcsTD-45_38Y_M1sP3AV39K6oFxAdw,5136
17
- egglog/examples/ndarrays.py,sha256=T-wwef-n-3LDSjaO35zA8AZH5DXFFqq0XBSCQKEXV6E,4186
18
- egglog/examples/README.rst,sha256=QrbfmivODBvUvmY3-dHarcbC6bEvwoqAfTDhiI-aJxU,237
19
- egglog/examples/resolution.py,sha256=sKkbRI_v9XkQM0DriacKLINqKKDqYGFhvMCAS9tZbTA,2203
20
- egglog/examples/schedule_demo.py,sha256=iJtIbcLaZ7zK8UalY0z7KAKMqYjQx0MKTsNF24lKtik,652
21
- egglog/examples/__init__.py,sha256=KuhaJFOyz_rpUvEqZubsgLnv6rhQNE_AVFXA6bUnpdY,34
22
- egglog/exp/array_api.py,sha256=b7MoUuH2sIW3KnUX7fGPaflwlCCskgrt1GsidVT-KG4,41474
23
- egglog/exp/array_api_jit.py,sha256=HIZzd0G17u-u_F4vfRdhoYvRo-ETx5HFO3RBcOfLcco,1287
24
- egglog/exp/array_api_numba.py,sha256=OjONBLdFRukx4vKiNK_rBxjMzsxbWpMEdD7JcGHJjmY,2924
25
- egglog/exp/array_api_program_gen.py,sha256=crgUYXXNhQdfTq31FSIpWLIfzNsgQD8ngg3OosCtIgg,19680
26
- egglog/exp/program_gen.py,sha256=2qlfc-dVSNbPFQVl0eIzUzf-yw28AeaARa4PUC1xtRA,12257
27
- egglog/exp/siu_examples.py,sha256=KZmpkSCgbL4uqHhx2Jh9Adz1_cDbkIlyXPa1Kh_0O_8,784
28
- egglog/exp/__init__.py,sha256=G9zeKUcPBgIhgUg1meC86OfZVFETYIugyHWseTcCe_0,52
29
- egglog/graphviz_widget.py,sha256=YtI7LCFWHihDQ1qLvdj2SVYEcuZLSooFUYheunOTxdc,1339
30
- egglog/ipython_magic.py,sha256=VA19xAb6Sz7-IxlJBbnZW_gVFDqaYNnvdMB9QitndjE,1254
31
- egglog/pretty.py,sha256=s5XBIB7kMrxV25aO-F4NW5Jli2DOoc72wwswFYxJPjM,19561
32
- egglog/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
- egglog/runtime.py,sha256=s32xdoD_mIdDRi_PJQ5E_kSNyhUkT310osH38kZfCSk,23174
34
- egglog/thunk.py,sha256=bm1zZUzwey0DijtMZkSulyfiWjCAg_1UmXaSG8qvvjs,2170
35
- egglog/type_constraint_solver.py,sha256=MW22gwryNOqsYaB__dCCjVvdnB1Km5fovoW2IgUXaVo,5836
36
- egglog/widget.css,sha256=WJS2M1wQdujhSTCakMa_ZXuoTPre1Uy1lPcvBE1LZQU,102
37
- egglog/widget.js,sha256=UNOER3sYZ-bS7Qhw9S6qtpR81FuHa5DzXQaWWtQq334,2021
38
- egglog/__init__.py,sha256=iUrVe5fb0XFyMCS3CwTjwhKEtU8KpIkdTpJpnUhm8o0,247
39
- egglog/bindings.cp312-win_amd64.pyd,sha256=fYGMMgJx6iehBvLFrjqCRropokuwQPKBMcs5E4dSxG4,4620288
40
- egglog-7.2.0.dist-info/RECORD,,