plot3 0.8.0__tar.gz → 0.8.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.
- {plot3-0.8.0 → plot3-0.8.1}/PKG-INFO +2 -2
- plot3-0.8.1/plot3/__version__.py +1 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/masking.py +14 -14
- {plot3-0.8.0 → plot3-0.8.1}/plot3.egg-info/PKG-INFO +2 -2
- {plot3-0.8.0 → plot3-0.8.1}/plot3.egg-info/requires.txt +1 -1
- {plot3-0.8.0 → plot3-0.8.1}/pyproject.toml +1 -1
- plot3-0.8.0/plot3/__version__.py +0 -1
- {plot3-0.8.0 → plot3-0.8.1}/LICENSE +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/README.md +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/__init__.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/aesexpr.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/build.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/calculus.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/compose.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/contour.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/craft.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/encode.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/expr.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/flip.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/function.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/geoms.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/ggplot.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/io.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/jupyter.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/kde.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/latexin.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/mathtext.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/payload.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/remote.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/scales.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/scaling.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/special.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/stat2d.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/static.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/stats3d.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/table.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/themes.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3/viewer.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3.egg-info/SOURCES.txt +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3.egg-info/dependency_links.txt +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/plot3.egg-info/top_level.txt +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/setup.cfg +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_2d_density.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_3d.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_animation.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_annotate.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_api_public.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_array_backend.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_arrow.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_build_contract.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_contour.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_everyday_ggplot2.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_expr.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_facets_compose.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_fast_paths.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_geom_function.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_geoms_ds.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_ggplot2_extras2.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_ggplot2_parity.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_ggplot_extras.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_grammar.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_latex_input.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_lidar_scene.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_masking.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_math_layers.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_mathtext.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_payload.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_payload_display.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_point_cloud.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_r_oracle_parity.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_readme.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_remote_bridge.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_review_fixes.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_save_menu.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_scales_api.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_scales_themes.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_special.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_stat2d.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_static_save.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_stats_semantic.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_step3_geoms.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_table_backends.py +0 -0
- {plot3-0.8.0 → plot3-0.8.1}/tests/test_titles_theme.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: plot3
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.1
|
|
4
4
|
Summary: ggplot2 grammar of graphics for Python: interactive WebGL figures and journal-ready PNG, SVG, and PDF
|
|
5
5
|
Author: Rigoberto Leyva Salmeron
|
|
6
6
|
License-Expression: MIT
|
|
@@ -17,7 +17,7 @@ Description-Content-Type: text/markdown
|
|
|
17
17
|
License-File: LICENSE
|
|
18
18
|
Requires-Dist: numpy>=1.24
|
|
19
19
|
Requires-Dist: pandas>=2.0
|
|
20
|
-
Requires-Dist:
|
|
20
|
+
Requires-Dist: tidy3syntax<0.2,>=0.1
|
|
21
21
|
Provides-Extra: pdf
|
|
22
22
|
Requires-Dist: cairosvg>=2.7; extra == "pdf"
|
|
23
23
|
Provides-Extra: dev
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.8.1"
|
|
@@ -36,9 +36,9 @@ import re
|
|
|
36
36
|
import tokenize
|
|
37
37
|
from typing import Any, Iterable
|
|
38
38
|
|
|
39
|
-
import
|
|
40
|
-
from
|
|
41
|
-
from
|
|
39
|
+
import tidy3syntax
|
|
40
|
+
from tidy3syntax import repairs
|
|
41
|
+
from tidy3syntax.scanner import Spans, apply
|
|
42
42
|
|
|
43
43
|
# Sentinels (plot3 own + tidy3 compatibility).
|
|
44
44
|
BT_NAME = "__plot3_bt__"
|
|
@@ -116,11 +116,11 @@ _FORMULA_CALLS = frozenset({"geom_function", "geom_vector_field"})
|
|
|
116
116
|
_FACETS = frozenset({"facet_wrap", "facet_grid"})
|
|
117
117
|
|
|
118
118
|
# plot3's part of the notebook syntax tidy3, tidy3a, plot3 and stats3 share
|
|
119
|
-
# (
|
|
119
|
+
# (tidy3syntax). ``drv ~ cyl`` and ``~`my col``` are not Python, so they are
|
|
120
120
|
# quoted in any facet call; ``^`` in geom_function (XOR in Python) and ``~cyl``
|
|
121
121
|
# in a facet (bitwise not) are valid Python, so they are rewritten only where
|
|
122
122
|
# the call is plot3's: a notebook's own geom_function keeps XOR.
|
|
123
|
-
DIALECT =
|
|
123
|
+
DIALECT = tidy3syntax.Dialect(
|
|
124
124
|
"plot3",
|
|
125
125
|
formula_calls=_FACETS,
|
|
126
126
|
formula_keywords={"facets"},
|
|
@@ -147,13 +147,13 @@ def _session_namespace(namespace: Any) -> dict[str, Any] | None:
|
|
|
147
147
|
|
|
148
148
|
|
|
149
149
|
def _plot3_bt(source: str) -> str:
|
|
150
|
-
"""
|
|
151
|
-
if
|
|
150
|
+
"""tidy3syntax's ``__r_name__`` placeholder as plot3's ``__plot3_bt__``, outside strings and comments."""
|
|
151
|
+
if tidy3syntax.NAME not in source:
|
|
152
152
|
return source
|
|
153
153
|
spans = Spans.of(source)
|
|
154
154
|
edits = [
|
|
155
155
|
(m.start(), m.end(), BT_NAME)
|
|
156
|
-
for m in re.finditer(re.escape(
|
|
156
|
+
for m in re.finditer(re.escape(tidy3syntax.NAME) + r"(?=\s*\()", source)
|
|
157
157
|
if m.start() in spans
|
|
158
158
|
]
|
|
159
159
|
return apply(source, edits)
|
|
@@ -178,7 +178,7 @@ def rewrite_facet_formulas(source: str, *, unary: str = "owned", namespace: Any
|
|
|
178
178
|
source = repairs.quote_formulas(source, [DIALECT])
|
|
179
179
|
if unary == "never":
|
|
180
180
|
return source
|
|
181
|
-
return
|
|
181
|
+
return tidy3syntax.reinterpret(source, [_FACETS_ONLY], _session_namespace(namespace))
|
|
182
182
|
|
|
183
183
|
|
|
184
184
|
def rewrite_formulas(source: str, namespace: Any = _SESSION) -> str:
|
|
@@ -188,7 +188,7 @@ def rewrite_formulas(source: str, namespace: Any = _SESSION) -> str:
|
|
|
188
188
|
``drv ~ cyl`` is quoted first, since the cell must parse before the
|
|
189
189
|
ownership of ``geom_function`` and ``facet_wrap`` can be read."""
|
|
190
190
|
source = repairs.quote_formulas(source, [DIALECT])
|
|
191
|
-
return
|
|
191
|
+
return tidy3syntax.reinterpret(source, [DIALECT], _session_namespace(namespace))
|
|
192
192
|
|
|
193
193
|
|
|
194
194
|
def rewrite_formula_carets(source: str, namespace: Any = _SESSION) -> str:
|
|
@@ -199,7 +199,7 @@ def rewrite_formula_carets(source: str, namespace: Any = _SESSION) -> str:
|
|
|
199
199
|
``geom_function`` is rewritten: in a notebook's own function of that
|
|
200
200
|
name, ``^`` stays XOR.
|
|
201
201
|
"""
|
|
202
|
-
return
|
|
202
|
+
return tidy3syntax.reinterpret(source, [_POWER_ONLY], _session_namespace(namespace))
|
|
203
203
|
|
|
204
204
|
|
|
205
205
|
def rewrite_backticks(source: str, namespace: Any = _SESSION) -> str:
|
|
@@ -211,7 +211,7 @@ def rewrite_backticks(source: str, namespace: Any = _SESSION) -> str:
|
|
|
211
211
|
not Python goes first, so the cell parses when the ownership of
|
|
212
212
|
``geom_function`` and ``facet_wrap`` is read.
|
|
213
213
|
"""
|
|
214
|
-
return
|
|
214
|
+
return tidy3syntax.reinterpret(_repair(source), [DIALECT], _session_namespace(namespace))
|
|
215
215
|
|
|
216
216
|
|
|
217
217
|
def _parse_dedented(source: str) -> tuple[ast.Module, list[int]] | None:
|
|
@@ -339,7 +339,7 @@ def join_layer_lines(source: str, namespace: Any = _SESSION) -> str | None:
|
|
|
339
339
|
if not logical:
|
|
340
340
|
return None
|
|
341
341
|
parsed = _parse_dedented(_repair(source))
|
|
342
|
-
owners =
|
|
342
|
+
owners = tidy3syntax.Owners(parsed[0], _session_namespace(namespace), [DIALECT]) if parsed is not None else None
|
|
343
343
|
|
|
344
344
|
def plot3_name(name: str, row: int) -> bool:
|
|
345
345
|
return owners is not None and DIALECT.owns_module(owners.module(name, (row, 0)))
|
|
@@ -359,7 +359,7 @@ def join_layer_lines(source: str, namespace: Any = _SESSION) -> str | None:
|
|
|
359
359
|
if bound:
|
|
360
360
|
return bound[-1] is None or DIALECT.owns_module(bound[-1])
|
|
361
361
|
if owners.context is not None and name in owners.context:
|
|
362
|
-
return DIALECT.owns_module(
|
|
362
|
+
return DIALECT.owns_module(tidy3syntax.module_of(owners.context[name]))
|
|
363
363
|
return True
|
|
364
364
|
|
|
365
365
|
def may_join(tokens: list[tokenize.TokenInfo], head: list[tokenize.TokenInfo]) -> bool:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: plot3
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.1
|
|
4
4
|
Summary: ggplot2 grammar of graphics for Python: interactive WebGL figures and journal-ready PNG, SVG, and PDF
|
|
5
5
|
Author: Rigoberto Leyva Salmeron
|
|
6
6
|
License-Expression: MIT
|
|
@@ -17,7 +17,7 @@ Description-Content-Type: text/markdown
|
|
|
17
17
|
License-File: LICENSE
|
|
18
18
|
Requires-Dist: numpy>=1.24
|
|
19
19
|
Requires-Dist: pandas>=2.0
|
|
20
|
-
Requires-Dist:
|
|
20
|
+
Requires-Dist: tidy3syntax<0.2,>=0.1
|
|
21
21
|
Provides-Extra: pdf
|
|
22
22
|
Requires-Dist: cairosvg>=2.7; extra == "pdf"
|
|
23
23
|
Provides-Extra: dev
|
|
@@ -24,7 +24,7 @@ dependencies = [
|
|
|
24
24
|
"pandas>=2.0",
|
|
25
25
|
# The notebook syntax tidy3, tidy3a, plot3 and stats3 share (facet
|
|
26
26
|
# formulas, ^ in geom_function, backtick names). Standard library only.
|
|
27
|
-
"
|
|
27
|
+
"tidy3syntax>=0.1,<0.2",
|
|
28
28
|
]
|
|
29
29
|
|
|
30
30
|
[project.optional-dependencies]
|
plot3-0.8.0/plot3/__version__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.8.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|