Skip to content

Commit b8493d8

Browse files
committed
Merge remote-tracking branch 'upstream/master' into meuns_master
Only minor conflicts
2 parents 3fea69f + bc6bc28 commit b8493d8

30 files changed

+4307
-4414
lines changed

.circleci/config.yml

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,44 @@ defaults: &defaults
77
- run:
88
name: Install
99
command: |
10-
sudo pip install pytest
11-
sudo pip install sympy==1.3
10+
sudo pip install -r test_requirements.txt
1211
sudo pip install -e .
13-
sudo pip install pytest-cov
14-
if [[ "$CIRCLE_JOB" == "python-2.7" ]]; then sudo pip install ipython==5.8.0 ; fi
15-
sudo pip install nbval
16-
sudo pip install pytest-xdist
12+
if [ -n "$PIP_EXTRA_INSTALLATION" ]; then
13+
# deliberately not quoted
14+
sudo pip install $PIP_EXTRA_INSTALLATION
15+
fi
16+
sudo pip check
1717
- run:
1818
name: Test
1919
command: |
20-
pytest -n 2 --dist loadscope --cov=galgebra --nbval examples/ipython/ test --current-env --sanitize-with test/.nbval_sanitize.cfg
20+
mkdir test-reports
21+
pytest -n 2 --dist loadscope --cov=galgebra --nbval examples/ipython/ test --current-env --sanitize-with test/.nbval_sanitize.cfg --junitxml=test-reports/junit.xml
2122
- run:
2223
name: Coverage
2324
when: on_success
2425
command: |
2526
sudo pip install codecov
2627
codecov
28+
29+
- store_test_results:
30+
path: test-reports
31+
- store_artifacts:
32+
path: test-reports
33+
2734
jobs:
35+
"python-3.7-symengine":
36+
<<: *defaults
37+
environment:
38+
PIP_EXTRA_INSTALLATION: numpy symengine==0.5.0
39+
USE_SYMENGINE: 1
40+
docker:
41+
- image: circleci/python:3.7
42+
"python-3.7-sympy-1.5":
43+
<<: *defaults
44+
environment:
45+
PIP_EXTRA_INSTALLATION: sympy==1.5
46+
docker:
47+
- image: circleci/python:3.7
2848
"python-3.7":
2949
<<: *defaults
3050
docker:
@@ -37,10 +57,6 @@ jobs:
3757
<<: *defaults
3858
docker:
3959
- image: circleci/python:3.5
40-
"python-3.4":
41-
<<: *defaults
42-
docker:
43-
- image: circleci/python:3.4
4460
"python-2.7":
4561
<<: *defaults
4662
docker:
@@ -50,7 +66,9 @@ workflows:
5066
version: 2
5167
build:
5268
jobs:
69+
- "python-3.7-symengine"
70+
- "python-3.7-sympy-1.5"
5371
- "python-3.7"
5472
- "python-3.6"
55-
- "python-3.4"
73+
- "python-3.5"
5674
- "python-2.7"

.mailmap

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Prevent git from showing duplicate names with commands like "git shortlog"
2+
# See the manpage of git-shortlog for details.
3+
# The syntax is:
4+
# Name that should be used <email that should be used> Bad name <bad email>
5+
#
6+
# You can skip Bad name if it is the same as the one that should be used, and is unique.
7+
#
8+
# This file is up-to-date if the command git log --format="%aN <%aE>" | sort -u
9+
# gives no duplicates.
10+
11+
Alan Bromborsky <[email protected]> brombo <[email protected]>
12+

.travis.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@ matrix:
1111
before_install:
1212
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then lsb_release -a ; fi
1313
install:
14-
- pip install sympy==1.3
14+
- pip install -r test_requirements.txt
1515
- pip install -e .
16-
- pip install pytest-cov
17-
- if [[ "$TRAVIS_PYTHON_VERSION" == 2.7 ]]; then pip install ipython==5.8.0 ; fi
18-
- pip install nbval
19-
- pip install pytest-xdist
16+
- pip check
2017
script:
2118
- pytest -n 2 --dist loadscope --cov=galgebra --nbval examples/ipython/ test --current-env --sanitize-with test/.nbval_sanitize.cfg
2219
after_success:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Installing GAlgebra
108108
### Prerequisites
109109

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

114114
Note:

doc/changelog.rst

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,23 @@
22
Changelog
33
=========
44

