Closed jdemeyer closed 6 years ago
I'll wait for a decision on https://github.com/jupyter-widgets/ipywidgets/pull/1398
Description changed:
---
+++
@@ -1,5 +1,5 @@
Currently in alpha.
Tarballs:
-- https://pypi.python.org/packages/f2/e3/783bfbe496a209471719bf1623b3ddae6bedc8debb62aa699bb67df96035/ipywidgets-7.0.0a4.tar.gz
-- https://pypi.python.org/packages/45/a8/a86e01400a196317bcfcf185db1418fcf95c22a98dd2abf81c8f5a0498c5/widgetsnbextension-3.0.0a7.tar.gz
+- https://pypi.python.org/packages/62/bb/837f6b12b432adcd41e2082b9522d133af948ce2ca446784599a7199436c/ipywidgets-7.0.0a8.tar.gz
+- https://pypi.python.org/packages/58/94/f545b0c01d23ec2cb934571a580d9fc121986c7c983df350f97981576abd/widgetsnbextension-3.0.0a11.tar.gz
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
caf5433 | Upgrade to ipywidgets 7 |
Looking at adopting this in sage-on-gentoo but even with current patch here I get test failures:
sage -t --long --warn-long 89.5 /usr/lib64/python2.7/site-packages/sage/interacts/test_jupyter.rst
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interacts/test_jupyter.rst", line 40, in sage.interacts.test_jupyter
Failed example:
test(interacts.algebra.polar_prime_spiral) # long time
Expected:
Interactive function <function polar_prime_spiral at ...> with 6 widgets
interval: IntRangeSlider(value=(1, 1000), min=1, max=4000, step=10, description=u'range')
show_factors: Checkbox(value=True, description=u'show_factors')
highlight_primes: Checkbox(value=True, description=u'highlight_primes')
show_curves: Checkbox(value=True, description=u'show_curves')
n: IntSlider(value=89, min=1, max=200, step=1, description=u'number $n$')
dpi: IntSlider(value=100, min=10, max=300, step=10, description=u'dpi')
<h2>Polar Prime Spiral</h2> <div style="white-space: normal;"> For more information about the factors in the spiral, visit <a href="http://www.dcs.gla.ac.uk/~jhw/spirals/index.html" target="_blank"> Number Spirals by John Williamson</a>.</div>
<script type="math/tex">n = 89</script>
Pink Curve: <script type="math/tex">n^2 + 8.0</script>
Green Curve: <script type="math/tex">n^2 + n + -1.0</script>
Got:
Interactive function <function polar_prime_spiral at 0x7f143bb760c8> with 6 widgets
interval: IntRangeSlider(value=(1, 1000), description=u'range', max=4000, min=1, step=10)
show_factors: Checkbox(value=True, description=u'show_factors')
highlight_primes: Checkbox(value=True, description=u'highlight_primes')
show_curves: Checkbox(value=True, description=u'show_curves')
n: IntSlider(value=89, description=u'number $n$', max=200, min=1)
dpi: IntSlider(value=100, description=u'dpi', max=300, min=10, step=10)
<h2>Polar Prime Spiral</h2> <div style="white-space: normal;"> For more information about the factors in the spiral, visit <a href="http://www.dcs.gla.ac.uk/~jhw/spirals/index.html" target="_blank"> Number Spirals by John Williamson</a>.</div>
<script type="math/tex">n = 89</script>
Pink Curve: <script type="math/tex">n^2 + 8.0</script>
Green Curve: <script type="math/tex">n^2 + n + -1.0</script>
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interacts/test_jupyter.rst", line 53, in sage.interacts.test_jupyter
Failed example:
test(interacts.calculus.taylor_polynomial)
Expected:
Interactive function <function taylor_polynomial at ...> with 3 widgets
title: HTMLText(value=u'<h2>Taylor polynomial</h2>')
f: EvalText(value=u'e^(-x)*sin(x)', description=u'$f(x)=$')
order: SelectionSlider(value=1, options=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], description=u'order')
<script type="math/tex">f(x)\;=\;e^{\left(-x\right)} \sin\left(x\right)</script>
<script type="math/tex">\hat{f}(x;0)\;=\;x+\mathcal{O}(x^{2})</script>
Got:
Interactive function <function taylor_polynomial at 0x7f143bc09c08> with 3 widgets
title: HTMLText(value=u'<h2>Taylor polynomial</h2>')
f: EvalText(value=u'e^(-x)*sin(x)', description=u'$f(x)=$', layout=Layout(max_width=u'81em'))
order: SelectionSlider(description=u'order', options=(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), value=1)
<script type="math/tex">f(x)\;=\;e^{\left(-x\right)} \sin\left(x\right)</script>
<script type="math/tex">\hat{f}(x;0)\;=\;x+\mathcal{O}(x^{2})</script>
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interacts/test_jupyter.rst", line 61, in sage.interacts.test_jupyter
Failed example:
test(interacts.calculus.definite_integral)
Expected:
Interactive function <function definite_integral at ...> with 6 widgets
title: HTMLText(value=u'<h2>Definite integral</h2>')
f: EvalText(value=u'3*x', description=u'$f(x)=$')
g: EvalText(value=u'x^2', description=u'$g(x)=$')
interval: IntRangeSlider(value=(0, 3), min=-10, max=10, step=1, description=u'Interval')
x_range: IntRangeSlider(value=(0, 3), min=-10, max=10, step=1, description=u'plot range (x)')
selection: Dropdown(value='f and g', options=['f', 'g', 'f and g', 'f - g'], description=u'Select')
<script type="math/tex">\int_{0.00}^{3.00}(\color{Blue}{f(x)})\,\mathrm{d}x=\int_{0.00}^{3.00}(3 \, x)\,\mathrm{d}x=13.50</script><br/><script type="math/tex">\int_{0.00}^{3.00}(\color{Green}{g(x)})\,\mathrm{d}x=\int_{0.00}^{3.00}(x^{2})\,\mathrm{d}x=9.00</script>
Got:
Interactive function <function definite_integral at 0x7f143bc2b1b8> with 6 widgets
title: HTMLText(value=u'<h2>Definite integral</h2>')
f: EvalText(value=u'3*x', description=u'$f(x)=$', layout=Layout(max_width=u'81em'))
g: EvalText(value=u'x^2', description=u'$g(x)=$', layout=Layout(max_width=u'81em'))
interval: IntRangeSlider(value=(0, 3), description=u'Interval', max=10, min=-10)
x_range: IntRangeSlider(value=(0, 3), description=u'plot range (x)', max=10, min=-10)
selection: Dropdown(description=u'Select', index=2, options=('f', 'g', 'f and g', 'f - g'), value='f and g')
<script type="math/tex">\int_{0.00}^{3.00}(\color{Blue}{f(x)})\,\mathrm{d}x=\int_{0.00}^{3.00}(3 \, x)\,\mathrm{d}x=13.50</script><br/><script type="math/tex">\int_{0.00}^{3.00}(\color{Green}{g(x)})\,\mathrm{d}x=\int_{0.00}^{3.00}(x^{2})\,\mathrm{d}x=9.00</script>
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interacts/test_jupyter.rst", line 71, in sage.interacts.test_jupyter
Failed example:
test(interacts.calculus.function_derivative)
Expected:
Interactive function <function function_derivative at ...> with 4 widgets
title: HTMLText(value=u'<h2>Derivative grapher</h2>')
function: EvalText(value=u'x^5-3*x^3+1', description=u'Function:')
x_range: FloatRangeSlider(value=(-2.0, 2.0), min=-15.0, max=15.0, step=0.1, description=u'Range (x)')
y_range: FloatRangeSlider(value=(-8.0, 6.0), min=-15.0, max=15.0, step=0.1, description=u'Range (y)')
<center><script type="math/tex">\color{Blue}{f(x) = x^{5} - 3 \, x^{3} + 1}</script></center>
<center><script type="math/tex">\color{Green}{f'(x) = 5 \, x^{4} - 9 \, x^{2}}</script></center>
<center><script type="math/tex">\color{Red}{f''(x) = 20 \, x^{3} - 18 \, x}</script></center>
Got:
Interactive function <function function_derivative at 0x7f143fb24488> with 4 widgets
title: HTMLText(value=u'<h2>Derivative grapher</h2>')
function: EvalText(value=u'x^5-3*x^3+1', description=u'Function:', layout=Layout(max_width=u'81em'))
x_range: FloatRangeSlider(value=(-2.0, 2.0), description=u'Range (x)', max=15.0, min=-15.0)
y_range: FloatRangeSlider(value=(-8.0, 6.0), description=u'Range (y)', max=15.0, min=-15.0)
<center><script type="math/tex">\color{Blue}{f(x) = x^{5} - 3 \, x^{3} + 1}</script></center>
<center><script type="math/tex">\color{Green}{f'(x) = 5 \, x^{4} - 9 \, x^{2}}</script></center>
<center><script type="math/tex">\color{Red}{f''(x) = 20 \, x^{3} - 18 \, x}</script></center>
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interacts/test_jupyter.rst", line 81, in sage.interacts.test_jupyter
Failed example:
test(interacts.calculus.difference_quotient)
Expected:
Interactive function <function difference_quotient at ...> with 5 widgets
title: HTMLText(value=u'<h2>Difference quotient</h2>')
f: EvalText(value=u'sin(x)', description=u'f(x)')
interval: FloatRangeSlider(value=(0.0, 10.0), min=0.0, max=10.0, step=0.1, description=u'Range')
a: IntSlider(value=5, min=0, max=10, step=1, description=u'$a$')
x0: IntSlider(value=2, min=0, max=10, step=1, description=u'$x_0$ (start point)')
<h2>Difference Quotient</h2>
<div style="white-space: normal;"> <a href="http://en.wikipedia.org/wiki/Difference_quotient" target="_blank"> Wikipedia article about difference quotient</a></div>
<h2>Difference Quotient</h2>
<br><script type="math/tex">\text{Line's equation:}</script>
<script type="math/tex">y = 1/3*(x - 5)*(sin(5) - sin(2)) + sin(5)</script><br>
<script type="math/tex">\text{Slope:}</script>
<script type="math/tex">k = \frac{f(x_0)-f(a)}{x_0-a} = -0.62274</script><br>
Got:
Interactive function <function difference_quotient at 0x7f143bc2b230> with 5 widgets
title: HTMLText(value=u'<h2>Difference quotient</h2>')
f: EvalText(value=u'sin(x)', description=u'f(x)', layout=Layout(max_width=u'81em'))
interval: FloatRangeSlider(value=(0.0, 10.0), description=u'Range', max=10.0)
a: IntSlider(value=5, description=u'$a$', max=10)
x0: IntSlider(value=2, description=u'$x_0$ (start point)', max=10)
<h2>Difference Quotient</h2>
<div style="white-space: normal;"> <a href="http://en.wikipedia.org/wiki/Difference_quotient" target="_blank"> Wikipedia article about difference quotient</a></div>
<h2>Difference Quotient</h2>
<br><script type="math/tex">\text{Line's equation:}</script>
<script type="math/tex">y = 1/3*(x - 5)*(sin(5) - sin(2)) + sin(5)</script><br>
<script type="math/tex">\text{Slope:}</script>
<script type="math/tex">k = \frac{f(x_0)-f(a)}{x_0-a} = -0.62274</script><br>
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interacts/test_jupyter.rst", line 96, in sage.interacts.test_jupyter
Failed example:
test(interacts.calculus.quadratic_equation)
Expected:
Interactive function <function quadratic_equation at ...> with 3 widgets
A: IntSlider(value=1, min=-7, max=7, step=1, description=u'A')
B: IntSlider(value=1, min=-7, max=7, step=1, description=u'B')
C: IntSlider(value=-2, min=-7, max=7, step=1, description=u'C')
<h2>The Solutions of the Quadratic Equation</h2>
<script type="math/tex">x^2 + x - 2 = 0</script>
<script type="math/tex">Ax^2 + Bx + C = 0</script>
<script type="math/tex">x = \frac{-B\pm\sqrt{B^2-4AC}}{2A} = \frac{-1\pm\sqrt{1^2-4*1*-2}}{2*1} = \frac{-1\pm\sqrt{\color{Green}{9}}}{2} = \begin{cases}1\\-2\end{cases}</script>
Got:
Interactive function <function quadratic_equation at 0x7f143bc2b6e0> with 3 widgets
A: IntSlider(value=1, description=u'A', max=7, min=-7)
B: IntSlider(value=1, description=u'B', max=7, min=-7)
C: IntSlider(value=-2, description=u'C', max=7, min=-7)
<h2>The Solutions of the Quadratic Equation</h2>
<script type="math/tex">x^2 + x - 2 = 0</script>
<script type="math/tex">Ax^2 + Bx + C = 0</script>
<script type="math/tex">x = \frac{-B\pm\sqrt{B^2-4AC}}{2A} = \frac{-1\pm\sqrt{1^2-4*1*-2}}{2*1} = \frac{-1\pm\sqrt{\color{Green}{9}}}{2} = \begin{cases}1\\-2\end{cases}</script>
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interacts/test_jupyter.rst", line 106, in sage.interacts.test_jupyter
Failed example:
test(interacts.calculus.trigonometric_properties_triangle)
Expected:
Interactive function <function trigonometric_properties_triangle at ...> with 3 widgets
a0: IntSlider(value=30, min=0, max=360, step=1, description=u'A')
a1: IntSlider(value=180, min=0, max=360, step=1, description=u'B')
a2: IntSlider(value=300, min=0, max=360, step=1, description=u'C')
<h2>Trigonometric Properties of a Triangle</h2>
<script type="math/tex">\angle A = {60.0}^{\circ},</script> <script type="math/tex">\angle B = {45.0}^{\circ},</script> <script type="math/tex">\angle C = {75.0}^{\circ}</script>
<script type="math/tex">AB = 1.93185165258,</script> <script type="math/tex">BC = 1.73205080757,</script> <script type="math/tex">CA = 1.41421356237</script>
Area of triangle <script type="math/tex">ABC = 1.18301270189</script>
Got:
Interactive function <function trigonometric_properties_triangle at 0x7f143bc2b9b0> with 3 widgets
a0: IntSlider(value=30, description=u'A', max=360)
a1: IntSlider(value=180, description=u'B', max=360)
a2: IntSlider(value=300, description=u'C', max=360)
<h2>Trigonometric Properties of a Triangle</h2>
<script type="math/tex">\angle A = {60.0}^{\circ},</script> <script type="math/tex">\angle B = {45.0}^{\circ},</script> <script type="math/tex">\angle C = {75.0}^{\circ}</script>
<script type="math/tex">AB = 1.93185165258,</script> <script type="math/tex">BC = 1.73205080757,</script> <script type="math/tex">CA = 1.41421356237</script>
Area of triangle <script type="math/tex">ABC = 1.18301270189</script>
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interacts/test_jupyter.rst", line 116, in sage.interacts.test_jupyter
Failed example:
test(interacts.calculus.secant_method)
Expected:
Interactive function <function secant_method at ...> with 5 widgets
title: HTMLText(value=u'<h2>Secant method for numerical root finding</h2>')
f: EvalText(value=u'x^2-2', description=u'f(x)')
interval: IntRangeSlider(value=(0, 4), min=-5, max=5, step=1, description=u'range')
d: IntSlider(value=3, min=1, max=16, step=1, description=u'10^-d precision')
maxn: IntSlider(value=10, min=0, max=15, step=1, description=u'max iterations')
<script type="math/tex">\text{Precision }h = 10^{-d}=10^{-3}=0.00100</script>
<script type="math/tex">{c = }1.41440380977</script>
<script type="math/tex">{f(c) = }0.000538137094544</script>
<script type="math/tex">6 \text{ iterations}</script>
Got:
Interactive function <function secant_method at 0x7f143bc73758> with 5 widgets
title: HTMLText(value=u'<h2>Secant method for numerical root finding</h2>')
f: EvalText(value=u'x^2-2', description=u'f(x)', layout=Layout(max_width=u'81em'))
interval: IntRangeSlider(value=(0, 4), description=u'range', max=5, min=-5)
d: IntSlider(value=3, description=u'10^-d precision', max=16, min=1)
maxn: IntSlider(value=10, description=u'max iterations', max=15)
<script type="math/tex">\text{Precision }h = 10^{-d}=10^{-3}=0.00100</script>
<script type="math/tex">{c = }1.41440380977</script>
<script type="math/tex">{f(c) = }0.000538137094544</script>
<script type="math/tex">6 \text{ iterations}</script>
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interacts/test_jupyter.rst", line 128, in sage.interacts.test_jupyter
Failed example:
test(interacts.calculus.newton_method)
Expected:
Interactive function <function newton_method at ...> with 7 widgets
title: HTMLText(value=u'<h2>Newton method</h2>')
f: EvalText(value=u'x^2 - 2', description=u'f')
c: IntSlider(value=6, min=-10, max=10, step=1, description=u'Start ($x$)')
d: IntSlider(value=3, min=1, max=16, step=1, description=u'$10^{-d}$ precision')
maxn: IntSlider(value=10, min=0, max=15, step=1, description=u'max iterations')
interval: IntRangeSlider(value=(0, 6), min=-10, max=10, step=1, description=u'Interval')
list_steps: Checkbox(value=False, description=u'List steps')
<script type="math/tex">\text{Precision } 2h = 0.001</script>
<script type="math/tex">{c = }1.4142141576301823</script>
<script type="math/tex">{f(c) = }1.6836416461 \times 10^{-06}</script>
<script type="math/tex">6 \text{ iterations}</script>
Got:
Interactive function <function newton_method at 0x7f143bc739b0> with 7 widgets
title: HTMLText(value=u'<h2>Newton method</h2>')
f: EvalText(value=u'x^2 - 2', description=u'f', layout=Layout(max_width=u'81em'))
c: IntSlider(value=6, description=u'Start ($x$)', max=10, min=-10)
d: IntSlider(value=3, description=u'$10^{-d}$ precision', max=16, min=1)
maxn: IntSlider(value=10, description=u'max iterations', max=15)
interval: IntRangeSlider(value=(0, 6), description=u'Interval', max=10, min=-10)
list_steps: Checkbox(value=False, description=u'List steps')
<script type="math/tex">\text{Precision } 2h = 0.001</script>
<script type="math/tex">{c = }1.4142141576301823</script>
<script type="math/tex">{f(c) = }1.6836416461 \times 10^{-06}</script>
<script type="math/tex">6 \text{ iterations}</script>
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interacts/test_jupyter.rst", line 142, in sage.interacts.test_jupyter
Failed example:
test(interacts.calculus.trapezoid_integration)
Expected:
Interactive function <function trapezoid_integration at ...> with 7 widgets
title: HTMLText(value=u'<h2>Trapezoid integration</h2>')
f: EvalText(value=u'x^2-5*x + 10', description=u'$f(x)=$')
n: IntSlider(value=5, min=1, max=100, step=1, description=u'# divisions')
interval_input: ToggleButtons(value='from slider', options=['from slider', 'from keyboard'], description=u'Integration interval')
interval_s: IntRangeSlider(value=(0, 8), min=-10, max=10, step=1, description=u'slider: ')
interval_g: Grid(value=[[0, 8]], description=u'keyboard: ', children=(Label(value=u'keyboard: '), VBox(children=(EvalText(value=u'0'),)), VBox(children=(EvalText(value=u'8'),))))
output_form: ToggleButtons(value='traditional', options=['traditional', 'table', 'none'], description=u'Computations form')
Function <script type="math/tex">f(x)=x^{2} - 5 \, x + 10</script>
Integral value to seven decimal places is: <script type="math/tex">\displaystyle\int_{0.00}^{8.00} {f(x) \, \mathrm{d}x} = 90.666667</script>
<BLANKLINE>
<div class="math">
\begin{align*}
\int_{0.00}^{8.00} {f(x) \, \mathrm{d}x}
& \approx \frac {d}{2} \cdot \left[f(x_0) + 2 f(x_{1}) + 2 f(x_{2}) + 2 f(x_{3}) + 2 f(x_{4}) + f(x_{5})\right] \\
& = \frac{1.60}{2} \cdot \left[f(0.00) + 2 f(1.60) + 2 f(3.20) + 2 f(4.80) + 2 f(6.40) + f(8.00)\right] \\
& = \frac{1.60}{2} \cdot \left[10.00 + 2\cdot 4.56 + 2\cdot 4.24 + 2\cdot 9.04 + 2\cdot 18.96 + 34.00\right] \\
& = 94.08000
\end{align*}
</div>
<BLANKLINE>
Got:
Interactive function <function trapezoid_integration at 0x7f143bc73ed8> with 7 widgets
title: HTMLText(value=u'<h2>Trapezoid integration</h2>')
f: EvalText(value=u'x^2-5*x + 10', description=u'$f(x)=$', layout=Layout(max_width=u'81em'))
n: IntSlider(value=5, description=u'# divisions', min=1)
interval_input: ToggleButtons(description=u'Integration interval', options=('from slider', 'from keyboard'), value='from slider')
interval_s: IntRangeSlider(value=(0, 8), description=u'slider: ', max=10, min=-10)
interval_g: Grid(value=[[0, 8]], children=(Label(value=u'keyboard: '), VBox(children=(EvalText(value=u'0', layout=Layout(max_width=u'5em')),)), VBox(children=(EvalText(value=u'8', layout=Layout(max_width=u'5em')),))))
output_form: ToggleButtons(description=u'Computations form', options=('traditional', 'table', 'none'), value='traditional')
Function <script type="math/tex">f(x)=x^{2} - 5 \, x + 10</script>
Integral value to seven decimal places is: <script type="math/tex">\displaystyle\int_{0.00}^{8.00} {f(x) \, \mathrm{d}x} = 90.666667</script>
<BLANKLINE>
<div class="math">
\begin{align*}
\int_{0.00}^{8.00} {f(x) \, \mathrm{d}x}
& \approx \frac {d}{2} \cdot \left[f(x_0) + 2 f(x_{1}) + 2 f(x_{2}) + 2 f(x_{3}) + 2 f(x_{4}) + f(x_{5})\right] \\
& = \frac{1.60}{2} \cdot \left[f(0.00) + 2 f(1.60) + 2 f(3.20) + 2 f(4.80) + 2 f(6.40) + f(8.00)\right] \\
& = \frac{1.60}{2} \cdot \left[10.00 + 2\cdot 4.56 + 2\cdot 4.24 + 2\cdot 9.04 + 2\cdot 18.96 + 34.00\right] \\
& = 94.08000
\end{align*}
</div>
<BLANKLINE>
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interacts/test_jupyter.rst", line 165, in sage.interacts.test_jupyter
Failed example:
test(interacts.calculus.simpson_integration)
Expected:
Interactive function <function simpson_integration at ...> with 7 widgets
title: HTMLText(value=u'<h2>Simpson integration</h2>')
f: EvalText(value=u'x*sin(x)+x+1', description=u'$f(x)=$')
n: IntSlider(value=6, min=2, max=100, step=2, description=u'# divisions')
interval_input: ToggleButtons(value='from slider', options=['from slider', 'from keyboard'], description=u'Integration interval')
interval_s: IntRangeSlider(value=(0, 10), min=-10, max=10, step=1, description=u'slider: ')
interval_g: Grid(value=[[0, 10]], description=u'keyboard: ', children=(Label(value=u'keyboard: '), VBox(children=(EvalText(value=u'0'),)), VBox(children=(EvalText(value=u'10'),))))
output_form: ToggleButtons(value='traditional', options=['traditional', 'table', 'none'], description=u'Computations form')
Function <script type="math/tex">f(x)=x \sin\left(x\right) + x + 1</script>
Integral value to seven decimal places is: <script type="math/tex">\displaystyle\int_{0.00}^{10.00} {f(x) \, \mathrm{d}x} = 67.846694</script>
<BLANKLINE>
<div class="math">
\begin{align*}
\int_{0.00}^{10.00} {f(x) \, \mathrm{d}x}
& \approx \frac{d}{3} \cdot \left[ f(x_0) + 4 \cdot f(x_{1}) + 2 \cdot f(x_{2}) + 4 \cdot f(x_{3}) + 2 \cdot f(x_{4}) + 4 \cdot f(x_{5}) + f(x_{6})\right] \\
& = \frac{1.67}{3} \cdot \left[ f(0.00) + 4 \cdot f(1.67) + 2 \cdot f(3.33) + 4 \cdot f(5.00) + 2 \cdot f(6.67) + 4 \cdot f(8.33) + f(10.00)\right] \\
& = \frac{1.67}{3} \cdot \left[ 1.00 + 4 \cdot 4.33 + 2 \cdot 3.70 + 4 \cdot 1.21 + 2 \cdot 10.16 + 4 \cdot 16.73 + 5.56\right] \\
& = 68.506699
\end{align*}
</div>
<BLANKLINE>
Got:
Interactive function <function simpson_integration at 0x7f143bb8d320> with 7 widgets
title: HTMLText(value=u'<h2>Simpson integration</h2>')
f: EvalText(value=u'x*sin(x)+x+1', description=u'$f(x)=$', layout=Layout(max_width=u'81em'))
n: IntSlider(value=6, description=u'# divisions', min=2, step=2)
interval_input: ToggleButtons(description=u'Integration interval', options=('from slider', 'from keyboard'), value='from slider')
interval_s: IntRangeSlider(value=(0, 10), description=u'slider: ', max=10, min=-10)
interval_g: Grid(value=[[0, 10]], children=(Label(value=u'keyboard: '), VBox(children=(EvalText(value=u'0', layout=Layout(max_width=u'5em')),)), VBox(children=(EvalText(value=u'10', layout=Layout(max_width=u'5em')),))))
output_form: ToggleButtons(description=u'Computations form', options=('traditional', 'table', 'none'), value='traditional')
Function <script type="math/tex">f(x)=x \sin\left(x\right) + x + 1</script>
Integral value to seven decimal places is: <script type="math/tex">\displaystyle\int_{0.00}^{10.00} {f(x) \, \mathrm{d}x} = 67.846694</script>
<BLANKLINE>
<div class="math">
\begin{align*}
\int_{0.00}^{10.00} {f(x) \, \mathrm{d}x}
& \approx \frac{d}{3} \cdot \left[ f(x_0) + 4 \cdot f(x_{1}) + 2 \cdot f(x_{2}) + 4 \cdot f(x_{3}) + 2 \cdot f(x_{4}) + 4 \cdot f(x_{5}) + f(x_{6})\right] \\
& = \frac{1.67}{3} \cdot \left[ f(0.00) + 4 \cdot f(1.67) + 2 \cdot f(3.33) + 4 \cdot f(5.00) + 2 \cdot f(6.67) + 4 \cdot f(8.33) + f(10.00)\right] \\
& = \frac{1.67}{3} \cdot \left[ 1.00 + 4 \cdot 4.33 + 2 \cdot 3.70 + 4 \cdot 1.21 + 2 \cdot 10.16 + 4 \cdot 16.73 + 5.56\right] \\
& = 68.506699
\end{align*}
</div>
<BLANKLINE>
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interacts/test_jupyter.rst", line 188, in sage.interacts.test_jupyter
Failed example:
test(interacts.calculus.bisection_method)
Expected:
Interactive function <function bisection_method at ...> with 5 widgets
title: HTMLText(value=u'<h2>Bisection method</h2>')
f: EvalText(value=u'x^2-2', description=u'f(x)')
interval: IntRangeSlider(value=(0, 4), min=-5, max=5, step=1, description=u'range')
d: IntSlider(value=3, min=1, max=8, step=1, description=u'$10^{-d}$ precision')
maxn: IntSlider(value=10, min=0, max=50, step=1, description=u'max iterations')
<script type="math/tex">\text{Precision }h = 10^{-d}=10^{-3}=0.00100</script>
<script type="math/tex">{c = }1.4140625</script>
<script type="math/tex">{f(c) = }-0.00042724609375</script>
<script type="math/tex">9 \text{ iterations}</script>
Got:
Interactive function <function bisection_method at 0x7f143bc73500> with 5 widgets
title: HTMLText(value=u'<h2>Bisection method</h2>')
f: EvalText(value=u'x^2-2', description=u'f(x)', layout=Layout(max_width=u'81em'))
interval: IntRangeSlider(value=(0, 4), description=u'range', max=5, min=-5)
d: IntSlider(value=3, description=u'$10^{-d}$ precision', max=8, min=1)
maxn: IntSlider(value=10, description=u'max iterations', max=50)
<script type="math/tex">\text{Precision }h = 10^{-d}=10^{-3}=0.00100</script>
<script type="math/tex">{c = }1.4140625</script>
<script type="math/tex">{f(c) = }-0.00042724609375</script>
<script type="math/tex">9 \text{ iterations}</script>
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interacts/test_jupyter.rst", line 200, in sage.interacts.test_jupyter
Failed example:
test(interacts.calculus.riemann_sum)
Expected:
Manual interactive function <function riemann_sum at ...> with 9 widgets
title: HTMLText(value=u'<h2>Riemann integral with random sampling</h2>')
f: EvalText(value=u'x^2+1', description=u'$f(x)=$')
n: IntSlider(value=5, min=1, max=30, step=1, description=u'# divisions')
hr1: HTMLText(value=u'<hr>')
interval_input: ToggleButtons(value='from slider', options=['from slider', 'from keyboard'], description=u'Integration interval')
interval_s: IntRangeSlider(value=(0, 2), min=-5, max=10, step=1, description=u'slider: ')
interval_g: Grid(value=[[0, 2]], description=u'keyboard: ', children=(Label(value=u'keyboard: '), VBox(children=(EvalText(value=u'0'),)), VBox(children=(EvalText(value=u'2'),))))
hr2: HTMLText(value=u'<hr>')
list_table: Checkbox(value=False, description=u'List table')
<small>Adjust your data and click Update button. Click repeatedly for another random values.</small>
Riemann sum: <script type="math/tex">\displaystyle\sum_{i=1}^{5} f(\eta_i)(x_i-x_{i-1})=...</script>
Exact value of the integral <script type="math/tex">\displaystyle\int_{0}^{2}x^{2} + 1\,\mathrm{d}x=4.66666666667</script>
Got:
Manual interactive function <function riemann_sum at 0x7f143bb8d5f0> with 9 widgets
title: HTMLText(value=u'<h2>Riemann integral with random sampling</h2>')
f: EvalText(value=u'x^2+1', description=u'$f(x)=$', layout=Layout(max_width=u'41em'))
n: IntSlider(value=5, description=u'# divisions', max=30, min=1)
hr1: HTMLText(value=u'<hr>')
interval_input: ToggleButtons(description=u'Integration interval', options=('from slider', 'from keyboard'), value='from slider')
interval_s: IntRangeSlider(value=(0, 2), description=u'slider: ', max=10, min=-5)
interval_g: Grid(value=[[0, 2]], children=(Label(value=u'keyboard: '), VBox(children=(EvalText(value=u'0', layout=Layout(max_width=u'5em')),)), VBox(children=(EvalText(value=u'2', layout=Layout(max_width=u'5em')),))))
hr2: HTMLText(value=u'<hr>')
list_table: Checkbox(value=False, description=u'List table')
<small>Adjust your data and click Update button. Click repeatedly for another random values.</small>
Riemann sum: <script type="math/tex">\displaystyle\sum_{i=1}^{5} f(\eta_i)(x_i-x_{i-1})=5.11913858709</script>
Exact value of the integral <script type="math/tex">\displaystyle\int_{0}^{2}x^{2} + 1\,\mathrm{d}x=4.66666666667</script>
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interacts/test_jupyter.rst", line 215, in sage.interacts.test_jupyter
Failed example:
test(interacts.calculus.function_tool)
Expected:
Interactive function <function function_tool at ...> with 7 widgets
f: EvalText(value=u'sin(x)', description=u'f')
g: EvalText(value=u'cos(x)', description=u'g')
xrange: IntRangeSlider(value=(0, 1), min=-3, max=3, step=1, description=u'x-range')
yrange: Text(value=u'auto', description=u'yrange')
a: IntSlider(value=1, min=-1, max=3, step=1, description=u'a')
action: ToggleButtons(value='f', options=['f', 'df/dx', 'int f', 'num f', 'den f', '1/f', 'finv', 'f+a', 'f-a', 'f*a', 'f/a', 'f^a', 'f(x+a)', 'f(x*a)', 'f+g', 'f-g', 'f*g', 'f/g', 'f(g)'], description=u'h = ')
do_plot: Checkbox(value=True, description=u'do_plot')
<center><font color="red"><script type="math/tex">f = \sin\left(x\right)</script></font></center>
<center><font color="green"><script type="math/tex">g = \cos\left(x\right)</script></font></center>
<center><font color="blue"><b><script type="math/tex">h = f = \sin\left(x\right)</script></b></font></center>
Got:
Interactive function <function function_tool at 0x7f143bb8d8c0> with 7 widgets
f: EvalText(value=u'sin(x)', description=u'f')
g: EvalText(value=u'cos(x)', description=u'g')
xrange: IntRangeSlider(value=(0, 1), description=u'x-range', max=3, min=-3)
yrange: Text(value=u'auto', description=u'yrange')
a: IntSlider(value=1, description=u'a', max=3, min=-1)
action: ToggleButtons(description=u'h = ', options=('f', 'df/dx', 'int f', 'num f', 'den f', '1/f', 'finv', 'f+a', 'f-a', 'f*a', 'f/a', 'f^a', 'f(x+a)', 'f(x*a)', 'f+g', 'f-g', 'f*g', 'f/g', 'f(g)'), value='f')
do_plot: Checkbox(value=True, description=u'do_plot')
<center><font color="red"><script type="math/tex">f = \sin\left(x\right)</script></font></center>
<center><font color="green"><script type="math/tex">g = \cos\left(x\right)</script></font></center>
<center><font color="blue"><b><script type="math/tex">h = f = \sin\left(x\right)</script></b></font></center>
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interacts/test_jupyter.rst", line 228, in sage.interacts.test_jupyter
Failed example:
test(interacts.fractals.mandelbrot)
Expected:
Interactive function <function mandelbrot at ...> with 6 widgets
expo: FloatSlider(value=2.0, min=-10.0, max=10.0, step=0.1, description=u'expo')
iterations: IntSlider(value=20, min=1, max=100, step=1, description=u'# iterations')
zoom_x: FloatRangeSlider(value=(-2.0, 1.0), min=-2.0, max=2.0, step=0.01, description=u'Zoom X')
zoom_y: FloatRangeSlider(value=(-1.5, 1.5), min=-2.0, max=2.0, step=0.01, description=u'Zoom Y')
plot_points: IntSlider(value=150, min=20, max=400, step=20, description=u'plot points')
dpi: IntSlider(value=80, min=20, max=200, step=10, description=u'dpi')
<h2>Mandelbrot Fractal</h2>
Recursive Formula: <script type="math/tex">z \leftarrow z^{2.00} + c</script> for <script type="math/tex">c \in \mathbb{C}</script>
Got:
Interactive function <function mandelbrot at 0x7f143bb8db90> with 6 widgets
expo: FloatSlider(value=2.0, description=u'expo', max=10.0, min=-10.0)
iterations: IntSlider(value=20, description=u'# iterations', min=1)
zoom_x: FloatRangeSlider(value=(-2.0, 1.0), description=u'Zoom X', max=2.0, min=-2.0, step=0.01)
zoom_y: FloatRangeSlider(value=(-1.5, 1.5), description=u'Zoom Y', max=2.0, min=-2.0, step=0.01)
plot_points: IntSlider(value=150, description=u'plot points', max=400, min=20, step=20)
dpi: IntSlider(value=80, description=u'dpi', max=200, min=20, step=10)
<h2>Mandelbrot Fractal</h2>
Recursive Formula: <script type="math/tex">z \leftarrow z^{2.00} + c</script> for <script type="math/tex">c \in \mathbb{C}</script>
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interacts/test_jupyter.rst", line 239, in sage.interacts.test_jupyter
Failed example:
test(interacts.fractals.julia)
Expected:
Interactive function <function julia at ...> with 8 widgets
expo: FloatSlider(value=2.0, min=-10.0, max=10.0, step=0.1, description=u'expo')
c_real: FloatSlider(value=0.5, min=-2.0, max=2.0, step=0.01, description=u'real part const.')
c_imag: FloatSlider(value=0.5, min=-2.0, max=2.0, step=0.01, description=u'imag part const.')
iterations: IntSlider(value=20, min=1, max=100, step=1, description=u'# iterations')
zoom_x: FloatRangeSlider(value=(-1.5, 1.5), min=-2.0, max=2.0, step=0.01, description=u'Zoom X')
zoom_y: FloatRangeSlider(value=(-1.5, 1.5), min=-2.0, max=2.0, step=0.01, description=u'Zoom Y')
plot_points: IntSlider(value=150, min=20, max=400, step=20, description=u'plot points')
dpi: IntSlider(value=80, min=20, max=200, step=10, description=u'dpi')
<h2>Julia Fractal</h2>
Recursive Formula: <script type="math/tex">z \leftarrow z^{2.00} + (0.50+0.50*\mathbb{I})</script>
Got:
Interactive function <function julia at 0x7f143bb8d938> with 8 widgets
expo: FloatSlider(value=2.0, description=u'expo', max=10.0, min=-10.0)
c_real: FloatSlider(value=0.5, description=u'real part const.', max=2.0, min=-2.0, step=0.01)
c_imag: FloatSlider(value=0.5, description=u'imag part const.', max=2.0, min=-2.0, step=0.01)
iterations: IntSlider(value=20, description=u'# iterations', min=1)
zoom_x: FloatRangeSlider(value=(-1.5, 1.5), description=u'Zoom X', max=2.0, min=-2.0, step=0.01)
zoom_y: FloatRangeSlider(value=(-1.5, 1.5), description=u'Zoom Y', max=2.0, min=-2.0, step=0.01)
plot_points: IntSlider(value=150, description=u'plot points', max=400, min=20, step=20)
dpi: IntSlider(value=80, description=u'dpi', max=200, min=20, step=10)
<h2>Julia Fractal</h2>
Recursive Formula: <script type="math/tex">z \leftarrow z^{2.00} + (0.50+0.50*\mathbb{I})</script>
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interacts/test_jupyter.rst", line 252, in sage.interacts.test_jupyter
Failed example:
test(interacts.fractals.cellular_automaton)
Expected:
Interactive function <function cellular_automaton at ...> with 3 widgets
N: IntSlider(value=100, min=1, max=500, step=1, description=u'Number of iterations')
rule_number: IntSlider(value=110, min=0, max=255, step=1, description=u'Rule number')
size: IntSlider(value=6, min=1, max=11, step=1, description=u'size of graphic')
<h2>Cellular Automaton</h2><div style="white-space: normal;">"A cellular automaton is a collection of "colored" cells on a grid of specified shape that evolves through a number of discrete time steps according to a set of rules based on the states of neighboring cells." — <a target="_blank" href="http://mathworld.wolfram.com/CellularAutomaton.html">Mathworld, Cellular Automaton</a></div> <div>Rule 110 expands to 01110110</div>
Got:
Interactive function <function cellular_automaton at 0x7f143bb8dde8> with 3 widgets
N: IntSlider(value=100, description=u'Number of iterations', max=500, min=1)
rule_number: IntSlider(value=110, description=u'Rule number', max=255)
size: IntSlider(value=6, description=u'size of graphic', max=11, min=1)
<h2>Cellular Automaton</h2><div style="white-space: normal;">"A cellular automaton is a collection of "colored" cells on a grid of specified shape that evolves through a number of discrete time steps according to a set of rules based on the states of neighboring cells." — <a target="_blank" href="http://mathworld.wolfram.com/CellularAutomaton.html">Mathworld, Cellular Automaton</a></div> <div>Rule 110 expands to 01110110</div>
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interacts/test_jupyter.rst", line 259, in sage.interacts.test_jupyter
Failed example:
test(interacts.geometry.unit_circle)
Expected:
Interactive function <function unit_circle at ...> with 2 widgets
function: Dropdown(value=0, options=[('sin(x)', 0), ('cos(x)', 1), ('tan(x)', 2)], description=u'function')
x: TransformFloatSlider(value=0.0, min=0.0, max=6.283185307179586, step=0.015707963267948967, description=u'x')
<div style="white-space: normal;">Lines of the same color have the same length</div>
Got:
Interactive function <function unit_circle at 0x7f143bc2bf50> with 2 widgets
function: Dropdown(description=u'function', options=(('sin(x)', 0), ('cos(x)', 1), ('tan(x)', 2)), value=0)
x: TransformFloatSlider(value=0.0, description=u'x', max=6.283185307179586, step=0.015707963267948967)
<div style="white-space: normal;">Lines of the same color have the same length</div>
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interacts/test_jupyter.rst", line 265, in sage.interacts.test_jupyter
Failed example:
test(interacts.geometry.trigonometric_properties_triangle)
Expected:
Interactive function <function trigonometric_properties_triangle at ...> with 3 widgets
a0: IntSlider(value=30, min=0, max=360, step=1, description=u'A')
a1: IntSlider(value=180, min=0, max=360, step=1, description=u'B')
a2: IntSlider(value=300, min=0, max=360, step=1, description=u'C')
<h2>Trigonometric Properties of a Triangle</h2>
<script type="math/tex">\angle A = {60.0}^{\circ},</script> <script type="math/tex">\angle B = {45.0}^{\circ},</script> <script type="math/tex">\angle C = {75.0}^{\circ}</script>
<script type="math/tex">AB = 1.93185165258,</script> <script type="math/tex">BC = 1.73205080757,</script> <script type="math/tex">CA = 1.41421356237</script>
Area of triangle <script type="math/tex">ABC = 1.18301270189</script>
Got:
Interactive function <function trigonometric_properties_triangle at 0x7f143bc2b9b0> with 3 widgets
a0: IntSlider(value=30, description=u'A', max=360)
a1: IntSlider(value=180, description=u'B', max=360)
a2: IntSlider(value=300, description=u'C', max=360)
<h2>Trigonometric Properties of a Triangle</h2>
<script type="math/tex">\angle A = {60.0}^{\circ},</script> <script type="math/tex">\angle B = {45.0}^{\circ},</script> <script type="math/tex">\angle C = {75.0}^{\circ}</script>
<script type="math/tex">AB = 1.93185165258,</script> <script type="math/tex">BC = 1.73205080757,</script> <script type="math/tex">CA = 1.41421356237</script>
Area of triangle <script type="math/tex">ABC = 1.18301270189</script>
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interacts/test_jupyter.rst", line 275, in sage.interacts.test_jupyter
Failed example:
test(interacts.geometry.special_points)
Expected:
Interactive function <function special_points at ...> with 10 widgets
title: HTMLText(value=u'<h2>Special points in triangle</h2>')
a0: IntSlider(value=30, min=0, max=360, step=1, description=u'A')
a1: IntSlider(value=180, min=0, max=360, step=1, description=u'B')
a2: IntSlider(value=300, min=0, max=360, step=1, description=u'C')
show_median: Checkbox(value=False, description=u'Medians')
show_pb: Checkbox(value=False, description=u'Perpendicular Bisectors')
show_alt: Checkbox(value=False, description=u'Altitudes')
show_ab: Checkbox(value=False, description=u'Angle Bisectors')
show_incircle: Checkbox(value=False, description=u'Incircle')
show_euler: Checkbox(value=False, description=u"Euler's Line")
Got:
Interactive function <function special_points at 0x7f143bc73050> with 10 widgets
title: HTMLText(value=u'<h2>Special points in triangle</h2>')
a0: IntSlider(value=30, description=u'A', max=360)
a1: IntSlider(value=180, description=u'B', max=360)
a2: IntSlider(value=300, description=u'C', max=360)
show_median: Checkbox(value=False, description=u'Medians')
show_pb: Checkbox(value=False, description=u'Perpendicular Bisectors')
show_alt: Checkbox(value=False, description=u'Altitudes')
show_ab: Checkbox(value=False, description=u'Angle Bisectors')
show_incircle: Checkbox(value=False, description=u'Incircle')
show_euler: Checkbox(value=False, description=u"Euler's Line")
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interacts/test_jupyter.rst", line 288, in sage.interacts.test_jupyter
Failed example:
test(interacts.statistics.coin)
Expected:
Interactive function <function coin at ...> with 2 widgets
n: IntSlider(value=1000, min=2, max=10000, step=100, description=u'Number of Tosses')
interval: IntRangeSlider(value=(0, 0), min=0, max=1, step=1, description=u'Plotting range (y)')
doctest:...: UserWarning: Attempting to set identical bottom==top results in singular transformations; automatically expanding.
bottom=0.0, top=0.0
Got:
Interactive function <function coin at 0x7f143bc732a8> with 2 widgets
n: IntSlider(value=1000, description=u'Number of Tosses', max=10000, min=2, step=100)
interval: IntRangeSlider(value=(0, 0), description=u'Plotting range (y)', max=1)
doctest:warning
File "/usr/lib/python-exec/python2.7/sage-runtests", line 103, in <module>
err = DC.run()
File "/usr/lib64/python2.7/site-packages/sage/doctest/control.py", line 1093, in run
self.run_doctests()
File "/usr/lib64/python2.7/site-packages/sage/doctest/control.py", line 822, in run_doctests
self.dispatcher.dispatch()
File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 1777, in dispatch
self.parallel_dispatch()
File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 1667, in parallel_dispatch
w.start() # This might take some time
File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 1943, in start
super(DocTestWorker, self).start()
File "/usr/lib64/python2.7/multiprocessing/process.py", line 130, in start
self._popen = Popen(self)
File "/usr/lib64/python2.7/multiprocessing/forking.py", line 126, in __init__
code = process_obj._bootstrap()
File "/usr/lib64/python2.7/multiprocessing/process.py", line 267, in _bootstrap
self.run()
File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 1916, in run
task(self.options, self.outtmpfile, msgpipe, self.result_queue)
File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 2218, in __call__
result = runner.run(test)
File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 663, in run
return self._run(test, compileflags, out)
File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 518, in _run
self.compile_and_execute(example, compiler, test.globs)
File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 888, in compile_and_execute
exec(compiled, globs)
File "<doctest sage.interacts.test_jupyter[27]>", line 1, in <module>
test(interacts.statistics.coin)
File "<doctest sage.interacts.test_jupyter[3]>", line 6, in test
return f(**kwargs)
File "/usr/lib64/python2.7/site-packages/sage/interacts/library.py", line 736, in coin
show(point(c[1:], gridlines=[None, [0.5]], pointsize=1), ymin=interval[0], ymax=interval[1])
File "/usr/lib64/python2.7/site-packages/sage/repl/rich_output/pretty_print.py", line 258, in show
pretty_print(*args, **kwds)
File "/usr/lib64/python2.7/site-packages/sage/repl/rich_output/pretty_print.py", line 229, in pretty_print
dm.display_immediately(*args, **kwds)
File "/usr/lib64/python2.7/site-packages/sage/repl/rich_output/display_manager.py", line 831, in display_immediately
plain_text, rich_output = self._rich_output_formatter(obj, rich_repr_kwds)
File "/usr/lib64/python2.7/site-packages/sage/repl/rich_output/display_manager.py", line 623, in _rich_output_formatter
rich_output = self._call_rich_repr(obj, rich_repr_kwds)
File "/usr/lib64/python2.7/site-packages/sage/repl/rich_output/display_manager.py", line 581, in _call_rich_repr
return obj._rich_repr_(self, **rich_repr_kwds)
File "/usr/lib64/python2.7/site-packages/sage/plot/graphics.py", line 884, in _rich_repr_
self.save, kwds, file_ext, output_container)
File "/usr/lib64/python2.7/site-packages/sage/repl/rich_output/display_manager.py", line 711, in graphics_from_save
save_function(filename, **kwds)
File "/usr/lib64/python2.7/site-packages/sage/misc/decorators.py", line 483, in wrapper
return func(*args, **kwds)
File "/usr/lib64/python2.7/site-packages/sage/plot/graphics.py", line 3147, in save
figure = self.matplotlib(**options)
File "/usr/lib64/python2.7/site-packages/sage/plot/graphics.py", line 2674, in matplotlib
subplot.set_ylim([ymin, ymax])
File "/usr/lib64/python2.7/site-packages/matplotlib/axes/_base.py", line 3040, in set_ylim
'bottom=%s, top=%s') % (bottom, top))
:
UserWarning: Attempting to set identical bottom==top results
in singular transformations; automatically expanding.
bottom=0.0, top=0.0
**********************************************************************
Mostly ordering in the output.
sage -t --long --warn-long 89.4 /usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/widgets.py
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/widgets.py", line 102, in sage.repl.ipython_kernel.widgets.TransformWidget
Failed example:
w
Expected:
TransformToggleButtons(options=((u'pi', 'pi'), (u'e', 'e')), value='pi')
Got:
TransformToggleButtons(options=('pi', 'e'), value='pi')
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/widgets.py", line 172, in sage.repl.ipython_kernel.widgets.EvalWidget
Failed example:
w
Expected:
EvalToggleButtons(options=((u'pi', 'pi'), (u'e', 'e')), value='pi')
Got:
EvalToggleButtons(options=('pi', 'e'), value='pi')
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/widgets.py", line 187, in sage.repl.ipython_kernel.widgets.EvalWidget.get_value
Failed example:
w
Expected:
EvalDropdown(options=((u'the_answer', 'the_answer'),), value='the_answer')
Got:
EvalDropdown(options=('the_answer',), value='the_answer')
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/widgets.py", line 224, in sage.repl.ipython_kernel.widgets.TransformFloatSlider
Failed example:
w
Expected:
TransformFloatSlider(value=7.0, min=0.0, max=100.0, step=0.1)
Got:
TransformFloatSlider(value=7.0)
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/widgets.py", line 241, in sage.repl.ipython_kernel.widgets.TransformIntRangeSlider
Failed example:
w
Expected:
TransformIntRangeSlider(value=(7, 9), min=0, max=100, step=1)
Got:
TransformIntRangeSlider(value=(7, 9))
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/widgets.py", line 258, in sage.repl.ipython_kernel.widgets.TransformFloatRangeSlider
Failed example:
w
Expected:
TransformFloatRangeSlider(value=(7.0, 9.0), min=0.0, max=100.0, step=1.0)
Got:
TransformFloatRangeSlider(value=(7.0, 9.0))
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/widgets.py", line 398, in sage.repl.ipython_kernel.widgets.Grid.__init__
Failed example:
w
Expected:
Grid(value=[[0, 1], [4, 5]], description=u'2x2 matrix', children=(Label(value=u'2x2 matrix'), VBox(children=(EvalText(value=u'0'), EvalText(value=u'4'))), VBox(children=(EvalText(value=u'1'), EvalText(value=u'5')))))
Got:
Grid(value=[[0, 1], [4, 5]], children=(Label(value=u'2x2 matrix'), VBox(children=(EvalText(value=u'0'), EvalText(value=u'4'))), VBox(children=(EvalText(value=u'1'), EvalText(value=u'5')))))
**********************************************************************
7 items had failures:
1 of 7 in sage.repl.ipython_kernel.widgets.EvalWidget
1 of 9 in sage.repl.ipython_kernel.widgets.EvalWidget.get_value
1 of 6 in sage.repl.ipython_kernel.widgets.Grid.__init__
1 of 5 in sage.repl.ipython_kernel.widgets.TransformFloatRangeSlider
1 of 5 in sage.repl.ipython_kernel.widgets.TransformFloatSlider
1 of 5 in sage.repl.ipython_kernel.widgets.TransformIntRangeSlider
1 of 7 in sage.repl.ipython_kernel.widgets.TransformWidget
[99 tests, 7 failures, 0.64 s]
sage -t --long --warn-long 89.4 /usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/widgets_sagenb.py
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/widgets_sagenb.py", line 205, in sage.repl.ipython_kernel.widgets_sagenb.slider
Failed example:
w = slider(5, 20, step_size=10/3); w
Expected:
SelectionSlider(index=2, options=((u'5', 5), (u'25/3', 25/3), (u'35/3', 35/3), (u'15', 15), (u'55/3', 55/3)), value=35/3)
Got:
SelectionSlider(index=2, options=(5, 25/3, 35/3, 15, 55/3), value=35/3)
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/widgets_sagenb.py", line 220, in sage.repl.ipython_kernel.widgets_sagenb.slider
Failed example:
slider(range(10), default=17/10)
Expected:
SelectionSlider(index=2, options=((u'0', 0), (u'1', 1), (u'2', 2), (u'3', 3), (u'4', 4), (u'5', 5), (u'6', 6), (u'7', 7), (u'8', 8), (u'9', 9)), value=2)
Got:
SelectionSlider(index=2, options=(0, 1, 2, 3, 4, 5, 6, 7, 8, 9), value=2)
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/widgets_sagenb.py", line 444, in sage.repl.ipython_kernel.widgets_sagenb.selector
Failed example:
selector(range(5), label="choose one")
Expected:
Dropdown(description=u'choose one', options=((u'0', 0), (u'1', 1), (u'2', 2), (u'3', 3), (u'4', 4)), value=0)
Got:
Dropdown(description=u'choose one', options=(0, 1, 2, 3, 4), value=0)
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/widgets_sagenb.py", line 446, in sage.repl.ipython_kernel.widgets_sagenb.selector
Failed example:
selector(range(5), buttons=True, default=4)
Expected:
ToggleButtons(index=4, options=((u'0', 0), (u'1', 1), (u'2', 2), (u'3', 3), (u'4', 4)), value=4)
Got:
ToggleButtons(index=4, options=(0, 1, 2, 3, 4), value=4)
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/widgets_sagenb.py", line 452, in sage.repl.ipython_kernel.widgets_sagenb.selector
Failed example:
selector([(1,"one"), (2,"two"), (3,"three")])
Expected:
Dropdown(options=((u'one', 1), (u'two', 2), (u'three', 3)), value=1)
Got:
Dropdown(options=(('one', 1), ('two', 2), ('three', 3)), value=1)
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/widgets_sagenb.py", line 454, in sage.repl.ipython_kernel.widgets_sagenb.selector
Failed example:
selector([(1,"one"), (2,"two"), (3,"three")], buttons=True)
Expected:
ToggleButtons(options=((u'one', 1), (u'two', 2), (u'three', 3)), value=1)
Got:
ToggleButtons(options=(('one', 1), ('two', 2), ('three', 3)), value=1)
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/widgets_sagenb.py", line 461, in sage.repl.ipython_kernel.widgets_sagenb.selector
Failed example:
selector(OrderedDict(one=1, two=2, three=3))
Expected:
Dropdown(options=((u'one', 1), (u'three', 3), (u'two', 2)), value=1)
Got:
Dropdown(options=OrderedDict([('one', 1), ('three', 3), ('two', 2)]), value=1)
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/widgets_sagenb.py", line 463, in sage.repl.ipython_kernel.widgets_sagenb.selector
Failed example:
selector(OrderedDict(one=1, two=2, three=3), buttons=True)
Expected:
ToggleButtons(options=((u'one', 1), (u'three', 3), (u'two', 2)), value=1)
Got:
ToggleButtons(options=OrderedDict([('one', 1), ('three', 3), ('two', 2)]), value=1)
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/widgets_sagenb.py", line 468, in sage.repl.ipython_kernel.widgets_sagenb.selector
Failed example:
selector([sin(x^2), GF(29), EllipticCurve('37a1')])
Expected:
Dropdown(options=((u'sin(x^2)', sin(x^2)), (u'Finite Field of size 29', Finite Field of size 29), (u'Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field', Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field)), value=sin(x^2))
Got:
Dropdown(options=(sin(x^2), Finite Field of size 29, Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field), value=sin(x^2))
**********************************************************************
2 items had failures:
7 of 10 in sage.repl.ipython_kernel.widgets_sagenb.selector
2 of 21 in sage.repl.ipython_kernel.widgets_sagenb.slider
[77 tests, 9 failures, 0.76 s]
sage -t --long --warn-long 89.4 /usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/kernel.py
[14 tests, 0.66 s]
sage -t --long --warn-long 89.4 /usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/interact.py
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/interact.py", line 55, in sage.repl.ipython_kernel.interact.sage_interactive
Failed example:
sage_interactive(myfunc, x=(0,100), z=["one", "two", "three"])
Expected:
Interactive function <function myfunc at ...> with 3 widgets
x: IntSlider(value=10, description=u'x')
y: Text(value=u'hello', description=u'y')
z: Dropdown(description=u'z', options=((u'one', 'one'), (u'two', 'two'), (u'three', 'three')), value=None)
Got:
Interactive function <function myfunc at 0x7f11793fba28> with 3 widgets
x: IntSlider(value=10, description=u'x')
y: Text(value=u'hello', description=u'y')
z: Dropdown(description=u'z', options=('one', 'two', 'three'), value=None)
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/interact.py", line 188, in sage.repl.ipython_kernel.interact.sage_interactive.widget_from_tuple
Failed example:
sage_interactive.widget_from_tuple( (2, dict(one=1, two=2, three=3)) )
Expected:
Dropdown(index=1, options=((u'three', 3), (u'two', 2), (u'one', 1)), value=2)
Got:
Dropdown(index=1, options={'three': 3, 'two': 2, 'one': 1}, value=2)
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/interact.py", line 223, in sage.repl.ipython_kernel.interact.sage_interactive.widget_from_iterable
Failed example:
sage_interactive.widget_from_iterable([1..5])
Expected:
TransformFloatSlider(value=7.0)
Got:
Dropdown(options=(1, 2, 3, 4, 5), value=1)
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/interact.py", line 225, in sage.repl.ipython_kernel.interact.sage_interactive.widget_from_iterable
Failed example:
sage_interactive.widget_from_iterable(iter([1..5]))
Expected:
SelectionSlider(options=((u'1', 1), (u'2', 2), (u'3', 3), (u'4', 4), (u'5', 5)), value=1)
Got:
SelectionSlider(options=(1, 2, 3, 4, 5), value=1)
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/interact.py", line 227, in sage.repl.ipython_kernel.interact.sage_interactive.widget_from_iterable
Failed example:
sage_interactive.widget_from_iterable((1..5))
Expected:
SelectionSlider(options=((u'1', 1), (u'2', 2), (u'3', 3), (u'4', 4), (u'5', 5)), value=1)
Got:
SelectionSlider(options=(1, 2, 3, 4, 5), value=1)
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/interact.py", line 229, in sage.repl.ipython_kernel.interact.sage_interactive.widget_from_iterable
Failed example:
sage_interactive.widget_from_iterable(x for x in [1..5])
Expected:
SelectionSlider(options=((u'1', 1), (u'2', 2), (u'3', 3), (u'4', 4), (u'5', 5)), value=1)
Got:
SelectionSlider(options=(1, 2, 3, 4, 5), value=1)
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/repl/ipython_kernel/interact.py", line 233, in sage.repl.ipython_kernel.interact.sage_interactive.widget_from_iterable
Failed example:
sage_interactive.widget_from_iterable(gen())
Expected:
SelectionSlider(options=((u'1', 1), (u'2', 2), (u'3', 3), (u'4', 4), (u'5', 5)), value=1)
Got:
SelectionSlider(options=(1, 2, 3, 4, 5), value=1)
**********************************************************************
3 items had failures:
1 of 4 in sage.repl.ipython_kernel.interact.sage_interactive
5 of 8 in sage.repl.ipython_kernel.interact.sage_interactive.widget_from_iterable
1 of 6 in sage.repl.ipython_kernel.interact.sage_interactive.widget_from_tuple
[38 tests, 7 failures, 0.73 s]
unicode and some content under ipython_kernel
.
Description changed:
---
+++
@@ -1,5 +1,8 @@
-Currently in alpha.
+This ticket is to upgrade
-Tarballs:
+- ipywidgets: https://pypi.python.org/pypi/ipywidgets
+- widgetsnbextension: https://pypi.python.org/pypi/widgetsnbextension
+
+Tarballs for ipywidgets-7.0.0a8 and widgetsnbextension-3.0.0a11:
- https://pypi.python.org/packages/62/bb/837f6b12b432adcd41e2082b9522d133af948ce2ca446784599a7199436c/ipywidgets-7.0.0a8.tar.gz
- https://pypi.python.org/packages/58/94/f545b0c01d23ec2cb934571a580d9fc121986c7c983df350f97981576abd/widgetsnbextension-3.0.0a11.tar.gz
Note: both ipywidgets and widgetsnbextension now in "release candidate" phase:
I hope to release 7.1 today or tomorrow, FYI.
ipywidgets 7.1 is now released.
Dependencies: #24529
Description changed:
---
+++
@@ -3,6 +3,6 @@
- ipywidgets: https://pypi.python.org/pypi/ipywidgets
- widgetsnbextension: https://pypi.python.org/pypi/widgetsnbextension
-Tarballs for ipywidgets-7.0.0a8 and widgetsnbextension-3.0.0a11:
-- https://pypi.python.org/packages/62/bb/837f6b12b432adcd41e2082b9522d133af948ce2ca446784599a7199436c/ipywidgets-7.0.0a8.tar.gz
-- https://pypi.python.org/packages/58/94/f545b0c01d23ec2cb934571a580d9fc121986c7c983df350f97981576abd/widgetsnbextension-3.0.0a11.tar.gz
+Tarballs:
+- https://pypi.python.org/packages/ba/f8/b0bb45cc0df5f5c19646f2ff9a04a4881075ecf784567c4bdbf7d39f09c3/ipywidgets-7.1.1.tar.gz/837f6b12b432adcd41e2082b9522d133af948ce2ca446784599a7199436c/ipywidgets-7.0.0a8.tar.gz
+- https://pypi.python.org/packages/78/d8/b46c8fba1ecfd09e76648599f45c4020aa5c068939ff42032eead4db1717/widgetsnbextension-3.1.1.tar.gz
Description changed:
---
+++
@@ -4,5 +4,5 @@
- widgetsnbextension: https://pypi.python.org/pypi/widgetsnbextension
Tarballs:
-- https://pypi.python.org/packages/ba/f8/b0bb45cc0df5f5c19646f2ff9a04a4881075ecf784567c4bdbf7d39f09c3/ipywidgets-7.1.1.tar.gz/837f6b12b432adcd41e2082b9522d133af948ce2ca446784599a7199436c/ipywidgets-7.0.0a8.tar.gz
+- https://pypi.python.org/packages/ba/f8/b0bb45cc0df5f5c19646f2ff9a04a4881075ecf784567c4bdbf7d39f09c3/ipywidgets-7.1.1.tar.gz
- https://pypi.python.org/packages/78/d8/b46c8fba1ecfd09e76648599f45c4020aa5c068939ff42032eead4db1717/widgetsnbextension-3.1.1.tar.gz
Looks good to me.
Reviewer: François Bissey
sage -t --long --warn-long 160.6 src/sage/cpython/debug.pyx
**********************************************************************
File "src/sage/cpython/debug.pyx", line 99, in sage.cpython.debug.getattr_debug
Failed example:
_ = getattr_debug(IntSlider(), "value")
Expected:
getattr_debug(obj=IntSlider(value=0, min=0, max=100, step=1), name='value'):
type(obj) = <class 'ipywidgets.widgets.widget_int.IntSlider'>
object has __dict__ slot (<type 'dict'>)
found 'value' in dict of <class 'ipywidgets.widgets.widget_int._Int'>
got <traitlets.traitlets.CInt object at ... (<class 'traitlets.traitlets.CInt'>)
attribute is data descriptor (has __get__ and __set__)
ignoring __dict__ because we have a data descriptor
calling __get__()
returning 0 (<type 'int'>)
Got:
getattr_debug(obj=IntSlider(value=0), name='value'):
type(obj) = <class 'ipywidgets.widgets.widget_int.IntSlider'>
object has __dict__ slot (<type 'dict'>)
found 'value' in dict of <class 'ipywidgets.widgets.widget_int._Int'>
got <traitlets.traitlets.CInt object at 0x7f378d04c~~~ (<class 'traitlets.traitlets.CInt'>)
attribute is data descriptor (has __get__ and __set__)
ignoring __dict__ because we have a data descriptor
calling __get__()
returning 0 (<type 'int'>)
**********************************************************************
1 item had failures:
1 of 9 in sage.cpython.debug.getattr_debug
[12 tests, 1 failure, 2.06 s]
----------------------------------------------------------------------
sage -t --long --warn-long 160.6 src/sage/cpython/debug.pyx # 1 doctest failed
----------------------------------------------------------------------
I'll confess to have missed that one during review.
Changed branch from u/jdemeyer/upgrade_to_ipywidgets_7 to u/fbissey/ipywidget7
And the problem is that the patchbot doesn't test these tickets because they include a package upgrade.
Changed branch from u/fbissey/ipywidget7 to e64c034
This ticket is to upgrade
Tarballs:
Depends on #24529
CC: @jasongrout @kiwifb @slel
Component: notebook
Author: Jeroen Demeyer
Branch/Commit:
e64c034
Reviewer: François Bissey
Issue created by migration from https://trac.sagemath.org/ticket/23177