egglog 7.1.0__cp310-none-win_amd64.whl → 8.0.0__cp310-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.1.0
3
+ Version: 8.0.0
4
4
  Classifier: Environment :: MacOS X
5
5
  Classifier: Environment :: Win32 (MS Windows)
6
6
  Classifier: Intended Audience :: Developers
@@ -19,34 +19,35 @@ Classifier: Typing :: Typed
19
19
  Requires-Dist: typing-extensions
20
20
  Requires-Dist: black
21
21
  Requires-Dist: graphviz
22
- Requires-Dist: scikit-learn; extra == 'array'
23
- Requires-Dist: array_api_compat; extra == 'array'
24
- Requires-Dist: numba==0.59.1; extra == 'array'
25
- Requires-Dist: llvmlite==0.42.0; extra == 'array'
26
- Requires-Dist: pre-commit; extra == 'dev'
27
- Requires-Dist: ruff; extra == 'dev'
28
- Requires-Dist: mypy; extra == 'dev'
29
- Requires-Dist: anywidget[dev]; extra == 'dev'
30
- Requires-Dist: egglog[docs,test]; extra == 'dev'
31
- Requires-Dist: pytest; extra == 'test'
32
- Requires-Dist: mypy; extra == 'test'
33
- Requires-Dist: syrupy; extra == 'test'
34
- Requires-Dist: egglog[array]; extra == 'test'
35
- Requires-Dist: pytest-codspeed; extra == 'test'
36
- Requires-Dist: pytest-benchmark; extra == 'test'
37
- Requires-Dist: pytest-xdist; extra == 'test'
38
- Requires-Dist: pydata-sphinx-theme; extra == 'docs'
39
- Requires-Dist: myst-nb; extra == 'docs'
40
- Requires-Dist: sphinx-autodoc-typehints; extra == 'docs'
41
- Requires-Dist: sphinx-gallery; extra == 'docs'
42
- Requires-Dist: nbconvert; extra == 'docs'
43
- Requires-Dist: matplotlib; extra == 'docs'
44
- Requires-Dist: anywidget; extra == 'docs'
45
- Requires-Dist: seaborn; extra == 'docs'
46
- Requires-Dist: egglog[array]; extra == 'docs'
47
- Requires-Dist: line-profiler; extra == 'docs'
48
- Requires-Dist: sphinxcontrib-mermaid; extra == 'docs'
49
- Requires-Dist: ablog; extra == 'docs'
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: pre-commit ; extra == 'dev'
28
+ Requires-Dist: ruff ; 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'
50
51
  Provides-Extra: array
51
52
  Provides-Extra: dev
52
53
  Provides-Extra: test
