munchboka-edutools 0.1.13__py3-none-any.whl → 0.1.14__py3-none-any.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 munchboka-edutools might be problematic. Click here for more details.
- munchboka_edutools/_version.py +1 -1
- munchboka_edutools/directives/plot.py +9 -3
- {munchboka_edutools-0.1.13.dist-info → munchboka_edutools-0.1.14.dist-info}/METADATA +1 -1
- {munchboka_edutools-0.1.13.dist-info → munchboka_edutools-0.1.14.dist-info}/RECORD +6 -6
- {munchboka_edutools-0.1.13.dist-info → munchboka_edutools-0.1.14.dist-info}/WHEEL +0 -0
- {munchboka_edutools-0.1.13.dist-info → munchboka_edutools-0.1.14.dist-info}/licenses/LICENSE +0 -0
munchboka_edutools/_version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
__all__ = ["__version__"]
|
|
2
|
-
__version__ = "0.1.
|
|
2
|
+
__version__ = "0.1.14"
|
|
@@ -885,17 +885,21 @@ class PlotDirective(SphinxDirective):
|
|
|
885
885
|
except Exception:
|
|
886
886
|
pass
|
|
887
887
|
else:
|
|
888
|
-
# Support dynamic evaluation referencing previously defined function labels, e.g.
|
|
888
|
+
# Support dynamic evaluation referencing previously defined function labels, e.g.
|
|
889
|
+
# (5, f(5)) or (2 - sqrt(2), f(2 - sqrt(2))).
|
|
889
890
|
# Simple pattern match for a parenthesized pair allowing arbitrary (non-comma) inner expressions.
|
|
890
891
|
ps = str(p).strip()
|
|
891
892
|
m_pair = re.match(r"^\(\s*([^,]+?)\s*,\s*([^,]+?)\s*\)$", ps)
|
|
892
893
|
if m_pair:
|
|
893
894
|
x_raw = m_pair.group(1).strip()
|
|
894
895
|
y_raw = m_pair.group(2).strip()
|
|
896
|
+
# Evaluate x and y as full expressions first; this already
|
|
897
|
+
# supports f(2 - sqrt(2)) via _eval_expr.
|
|
895
898
|
try:
|
|
896
899
|
x_val = _eval_expr(x_raw)
|
|
897
900
|
except Exception:
|
|
898
|
-
# If x itself references a function call label(arg)
|
|
901
|
+
# If x itself references a function call label(arg),
|
|
902
|
+
# fall back to a simple numeric-argument pattern.
|
|
899
903
|
m_fx = re.match(
|
|
900
904
|
r"^([A-Za-z_][A-Za-z0-9_]*)\(\s*([+-]?(?:\d+(?:\.\d+)?))\s*\)$",
|
|
901
905
|
x_raw,
|
|
@@ -910,7 +914,9 @@ class PlotDirective(SphinxDirective):
|
|
|
910
914
|
continue # give up on this point
|
|
911
915
|
else:
|
|
912
916
|
continue
|
|
913
|
-
|
|
917
|
+
|
|
918
|
+
# y may be a direct expression or a function label call
|
|
919
|
+
# like f(2 - sqrt(2)). Try full expression evaluation first.
|
|
914
920
|
try:
|
|
915
921
|
y_val = _eval_expr(y_raw)
|
|
916
922
|
except Exception:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: munchboka-edutools
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.14
|
|
4
4
|
Summary: Sphinx/Jupyter Book directives and assets for Munchboka and VGS books
|
|
5
5
|
Project-URL: Homepage, https://github.com/reneaas/munchboka-edutools
|
|
6
6
|
Project-URL: Issues, https://github.com/reneaas/munchboka-edutools/issues
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
munchboka_edutools/__init__.py,sha256=fgHZaxSDzU7Didm5UN2_H2-ZYZIUowU8MJaRYxNmKNA,7380
|
|
2
2
|
munchboka_edutools/_plotmath_shim.py,sha256=kWZV-SO4idGHCVdBcfQmrhFF9DEgxPY5Xg8d1h1Bb6c,3348
|
|
3
|
-
munchboka_edutools/_version.py,sha256=
|
|
3
|
+
munchboka_edutools/_version.py,sha256=N9x0dPNNIgG8onJijVEeDulgDj_3QJTk0cksf5Vs5IA,49
|
|
4
4
|
munchboka_edutools/directives/__init__.py,sha256=wxsmI7Wt_Rpft925y9BmU7urgKhGNlpqnzN2cFbCtoI,83
|
|
5
5
|
munchboka_edutools/directives/admonitions.py,sha256=yJB5F1Wlu_AZdiWQWFR7ArBO0OFE5bsx3DirLV_ujaw,10226
|
|
6
6
|
munchboka_edutools/directives/cas_popup.py,sha256=WED8V1DT55sqYRr_CpgbkanadXRkNmddeW9KSw11IKA,9113
|
|
@@ -17,7 +17,7 @@ munchboka_edutools/directives/jeopardy.py,sha256=FoYvyuGbRXpF8KjjKJ-FUzonvPpqm3v
|
|
|
17
17
|
munchboka_edutools/directives/multi_plot.py,sha256=q2ocaAWzf_ZnDcUi3vKAEt_M_d7zNTEJwveyHrEK5mc,42739
|
|
18
18
|
munchboka_edutools/directives/pair_puzzle.py,sha256=8x6RXVT7I3EcEZEX2TJxPJxOIkwdhd-YPh_DnoKQarI,5277
|
|
19
19
|
munchboka_edutools/directives/parsons.py,sha256=fpKcbyiHcJQlYsiMBaHKAy5vJ0eCUMUVV8h1clb5s7A,3384
|
|
20
|
-
munchboka_edutools/directives/plot.py,sha256=
|
|
20
|
+
munchboka_edutools/directives/plot.py,sha256=oYnTUI5sbUn-A4pfYwBbd-TKif78l3i27NHXl6MhUok,132446
|
|
21
21
|
munchboka_edutools/directives/poly_icon.py,sha256=hT0NUrgkcYqcHk4_lKGiqam4RT6LXTarTim08j4BsJc,3558
|
|
22
22
|
munchboka_edutools/directives/polydiv.py,sha256=vd8rwNqpn6_Wu52P7_LAGRhL36hufFB1aRskuxEiko4,11735
|
|
23
23
|
munchboka_edutools/directives/popup.py,sha256=Nni7uxmXD4YguC7L-tgiowkDNsXZ8S_XlKGU-LRroCY,8072
|
|
@@ -143,7 +143,7 @@ munchboka_edutools/static/js/skulpt/skulpt.js,sha256=xzS8AVz4mGi2v4lytAEeH0tm7Ip
|
|
|
143
143
|
munchboka_edutools/static/js/timedQuiz/multipleChoiceQuestion.js,sha256=OleHi24leM3Ejc2dvHYSwQGarIA_ZoqjtA3WrPvaX8s,6571
|
|
144
144
|
munchboka_edutools/static/js/timedQuiz/timedMultipleChoiceQuiz.js,sha256=TFKnF80ZsnYbzdSKuOsKcHfEg1ZiUok9vgraOTFE5gM,9030
|
|
145
145
|
munchboka_edutools/static/js/timedQuiz/utils.js,sha256=CvlHVW3Uq-DQapRRuMC61q785GN5NZX5VmZj0zeP2hE,195
|
|
146
|
-
munchboka_edutools-0.1.
|
|
147
|
-
munchboka_edutools-0.1.
|
|
148
|
-
munchboka_edutools-0.1.
|
|
149
|
-
munchboka_edutools-0.1.
|
|
146
|
+
munchboka_edutools-0.1.14.dist-info/METADATA,sha256=qGTN1DDlkbi3jsEsorMheTP96cmc6Nf8n8TMn8zQKGs,3270
|
|
147
|
+
munchboka_edutools-0.1.14.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
148
|
+
munchboka_edutools-0.1.14.dist-info/licenses/LICENSE,sha256=7nP4mEfu9fXD-OFxavvJyiudI9LGiEvLk9a0ucEZ6NE,1079
|
|
149
|
+
munchboka_edutools-0.1.14.dist-info/RECORD,,
|
|
File without changes
|
{munchboka_edutools-0.1.13.dist-info → munchboka_edutools-0.1.14.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|