Skip to content

Commit c7e7af1

Browse files
committed
merge with master
2 parents 5403e74 + 6e0ee05 commit c7e7af1

File tree

99 files changed

+1644
-674
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+1644
-674
lines changed

.mailmap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,3 +177,6 @@ Peter Brady <[email protected]> peter <[email protected]>
177177
Craig A. Stoudt <[email protected]> cstoudt <[email protected]>
178178
179179
John V. Siratt <[email protected]> John Siratt <[email protected]>
180+
Ted Dokos <[email protected]> ted-dokos <[email protected]>
181+
Akshat Jain <[email protected]> akshat_jain <[email protected]>
182+

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ env:
77
- SPLIT="3/4"
88
- SPLIT="4/4"
99
global:
10-
secure: uJycOcgT3Rg9TsU6ID2UMHc56Fh6Q70p1/mFiod8r97g8zER9kWTZ2GVDSRiw1Nfh0Wojcy04PAG3t5m9bwM08YF8qZy1PJkCb/pu7PN8Hzt+6FSBb84gGEXMiv1xuZWSQ0pUuBa1Lfcxuq6m2/eA8aNfgoqnpLgR8zeg/2xhFw=
10+
secure: "SyoeHaDi9vRPJ5X0JFY5/nQif66u+fehtqUg7F8ILoNrwugJcs+u4VZm1sJ7Cv2h6uGoNRAfkkrahxxj2mKCgpqbY2MdDAZ+ru5wn5R0NjYjTpEz7ET4Xq5o+gca+mhFMkiutYihM73+AaIKCX0vfC9yb8WBPXzbbrv8vVvQr6Y="
1111
python:
1212
- 2.6
1313
- 2.7
@@ -122,7 +122,8 @@ install:
122122
fi
123123
script:
124124
- bin/test_travis.sh
125+
# - if [[ "${TEST_SPHINX}" == "true" ]]; then
126+
# bin/deploy_doc.sh;
127+
# fi
125128
notifications:
126129
email: false
127-
after_success:
128-
- bin/build_doc.sh

AUTHORS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,3 +368,6 @@ Hamish Dickson <[email protected]>
368368
Michael Gallaspy <[email protected]>
369369
Roman Inflianskas <[email protected]>
370370
Duane Nykamp <[email protected]>
371+
Ted Dokos <[email protected]>
372+
Sunny Aggarwal <[email protected]>
373+
Akshat Jain <[email protected]>

bin/build_doc.sh renamed to bin/deploy_doc.sh

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
#
88
# Following is the procedure to get the access token:
99
#
10-
# $ curl -X POST -u <github_username> -H "Content-Type: application/json" -d\
11-
# "{\"scopes\":[\"public_repo\"],\"note\":\"token for pushing from travis\"}"\
12-
# https://api.github.com/authorizations
10+
# $ curl -X POST -u <github_username> -H "Content-Type: application/json" -H "X-GitHub-OTP: 2FA_TOKEN" -d "{\"scopes\":[\"public_repo\"],\"note\":\"token for pushing from Travis for SymPy\"}" https://api.github.com/authorizations
11+
#
12+
# Replace 2FA_TOKEN with your two-factor token generated by SMS or the
13+
# application.
1314
#
1415
# It'll give you a JSON response having a key called "token".
1516
#
@@ -24,20 +25,9 @@
2425
# Exit on error
2526
set -e
2627

27-
ACTUAL_TRAVIS_JOB_NUMBER=`echo $TRAVIS_JOB_NUMBER| cut -d'.' -f 2`
28-
29-
if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$ACTUAL_TRAVIS_JOB_NUMBER" == "1" ]; then
30-
31-
echo "Installing dependencies"
32-
sudo apt-get install --no-install-recommends graphviz inkscape texlive texlive-xetex texlive-fonts-recommended texlive-latex-extra lmodern librsvg2-bin imagemagick docbook2x
33-
pip install "sphinx==1.1.3"
34-
35-
echo -e "Building docs"
36-
cd doc
37-
make clean
38-
make html
28+
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
3929

40-
cd ../../
30+
cd ../
4131
echo -e "Setting git attributes"
4232
git config --global user.email "[email protected]"
4333
git config --global user.name "SymPy (Travis CI)"
@@ -48,12 +38,16 @@ if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$ACTUAL_TRAVIS_JOB_NUMBER" == "1"
4838
cd gh-pages
4939
git remote rm origin
5040
git remote add origin https://${GH_TOKEN}@github.com/sympy/sympy_doc.git > /dev/null 2>&1
41+
git fetch origin > /dev/null 2>&1
42+
git branch --set-upstream-to=origin/gh-pages gh-pages
5143
rm -rf dev/
5244
cp -R ../sympy/doc/_build/html dev/
5345
git add -A dev/
5446
./generate_indexes.py
5547

5648
git commit -am "Update dev doc after building $TRAVIS_BUILD_NUMBER"
49+
echo -e "Pulling"
50+
git pull > /dev/null 2>&1
5751
echo -e "Pushing commit"
58-
git push -fq origin gh-pages > /dev/null 2>&1
52+
git push -q origin gh-pages > /dev/null 2>&1
5953
fi

