removes an import from the temporary build folder.
Added Github actions for OSX and Linux that installs the module and run tutorial.py on OSX and Linux using python3.7 and python3.9. Use it if you like.
Tweaks setup.py. Pinned semver to 1.12.0 to fix #122
The Github actions runs studies/tutorial/turtorial.py which passes on my local machines but fails in GitHub pipeline with the following error.
File "/opt/hostedtoolcache/Python/3.7.11/x64/lib/python3.7/site-packages/epimargin-0.5.2-py3.7.egg/epimargin/models.py", line 151, in parallel_forward_epi_step
S = max(0, S)
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
This is most likely because S is np.array when tutorial.py is run and max(0, S) didn't like it.
Here is a small test case.
In [1]: import numpy as np
In [2]: a = np.random.random(10)
In [3]: a
Out[3]:
array([0.74161063, 0.13805871, 0.28817543, 0.12530074, 0.79157786,
0.32060232, 0.33857339, 0.94873227, 0.36442055, 0.65926711])
In [4]: max(0, a)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-4-beaec02e5a36> in <module>
----> 1 max(0, a)
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
I made a few tweaks in tutorial.py. matplotlib.pyplot.foo is available as plots.plt.foo. That is probably not the UX you want. You can call from matplotlib.pyplot import * at the end of plots.py so that matplotlib.pyplot.foo is available as plots.foo if the original UX is desired. I personally like linters and type checking but keeping them happy all the time is not essential for this review.
My editor has stripped spaces at the end of lines :(. Those were unintentional, some plugin is responsible for it but can't pinpoint which one. Let me know if I need to revert those changes.
build
folder.setup.py
. Pinned semver to 1.12.0 to fix #122studies/tutorial/turtorial.py
which passes on my local machines but fails in GitHub pipeline with the following error.This is most likely because
S
isnp.array
when tutorial.py is run andmax(0, S)
didn't like it.Here is a small test case.
tutorial.py
.matplotlib.pyplot.foo
is available asplots.plt.foo
. That is probably not the UX you want. You can callfrom matplotlib.pyplot import *
at the end ofplots.py
so thatmatplotlib.pyplot.foo
is available asplots.foo
if the original UX is desired. I personally like linters and type checking but keeping them happy all the time is not essential for this review.Related: https://github.com/openjournals/joss-reviews/issues/3464