Skip to content

Commit

Permalink
v0.9.4 for compatiblility with sympy >=1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
gutow committed Aug 11, 2022
1 parent 259730d commit cb25d40
Show file tree
Hide file tree
Showing 10 changed files with 3,644 additions and 3,622 deletions.
12 changes: 2 additions & 10 deletions Development Notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,13 @@

1. Make sure pdoc is installed and updated in the virtual environment `pip
install -U pdoc`.
2. The main README is used as the first page of the documentation. However,
the location requires some of the links to the images to be changed. So
a copy of the file needs to be made and edited (will automate if this
becomes standard).
* Copy of README.md from the root level to `docs/intro.md`.
* In the copy for each relative reference `src = "docs/resources/..."`
remove `docs/` so that they read `src = "resources/..."`.
* DO NOT change absolute (full url) paths.
2. Update any `.md` files included in `_init_.py`.
* Generally URLs should be absolute, not relative.
3. At the root level run pdoc `pdoc
--logo https://gutow.github.io/Algebra_with_Sympy/alg_w_sympy.svg
--logo-link https://gutow.github.io/Algebra_with_Sympy/
--footer-text "Algebra with Sympy vX.X.X" --math -html -o docs algebra_with_sympy`
where `X.X.X` is the version number.
4. Edit the created `index.html`, if necessary, to point to an alternate
homepage from the pdoc default.

### Tasks for Documentation
* Readme.md & intro.md
Expand Down
7 changes: 7 additions & 0 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ github](https://github.com/gutow/Algebra_with_Sympy/issues).

#### Change Log

* 0.9.4
* Update to deal with new Sympy function `piecewise_exclusive` in v1.11.
* Added user warning if a function does not extend for use with `Equations`
as expected. This also allows the package to be used even when a function
extension does fail.
* Simplification of documentation preparation.
* Typo fixes in preparser error messages.
* 0.9.3
* Added check for new enough version of IPython to use the preparser.
* If IPython version too old, issue warning and do not accept `=@` shorthand.
Expand Down
2 changes: 1 addition & 1 deletion algebra_with_sympy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
.. include:: ../docs/intro.md
.. include:: ../ReadMe.md
"""
__docformat__ = "numpy"

Expand Down
15 changes: 11 additions & 4 deletions algebra_with_sympy/algebraic_equation.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,8 +813,15 @@ def __new__(cls, *args, **kwargs):
'unbranched_argument', 'polarify', 'unpolarify',
'piecewise_fold', 'E1', 'Eijk', 'bspline_basis',
'bspline_basis_set', 'interpolating_spline', 'jn_zeros',
'jacobi_normalized', 'Ynm_c')
'jacobi_normalized', 'Ynm_c', 'piecewise_exclusive')
if func not in skip:
execstr = 'class ' + str(func) + '(' + str(
func) + ',EqnFunction):\n pass\n'
exec(execstr, globals(), locals())
try:
execstr = 'class ' + str(func) + '(' + str(
func) + ',EqnFunction):\n pass\n'
exec(execstr, globals(), locals())
except TypeError:
from warnings import warn
warn('SymPy function/operation '+str(func)+ ' may not work ' \
'properly with Equations. If you use it with Equations, ' \
'validate its behavior. We are working to address this ' \
'issue.')
2 changes: 1 addition & 1 deletion algebra_with_sympy/preparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def algebra_with_sympy_preparser(lines):
if len(eqsplit)!=2:
raise ValueError('The two sides of the equation must be' \
' separated by an \"=\" sign when using' \
' the \"=*\" special input method.')
' the \"=@\" special input method.')
templine =''
if eqsplit[0]!='' and eqsplit[1]!='':
if linesplit[0]!='':
Expand Down
15 changes: 12 additions & 3 deletions docs/algebra_with_sympy.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h2>Submodules</h2>
</ul>


<footer>Algebra with Sympy v0.9.3</footer>
<footer>Algebra with Sympy v0.9.4</footer>

<a class="attribution" title="pdoc: Python API documentation generator" href="https://pdoc.dev" target="_blank">
built with <span class="visually-hidden">pdoc</span><img
Expand Down Expand Up @@ -178,10 +178,19 @@ <h4 id="issues-or-comments">Issues or Comments</h4>
<h4 id="change-log">Change Log</h4>

<ul>
<li>0.9.4
<ul>
<li>Update to deal with new Sympy function <code>piecewise_exclusive</code> in v1.11.</li>
<li>Added user warning if a function does not extend for use with <code>Equations</code>
as expected. This also allows the package to be used even when a function
extension does fail.</li>
<li>Simplification of documentation preparation.</li>
<li>Typo fixes in preparser error messages.</li>
</ul></li>
<li>0.9.3
<ul>
<li>Added check for new enough version of IPython to use the preparser.</li>
<li>If IPython version too old issue, warning and do not accept <code>=@</code> shorthand.</li>
<li>If IPython version too old, issue warning and do not accept <code>=@</code> shorthand.</li>
</ul></li>
<li>0.9.2
<ul>
Expand Down Expand Up @@ -222,7 +231,7 @@ <h5 id="this-software-is-distributed-under-the-gnu-v3-licensehttpsgnuorglicenses
<label class="view-source-button" for="algebra_with_sympy-view-source"><span>View Source</span></label>

<div class="pdoc-code codehilite"><pre><span></span><span id="L-1"><a href="#L-1"><span class="linenos"> 1</span></a><span class="sd">&quot;&quot;&quot;</span>
</span><span id="L-2"><a href="#L-2"><span class="linenos"> 2</span></a><span class="sd">.. include:: ../docs/intro.md</span>
</span><span id="L-2"><a href="#L-2"><span class="linenos"> 2</span></a><span class="sd">.. include:: ../ReadMe.md</span>
</span><span id="L-3"><a href="#L-3"><span class="linenos"> 3</span></a><span class="sd">&quot;&quot;&quot;</span>
</span><span id="L-4"><a href="#L-4"><span class="linenos"> 4</span></a><span class="n">__docformat__</span> <span class="o">=</span> <span class="s2">&quot;numpy&quot;</span>
</span><span id="L-5"><a href="#L-5"><span class="linenos"> 5</span></a>
Expand Down
Loading

0 comments on commit cb25d40

Please sign in to comment.