bin/mailmap_update.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# - Check doc/src/aboutus.rst
88
# - Make it easier to update .mailmap or AUTHORS with the correct entries.
99

10+
from __future__ import unicode_literals
1011
from __future__ import print_function
1112

1213
import os
@@ -46,7 +47,7 @@
4647
os.path.pardir, "AUTHORS"))) as fd:
4748
AUTHORS = unicode(fd.read(), 'utf-8')
4849

49-
firstauthor = u"Ondřej Čertík"
50+
firstauthor = "Ondřej Čertík"
5051

5152
authors = AUTHORS[AUTHORS.find(firstauthor):].strip().split('\n')
5253

bin/test_isolated

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,15 @@ def main():
107107
parser.error("too many arguments")
108108
if options.nosetests:
109109
if options.verbose:
110-
print "Generating nosetests isolated testsuite..."
110+
print("Generating nosetests isolated testsuite...")
111111
generate_test_script2("nosetests")
112112
else:
113113
if options.verbose:
114-
print "Generating py.test isolated testsuite..."
114+
print("Generating py.test isolated testsuite...")
115115
generate_test_script1("py.test")
116116
if options.verbose:
117-
print "Done. Run (search for 'COMMIT' in the less environment):"
118-
print "/tmp/test_sympy.sh | less"
117+
print("Done. Run (search for 'COMMIT' in the less environment):")
118+
print("/tmp/test_sympy.sh | less")
119119

120120
if __name__ == "__main__":
121121
main()

bin/test_travis.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ set -x
88
if [[ "${TEST_SPHINX}" == "true" ]]; then
99
cd doc
1010
make html-errors
11-
make clean
1211
make man
1312
make latex
1413
cd _build/latex

doc/src/aboutus.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,9 @@ want to be mentioned here, so see our repository history for a full list).
373373
#. Michael Gallaspy: improve handling of inequalities involving RootOf
374374
#. Roman Inflianskas: add svg support to preview
375375
#. Duane Nykamp: improved function handling in parse_expr
376+
#. Ted Dokos: implemented interleaving for unions
377+
#. Sunny Aggarwal: fix Integral.transform method
378+
#. Akshat Jain: nsimplify returns ints quickly
376379

377380
Up-to-date list in the order of the first contribution is given in the `AUTHORS
378381
<https://github.com/sympy/sympy/blob/master/AUTHORS>`_ file.

sympy/categories/baseclasses.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import print_function, division
22

3-
from sympy.core import Basic, Dict, Symbol, Tuple
3+
from sympy.core import S, Basic, Dict, Symbol, Tuple
44
from sympy.core.compatibility import xrange, iterable
55
from sympy.sets import Set, FiniteSet, EmptySet
66

@@ -722,8 +722,8 @@ def __new__(cls, *args):
722722

723723
for morphism in conclusions_arg:
724724
# Check that no new objects appear in conclusions.
725-
if (morphism.domain in objects) and \
726-
(morphism.codomain in objects):
725+
if ((objects.contains(morphism.domain) == S.true) and
726+
(objects.contains(morphism.codomain) == S.true)):
727727
# No need to add identities and recurse
728728
# composites this time.
729729
Diagram._add_morphism_closure(
@@ -920,12 +920,14 @@ def subdiagram_from_objects(self, objects):
920920

921921
new_premises = {}
922922
for morphism, props in self.premises.items():
923-
if (morphism.domain in objects) and (morphism.codomain in objects):
923+
if ((objects.contains(morphism.domain) == S.true) and
924+
(objects.contains(morphism.codomain) == S.true)):
924925
new_premises[morphism] = props
925926

926927
new_conclusions = {}
927928
for morphism, props in self.conclusions.items():
928-
if (morphism.domain in objects) and (morphism.codomain in objects):
929+
if ((objects.contains(morphism.domain) == S.true) and
930+
(objects.contains(morphism.codomain) == S.true)):
929931
new_conclusions[morphism] = props
930932

931933
return Diagram(new_premises, new_conclusions)

sympy/combinatorics/tests/test_prufer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ def test_prufer():
2424

2525
# accept iterables but convert to list of lists
2626
tree = [(0, 1), (1, 5), (0, 3), (0, 2), (2, 6), (4, 7), (2, 4)]
27-
Prufer(tree).tree_repr == tree
28-
Prufer(set(tree)).tree_repr == tree
27+
tree_lists = [list(t) for t in tree]
28+
assert Prufer(tree).tree_repr == tree_lists
29+
assert sorted(Prufer(set(tree)).tree_repr) == sorted(tree_lists)
2930

3031
raises(ValueError, lambda: Prufer([[1, 2], [3, 4]])) # 0 is missing
3132
assert Prufer(*Prufer.edges([1, 2], [3, 4])).prufer_repr == [1, 3]

0 commit comments

Comments
 (0)