Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into meuns_master
Browse files Browse the repository at this point in the history
Only minor conflicts
  • Loading branch information
eric-wieser committed Dec 19, 2019
2 parents 3fea69f + bc6bc28 commit b8493d8
Show file tree
Hide file tree
Showing 30 changed files with 4,307 additions and 4,414 deletions.
42 changes: 30 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,44 @@ defaults: &defaults
- run:
name: Install
command: |
sudo pip install pytest
sudo pip install sympy==1.3
sudo pip install -r test_requirements.txt
sudo pip install -e .
sudo pip install pytest-cov
if [[ "$CIRCLE_JOB" == "python-2.7" ]]; then sudo pip install ipython==5.8.0 ; fi
sudo pip install nbval
sudo pip install pytest-xdist
if [ -n "$PIP_EXTRA_INSTALLATION" ]; then
# deliberately not quoted
sudo pip install $PIP_EXTRA_INSTALLATION
fi
sudo pip check
- run:
name: Test
command: |
pytest -n 2 --dist loadscope --cov=galgebra --nbval examples/ipython/ test --current-env --sanitize-with test/.nbval_sanitize.cfg
mkdir test-reports
pytest -n 2 --dist loadscope --cov=galgebra --nbval examples/ipython/ test --current-env --sanitize-with test/.nbval_sanitize.cfg --junitxml=test-reports/junit.xml
- run:
name: Coverage
when: on_success
command: |
sudo pip install codecov
codecov
- store_test_results:
path: test-reports
- store_artifacts:
path: test-reports

jobs:
"python-3.7-symengine":
<<: *defaults
environment:
PIP_EXTRA_INSTALLATION: numpy symengine==0.5.0
USE_SYMENGINE: 1
docker:
- image: circleci/python:3.7
"python-3.7-sympy-1.5":
<<: *defaults
environment:
PIP_EXTRA_INSTALLATION: sympy==1.5
docker:
- image: circleci/python:3.7
"python-3.7":
<<: *defaults
docker:
Expand All @@ -37,10 +57,6 @@ jobs:
<<: *defaults
docker:
- image: circleci/python:3.5
"python-3.4":
<<: *defaults
docker:
- image: circleci/python:3.4
"python-2.7":
<<: *defaults
docker:
Expand All @@ -50,7 +66,9 @@ workflows:
version: 2
build:
jobs:
- "python-3.7-symengine"
- "python-3.7-sympy-1.5"
- "python-3.7"
- "python-3.6"
- "python-3.4"
- "python-3.5"
- "python-2.7"
12 changes: 12 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Prevent git from showing duplicate names with commands like "git shortlog"
# See the manpage of git-shortlog for details.
# The syntax is:
# Name that should be used <email that should be used> Bad name <bad email>
#
# You can skip Bad name if it is the same as the one that should be used, and is unique.
#
# This file is up-to-date if the command git log --format="%aN <%aE>" | sort -u
# gives no duplicates.

Alan Bromborsky <abrombo@users.noreply.github.com> brombo <abrombo@verizon.net>
Alan Bromborsky <abrombo@users.noreply.github.com> <abrombo@verizon.net>
7 changes: 2 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,9 @@ matrix:
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then lsb_release -a ; fi
install:
- pip install sympy==1.3
- pip install -r test_requirements.txt
- pip install -e .
- pip install pytest-cov
- if [[ "$TRAVIS_PYTHON_VERSION" == 2.7 ]]; then pip install ipython==5.8.0 ; fi
- pip install nbval
- pip install pytest-xdist
- pip check
script:
- pytest -n 2 --dist loadscope --cov=galgebra --nbval examples/ipython/ test --current-env --sanitize-with test/.nbval_sanitize.cfg
after_success:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Installing GAlgebra
### Prerequisites