5+
- :bug:`151` ``Dop([], ga=ga)`` and ``Sdop([], ga=ga)`` now evaluate to multiplication by zero, not by one.
6+
Multiplication by one can as always be spelt ``Dop([(S(1), ga.Pdop_identity)], ga=ga)``.
7+
- :bug:`177` :class:`~galgebra.mv.Dop` objects that evaluate to ``0`` no longer raise cryptic ``ValueError``\ s when operated on.
8+
- :support:`175` ``Dop.flatten_one_level`` has been removed, use ``itertools.chain.from_iterable`` for this functionality.
9+
- :feature:`172` :data:`galgebra.__version__` has been added, which contains the version string.
10+
- :feature:`164` (and :issue:`169`, :issue:`170`) Sympy 1.5 is officially supported and tested.
11+
- :support:`167` Python 3.4 is no longer supported.
12+
- :bug:`165` :func:`galgebra.metric.linear_expand` no longer accepts a mode argument, as this did not work properly.
13+
For the old behavior of ``linear_expand(x, mode=True)``, use ``linear_expand_terms(x)`` instead.
14+
- :bug:`151` (also :issue:`150`) :class:`~galgebra.mv.Dop`, :class:`~galgebra.mv.Sdop`, and :class:`~galgebra.mv.Pdop` no longer have mutating methods.
15+
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!
16+
- :bug:`134` :attr:`~galgebra.ga.Ga.dot_table_dict` now contains correct values (zero) for scalar keys
17+
- :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.
18+
- :bug:`81` (also :issue:`180`) Passing coefficients as ``Mv(coefs, 'odd', ga=ga)`` is forbidden.
19+
- :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.
520
- :feature:`78` :meth:`~galgebra.ga.Ga.grads` now raises a better error when it fails, and is faster.
6-
- :support:`72` Other internal cleanup
21+
- :support:`72` Other internal cleanup.
722
- :feature:`66` (also :issue:`67`, :issue:`71`) Remove unused code in the public API:
823

924
* ``Ga.mul_table``, ``Ga.wedge_table``, ``Ga.dot_table``, ``Ga.left_contract_table``,
@@ -16,10 +31,20 @@ Changelog
1631
- :bug:`61` Make contraction and Hestenes dot products thread-safe.
1732
Previously these relied on the :attr:`~galgebra.ga.Ga.dot_mode` setting not being changed mid-operation.
1833
The :meth:`~galgebra.ga.Ga.dot` method still respects this setting, but is no longer used internally.
19-
- :bug:`60` Make :meth:`~galgebra.mv.Mv.blade_rep` and :meth:`~galgebra.mv.Mv.base_rep` not mutate the object they are called on.
20-
Any code relying on this behavior will need to change from ``x.base_rep()`` to ``x = x.base_rep()``.
34+
- :bug:`60` (also :issue:`141`) Make the following operations on :class:`galgebra.mv.Mv` non-mutating:
35+
36+
* :meth:`~galgebra.mv.Mv.blade_rep`
37+
* :meth:`~galgebra.mv.Mv.base_rep`
38+
* :meth:`~galgebra.mv.Mv.diff`
39+
* :meth:`~galgebra.mv.Mv.simplify`
40+
* :meth:`~galgebra.mv.Mv.expand`
41+
* :meth:`~galgebra.mv.Mv.collect`
42+
* ``print(mv)``
43+
44+
Any code relying on this behavior will need to change from ``x.method()`` to ``x = x.method()``.
45+
Note that the latter syntax was always supported even before this change.
46+
2147
- :support:`59` (also :issue:`65`) Make internal helper functions private.
22-
- :support:`57` (also :issue:`58`) Clean up the ``Mv(name, 'category')`` constructors to produce better error messages.
2348
- :support:`55` Rename ``*kargs`` to ``*args`` internally, to match convention.
2449
This has no effect on callers, but makes the docs and source easier to read.
2550
- :feature:`50` (also :issue:`51`, :issue:`56`) Improve documentation formatting:

examples/LaTeX/groups.tex

Lines changed: 0 additions & 141 deletions
This file was deleted.

examples/LaTeX/latex_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def noneuclidian_distance_calculation():
231231
W = W.subs(c**2,(C+1)/2)
232232
W = W.subs(s**2,(C-1)/2)
233233
W = simplify(W)
234-
W = W.subs(1/Binv,Bmag)
234+
W = W.subs(Binv,1/Bmag)
235235
W = expand(W)
236236

237237
print('#%S = \\f{\\sinh}{\\alpha} \\text{ and } C = \\f{\\cosh}{\\alpha}')

examples/LaTeX/simple_check_latex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def main():
5858
basic_multivector_operations_2D()
5959

6060
# xpdf('simple_test_latex.tex')
61-
xpdf('simple_test_latex.tex', pdfprog=None)
61+
xpdf('simple_check_latex.tex', pdfprog=None)
6262
return
6363

6464
if __name__ == "__main__":

examples/Old Format/latex_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def noneuclidian_distance_calculation():
219219
W = W.subs(c**2,(C+1)/2)
220220
W = W.subs(s**2,(C-1)/2)
221221
W = simplify(W)
222-
W = W.subs(1/Binv,Bmag)
222+
W = W.subs(Binv,1/Bmag)
223223
W = expand(W)
224224

225225
print('#%S = \\f{\\sinh}{\\alpha} \\text{ and } C = \\f{\\cosh}{\\alpha}')

examples/Terminal/rotations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ def main():
5353

5454
R_th = cos(th/2)+I*e_phi*sin(th/2)
5555
R_th_rev = R_th.rev()
56-
print(R_th)
57-
print(R_th_rev)
56+
print(R_th.trigsimp())
57+
print(R_th_rev.trigsimp())
5858

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

examples/Terminal/terminal_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def noneuclidian_distance_calculation():
228228
W = W.subs(c**2,(C+1)/2)
229229
W = W.subs(s**2,(C-1)/2)
230230
W = simplify(W)
231-
W = W.subs(1/Binv,Bmag)
231+
W = W.subs(Binv,1/Bmag)
232232
W = expand(W)
233233

234234
print('S = sinh(alpha) and C = cosh(alpha)')

0 commit comments

Comments
 (0)