From 27973e7e32d86d13b8bc48c4c8760e45dcb4f112 Mon Sep 17 00:00:00 2001 From: rocky Date: Sun, 16 Jul 2023 16:35:19 -0400 Subject: [PATCH 1/3] Correct typo in error message pattern --- .gitignore | 5 +++-- mathics/builtin/tensors.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index ccd7736f5..2d93eb961 100644 --- a/.gitignore +++ b/.gitignore @@ -14,9 +14,10 @@ .settings .vscode /.cache +/.gdbinit /.python-version -/Mathics3.egg-info /Mathics.egg-info +/Mathics3.egg-info ChangeLog Documents/ Homepage/ @@ -33,9 +34,9 @@ mathics/doc/tex/logo-heptatom.pdf mathics/doc/tex/logo-text-nodrop.pdf mathics/doc/tex/mathics-*.asy mathics/doc/tex/mathics-*.dvi +mathics/doc/tex/mathics-*.dvi mathics/doc/tex/mathics-*.eps mathics/doc/tex/mathics-*.pdf -mathics/doc/tex/mathics-*.dvi mathics/doc/tex/mathics-*.tex mathics/doc/tex/mathics.aux mathics/doc/tex/mathics.dvi diff --git a/mathics/builtin/tensors.py b/mathics/builtin/tensors.py index 57e8198ab..c76f74486 100644 --- a/mathics/builtin/tensors.py +++ b/mathics/builtin/tensors.py @@ -216,7 +216,7 @@ class Inner(Builtin): messages = { "incom": ( "Length `1` of dimension `2` in `3` is incommensurate with " - "length `4` of dimension 1 in `5." + "length `4` of dimension 1 in `5`." ), } From fa7c3af205e36334288338a1735fe0841b63bb12 Mon Sep 17 00:00:00 2001 From: mmatera Date: Wed, 19 Jul 2023 21:00:53 -0300 Subject: [PATCH 2/3] support for sympy 1.12 --- setup.py | 2 +- test/builtin/calculus/test_solve.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 9917daa4a..ab3663176 100644 --- a/setup.py +++ b/setup.py @@ -52,7 +52,7 @@ INSTALL_REQUIRES += [ "numpy<=1.24", "llvmlite", - "sympy>=1.8, < 1.12", + "sympy>=1.8", # Pillow 9.1.0 supports BigTIFF with big-endian byte order. # ExampleData image hedy.tif is in this format. # Pillow 9.2 handles sunflowers.jpg diff --git a/test/builtin/calculus/test_solve.py b/test/builtin/calculus/test_solve.py index 9d8f37ccb..7b1c79f07 100644 --- a/test/builtin/calculus/test_solve.py +++ b/test/builtin/calculus/test_solve.py @@ -13,13 +13,13 @@ def test_solve(): # the test to fail. (None, None, None), ( - "Solve[{(7+x)*ma == 167, (5+x)*mb == 167, (7+5)*(ma+mb) == 334}, {ma, mb, x}]", + "Solve[{(7+x)*ma == 167, (5+x)*mb == 167, (7+5)*(ma+mb) == 334}, {ma, mb, x}]//Sort", "{{ma -> 1169 / 12 - 167 Sqrt[37] / 12, mb -> -835 / 12 + 167 Sqrt[37] / 12, x -> Sqrt[37]}, {ma -> 1169 / 12 + 167 Sqrt[37] / 12, mb -> -835 / 12 - 167 Sqrt[37] / 12, x -> -Sqrt[37]}}", "Issue63", ), ( - "Solve[{(7+x)*ma == 167, (5+x)*mb == 167, (7+5)*(ma+mb) == 334}, {x, ma, mb}]", - "{{x -> -Sqrt[37], ma -> 1169 / 12 + 167 Sqrt[37] / 12, mb -> -835 / 12 - 167 Sqrt[37] / 12}, {x -> Sqrt[37], ma -> 1169 / 12 - 167 Sqrt[37] / 12, mb -> -835 / 12 + 167 Sqrt[37] / 12}}", + "Solve[{(7+x)*ma == 167, (5+x)*mb == 167, (7+5)*(ma+mb) == 334}, {x, ma, mb}]//Sort", + "{{x -> Sqrt[37], ma -> 1169 / 12 - 167 Sqrt[37] / 12, mb -> -835 / 12 + 167 Sqrt[37] / 12},{x -> -Sqrt[37], ma -> 1169 / 12 + 167 Sqrt[37] / 12, mb -> -835 / 12 - 167 Sqrt[37] / 12}}", "Issue 208", ), ( From 4c00c3f0aa0a317abfd18dba22d44dda63b8a2ed Mon Sep 17 00:00:00 2001 From: rocky Date: Thu, 20 Jul 2023 15:21:02 -0400 Subject: [PATCH 3/3] load builtins in doc2latex --- mathics/doc/latex/doc2latex.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mathics/doc/latex/doc2latex.py b/mathics/doc/latex/doc2latex.py index a1a89c5b3..43371863a 100755 --- a/mathics/doc/latex/doc2latex.py +++ b/mathics/doc/latex/doc2latex.py @@ -30,6 +30,7 @@ import mathics from mathics import __version__, settings, version_string from mathics.core.definitions import Definitions +from mathics.core.load_builtin import import_and_load_builtins from mathics.doc.latex_doc import LaTeXMathicsDocumentation from mathics.eval.pymathics import PyMathicsLoadException, eval_LoadModule @@ -172,7 +173,8 @@ def main(): dest="chapters", metavar="CHAPTER", help="only test CHAPTER(s). " - "You can list multiple chapters by adding a comma (and no space) in between chapter names.", + "You can list multiple chapters by adding a comma (and no space) in between " + "chapter names.", ) parser.add_argument( "--sections", @@ -180,7 +182,8 @@ def main(): dest="sections", metavar="SECTION", help="only test SECTION(s). " - "You can list multiple chapters by adding a comma (and no space) in between chapter names.", + "You can list multiple chapters by adding a comma (and no space) in between " + "chapter names.", ) parser.add_argument( "--load-module", @@ -210,6 +213,9 @@ def main(): # LoadModule Mathics3 modules to pull in modules, and # their docstrings + + import_and_load_builtins() + if args.pymathics: definitions = Definitions(add_builtin=True) for module_name in args.pymathics.split(","):