- Works on Linux, Windows, Mac OSX
- [Python](https://www.python.org/) 2.7 or 3
- [Python](https://www.python.org/) 2.7 or >=3.5
- [SymPy](https://www.sympy.org)

Note:
Expand Down
33 changes: 29 additions & 4 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,23 @@
Changelog
=========

- :bug:`151` ``Dop([], ga=ga)`` and ``Sdop([], ga=ga)`` now evaluate to multiplication by zero, not by one.
Multiplication by one can as always be spelt ``Dop([(S(1), ga.Pdop_identity)], ga=ga)``.
- :bug:`177` :class:`~galgebra.mv.Dop` objects that evaluate to ``0`` no longer raise cryptic ``ValueError``\ s when operated on.
- :support:`175` ``Dop.flatten_one_level`` has been removed, use ``itertools.chain.from_iterable`` for this functionality.
- :feature:`172` :data:`galgebra.__version__` has been added, which contains the version string.
- :feature:`164` (and :issue:`169`, :issue:`170`) Sympy 1.5 is officially supported and tested.
- :support:`167` Python 3.4 is no longer supported.
- :bug:`165` :func:`galgebra.metric.linear_expand` no longer accepts a mode argument, as this did not work properly.
For the old behavior of ``linear_expand(x, mode=True)``, use ``linear_expand_terms(x)`` instead.
- :bug:`151` (also :issue:`150`) :class:`~galgebra.mv.Dop`, :class:`~galgebra.mv.Sdop`, and :class:`~galgebra.mv.Pdop` no longer have mutating methods.
This fixed issues where not only would the laplacian be sometimes calculated incorrectly, but its correctness would vary depending on whether it had been printed!
- :bug:`134` :attr:`~galgebra.ga.Ga.dot_table_dict` now contains correct values (zero) for scalar keys
- :bug:`90` :attr:`~galgebra.ga.Ga.blades`, :attr:`~galgebra.ga.Ga.bases`, and :attr:`~galgebra.ga.Ga.indices` now reference the scalar ``S(0)`` as the single grade-0 object. Previously they listed no grade 0 objects.
- :bug:`81` (also :issue:`180`) Passing coefficients as ``Mv(coefs, 'odd', ga=ga)`` is forbidden.
- :bug:`80` (also :issue:`57`, :issue:`58`, :issue:`97`) The :class:`galgebra.mv.Mv` constructor no longer silently accepts illegal arguments, and produces better error messages.
- :feature:`78` :meth:`~galgebra.ga.Ga.grads` now raises a better error when it fails, and is faster.
- :support:`72` Other internal cleanup
- :support:`72` Other internal cleanup.
- :feature:`66` (also :issue:`67`, :issue:`71`) Remove unused code in the public API:

* ``Ga.mul_table``, ``Ga.wedge_table``, ``Ga.dot_table``, ``Ga.left_contract_table``,
Expand All @@ -16,10 +31,20 @@ Changelog
- :bug:`61` Make contraction and Hestenes dot products thread-safe.
Previously these relied on the :attr:`~galgebra.ga.Ga.dot_mode` setting not being changed mid-operation.
The :meth:`~galgebra.ga.Ga.dot` method still respects this setting, but is no longer used internally.
- :bug:`60` Make :meth:`~galgebra.mv.Mv.blade_rep` and :meth:`~galgebra.mv.Mv.base_rep` not mutate the object they are called on.
Any code relying on this behavior will need to change from ``x.base_rep()`` to ``x = x.base_rep()``.
- :bug:`60` (also :issue:`141`) Make the following operations on :class:`galgebra.mv.Mv` non-mutating:

* :meth:`~galgebra.mv.Mv.blade_rep`
* :meth:`~galgebra.mv.Mv.base_rep`
* :meth:`~galgebra.mv.Mv.diff`
* :meth:`~galgebra.mv.Mv.simplify`
* :meth:`~galgebra.mv.Mv.expand`
* :meth:`~galgebra.mv.Mv.collect`
* ``print(mv)``

Any code relying on this behavior will need to change from ``x.method()`` to ``x = x.method()``.
Note that the latter syntax was always supported even before this change.

- :support:`59` (also :issue:`65`) Make internal helper functions private.
- :support:`57` (also :issue:`58`) Clean up the ``Mv(name, 'category')`` constructors to produce better error messages.
- :support:`55` Rename ``*kargs`` to ``*args`` internally, to match convention.
This has no effect on callers, but makes the docs and source easier to read.
- :feature:`50` (also :issue:`51`, :issue:`56`) Improve documentation formatting:
Expand Down
141 changes: 0 additions & 141 deletions examples/LaTeX/groups.tex

This file was deleted.

2 changes: 1 addition & 1 deletion examples/LaTeX/latex_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def noneuclidian_distance_calculation():
W = W.subs(c**2,(C+1)/2)
W = W.subs(s**2,(C-1)/2)
W = simplify(W)
W = W.subs(1/Binv,Bmag)
W = W.subs(Binv,1/Bmag)
W = expand(W)

print('#%S = \\f{\\sinh}{\\alpha} \\text{ and } C = \\f{\\cosh}{\\alpha}')
Expand Down
2 changes: 1 addition & 1 deletion examples/LaTeX/simple_check_latex.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def main():
basic_multivector_operations_2D()

# xpdf('simple_test_latex.tex')
xpdf('simple_test_latex.tex', pdfprog=None)
xpdf('simple_check_latex.tex', pdfprog=None)
return

if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion examples/Old Format/latex_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def noneuclidian_distance_calculation():
W = W.subs(c**2,(C+1)/2)
W = W.subs(s**2,(C-1)/2)
W = simplify(W)
W = W.subs(1/Binv,Bmag)
W = W.subs(Binv,1/Bmag)
W = expand(W)

print('#%S = \\f{\\sinh}{\\alpha} \\text{ and } C = \\f{\\cosh}{\\alpha}')
Expand Down
4 changes: 2 additions & 2 deletions examples/Terminal/rotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def main():

R_th = cos(th/2)+I*e_phi*sin(th/2)
R_th_rev = R_th.rev()
print(R_th)
print(R_th_rev)
print(R_th.trigsimp())
print(R_th_rev.trigsimp())

e_r = (R_th*R_phi*ex*R_phi_rev*R_th_rev).trigsimp()

Expand Down
2 changes: 1 addition & 1 deletion examples/Terminal/terminal_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def noneuclidian_distance_calculation():
W = W.subs(c**2,(C+1)/2)
W = W.subs(s**2,(C-1)/2)
W = simplify(W)
W = W.subs(1/Binv,Bmag)
W = W.subs(Binv,1/Bmag)
W = expand(W)

print('S = sinh(alpha) and C = cosh(alpha)')
Expand Down
Loading

0 comments on commit b8493d8

Please sign in to comment.