mpastell / Pweave

Pweave is a scientific report generator and a literate programming tool for Python. It can capture the results and plots from data analysis and works well with numpy, scipy and matplotlib.
http://mpastell.com/pweave
Other
435 stars 64 forks source link

Fix the issue of empty result on newer IPython #133

Open DigitalPig opened 5 years ago

DigitalPig commented 5 years ago

This should solve #132 . Basically ipython5 added a new type of message reply and that breaks the pweave.

In fact, I was wondering if we should change to capture only the stream response. But that has the limitation of no parent msg_id... :(

DigitalPig commented 5 years ago

Having some troubles replicating the CI build failure but looks like it is due to scipy's deprecated warnings:

--- FIR_design_verb_REF.tex 2018-11-25 03:17:59.643671698 -0500
+++ FIR_design_verb.tex 2018-11-30 13:30:17.621490192 -0500
@@ -117,6 +117,15 @@
 p = figure(2)
 impz(a)
 \end{verbatim}
+\begin{verbatim}
+/home/digitalpig/.conda/envs/pweave/lib/python3.7/site-
+packages/scipy/signal/signaltools.py:1344: FutureWarning: Using a non-
+tuple sequence for multidimensional indexing is deprecated; use
+`arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be
+interpreted as an array index, `arr[np.array(seq)]`, which will result
+either in an error or a different result.
+  out = out_full[ind]
+\end{verbatim}
 \includegraphics[width= \linewidth]{figures/FIR_design_verb_figure2_1.pdf}
 \includegraphics[width= \linewidth]{figures/FIR_design_verb_figure2_2.pdf}

It looks like scipy developers need to update their code to avoid it then.

@mpastell What do you want to do with this?

  1. Update the REF file to include this future warning (may break in the future though)
  2. Pin scipy at an earlier version during unit test?
  3. Merge with the Travis failure?