@@ -0,0 +1,42 @@
1
+ egglog-8.0.0.dist-info/METADATA,sha256=eh-TWX0GzeUHB9G_aqlqRChViH29Czcv5D99LuDD4kQ,3884
2
+ egglog-8.0.0.dist-info/WHEEL,sha256=g5HWqh_ET1t00jeNp7yG4_MnCmGwbeYGzUw6BhdEuM0,95
3
+ egglog-8.0.0.dist-info/licenses/LICENSE,sha256=TfaboMVZ81Q6OUaKjU7z6uVjSlcGKclLYcOpgDbm9_s,1091
4
+ egglog/bindings.pyi,sha256=n48ha4m7lm2rRr7dbotGjH4rY5tNPrd3yrVzS9oN1ys,12749
5
+ egglog/builtins.py,sha256=W42Zj8uuOiG8rGMvu1U20rIbWDGPkHHeU3qDlg9cQnU,14883
6
+ egglog/config.py,sha256=mALVaxh7zmGrbuyzaVKVmYKcu1lF703QsKJw8AF7gSM,176
7
+ egglog/conversion.py,sha256=vvxT8GBT5yaczV7GXtClBQ9xx2C-ytpSpCnmZDChDTM,7077
8
+ egglog/declarations.py,sha256=-wTiWYbbIvOkpKLy33j4_iOhyaOnWm5zcUk55CmfIZw,21288
9
+ egglog/egraph.py,sha256=ZkrSTFJeCUFsjCNTZS4syAtQeVCcj8qiXX1VaYslmCM,71283
10
+ egglog/egraph_state.py,sha256=Cc6ScY8Xv50HJmAcydQzDVzYe8th21vs9QqL2vpjrqE,25495
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=9SPJnTuMErxxuS-1GvV9GgfBP3X5wPnmhD3_h9SvAsY,1180
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=ytqyeIspq_hdhvcdOGSR2cOTIokLtqBiomd12lCKmBU,47615
23
+ egglog/exp/array_api_jit.py,sha256=4NWEzGDRCebzKGJgXqZoctnFAs899PE0e4kZQqFHrlE,1181
24
+ egglog/exp/array_api_loopnest.py,sha256=lLL9MsN6_lQzpLI1wMFbVchQzk59fn-EWU9B06Q2i9g,4305
25
+ egglog/exp/array_api_numba.py,sha256=SDYRVV45lM4tgwIbmPmOG4GIy8o4AKsUeqLqbGKolAw,2917
26
+ egglog/exp/array_api_program_gen.py,sha256=FWZW_4FZkv_lbhEkuuQpogGu89cE9TJ6uRKYXhfLz40,21271
27
+ egglog/exp/program_gen.py,sha256=2qlfc-dVSNbPFQVl0eIzUzf-yw28AeaARa4PUC1xtRA,12257
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=VA19xAb6Sz7-IxlJBbnZW_gVFDqaYNnvdMB9QitndjE,1254
32
+ egglog/pretty.py,sha256=MiNonL4_vublshR8R88534KuAxEU983QFEPkOXM7mog,21356
33
+ egglog/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
+ egglog/runtime.py,sha256=L3h5g4e4LUzG-psewYmtDNmPkXfbZuZBJGgAJ4RNl6g,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=GVlEStdXjr1VljSajLHE59Ye1gvplHIFzCQknnVL3T0,257654
38
+ egglog/visualizer.js,sha256=6ohS5ZbaZLYpQ42Fu7DTSHsXoCRmgwtQe5lk0PdxPhY,3788251
39
+ egglog/visualizer_widget.py,sha256=6oFfG-mHEeeh3dzng4hjU30dNI86bKEnSXismmlJTwc,1362
40
+ egglog/__init__.py,sha256=iUrVe5fb0XFyMCS3CwTjwhKEtU8KpIkdTpJpnUhm8o0,247
41
+ egglog/bindings.cp310-win_amd64.pyd,sha256=9w_inf-8h95GDxA4uCRLFfxk5B8X3xi-g-nVGHsgGZs,4966400
42
+ egglog-8.0.0.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: cp310-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,39 +0,0 @@
1
- egglog-7.1.0.dist-info/METADATA,sha256=t8YGDTCeCIpcJMDrAiicXrJAARElS-vM1R6-GY4wNzE,3829
2
- egglog-7.1.0.dist-info/WHEEL,sha256=keLBtIOE7ZgLyd8Cijw37iqv72a2jhfxMdDu8Unr7zo,96
3
- egglog-7.1.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=LFClid1ojrQFF7ezJSanwZA89j01fjJ-NkvH0VUH0Wk,16199
9
- egglog/egraph.py,sha256=WRu_omk-5i53wokpkSTw9wA2EqW_WI2-ZX8340_w3q8,66198
10
- egglog/egraph_state.py,sha256=ic6MEL41-DjozBCe-GSKqHM2vkabuC865odeg_zT964,20074
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/lambda_.py,sha256=hQBOaSw_yorNcbkQVu2EhgSc0IZNWIny7asaOlcUk9s,8496
15
- egglog/examples/matrix.py,sha256=_zmjgfFr2O_LjTcsTD-45_38Y_M1sP3AV39K6oFxAdw,5136
16
- egglog/examples/ndarrays.py,sha256=T-wwef-n-3LDSjaO35zA8AZH5DXFFqq0XBSCQKEXV6E,4186
17
- egglog/examples/README.rst,sha256=QrbfmivODBvUvmY3-dHarcbC6bEvwoqAfTDhiI-aJxU,237
18
- egglog/examples/resolution.py,sha256=sKkbRI_v9XkQM0DriacKLINqKKDqYGFhvMCAS9tZbTA,2203
19
- egglog/examples/schedule_demo.py,sha256=iJtIbcLaZ7zK8UalY0z7KAKMqYjQx0MKTsNF24lKtik,652
20
- egglog/examples/__init__.py,sha256=KuhaJFOyz_rpUvEqZubsgLnv6rhQNE_AVFXA6bUnpdY,34
21
- egglog/exp/array_api.py,sha256=diQNK-Uxxt6Qr58zJuQDM_BF6eKgwa-D5eYB5VJoT70,41412
22
- egglog/exp/array_api_jit.py,sha256=HIZzd0G17u-u_F4vfRdhoYvRo-ETx5HFO3RBcOfLcco,1287
23
- egglog/exp/array_api_numba.py,sha256=OjONBLdFRukx4vKiNK_rBxjMzsxbWpMEdD7JcGHJjmY,2924
24
- egglog/exp/array_api_program_gen.py,sha256=crgUYXXNhQdfTq31FSIpWLIfzNsgQD8ngg3OosCtIgg,19680
25
- egglog/exp/program_gen.py,sha256=2qlfc-dVSNbPFQVl0eIzUzf-yw28AeaARa4PUC1xtRA,12257
26
- egglog/exp/siu_examples.py,sha256=KZmpkSCgbL4uqHhx2Jh9Adz1_cDbkIlyXPa1Kh_0O_8,784
27
- egglog/exp/__init__.py,sha256=G9zeKUcPBgIhgUg1meC86OfZVFETYIugyHWseTcCe_0,52
28
- egglog/graphviz_widget.py,sha256=YtI7LCFWHihDQ1qLvdj2SVYEcuZLSooFUYheunOTxdc,1339
29
- egglog/ipython_magic.py,sha256=VA19xAb6Sz7-IxlJBbnZW_gVFDqaYNnvdMB9QitndjE,1254
30
- egglog/pretty.py,sha256=4YzItMaXSQw2xzId9pnjUikOojwE6G7Hg0_M4sOGJ84,19071
31
- egglog/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
- egglog/runtime.py,sha256=P5wKThFglf2l5AynxgVAryyNjvLtFMbou7JCSSsORno,23013
33
- egglog/thunk.py,sha256=jYMb4owraT-3zGQEYkqMK76hk39Qdpc6bfEa7CVkjcg,1894
34
- egglog/type_constraint_solver.py,sha256=0c8oy-sLCVN0XndfAyRxO1AvIgfQuszw0NaRJ9ILysE,5692
35
- egglog/widget.css,sha256=WJS2M1wQdujhSTCakMa_ZXuoTPre1Uy1lPcvBE1LZQU,102
36
- egglog/widget.js,sha256=UNOER3sYZ-bS7Qhw9S6qtpR81FuHa5DzXQaWWtQq334,2021
37
- egglog/__init__.py,sha256=iUrVe5fb0XFyMCS3CwTjwhKEtU8KpIkdTpJpnUhm8o0,247
38
- egglog/bindings.cp310-win_amd64.pyd,sha256=pjYXlaSXtC50TWNdnGwLjKbntZ0WqfM5AR9hqehz2xc,4591104
39
- egglog-7.1.0.dist-info/RECORD,,