Skip to content

Commit 7719b83

Browse files
committed
merge
2 parents 117d6e3 + 96911dd commit 7719b83

35 files changed

Lines changed: 1500 additions & 1311 deletions

.github/workflows/osx.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@ jobs:
2424
brew install llvm@9
2525
python -m pip install --upgrade pip
2626
LLVM_CONFIG=/usr/local/Cellar/llvm@9/9.0.1_2/bin/llvm-config pip install llvmlite
27-
python -m pip install -e git://github.com/Mathics3/mathics-scanner.git#egg=Mathics_Scanner
2827
- name: Install Mathics
2928
run: |
30-
make
29+
make develop
3130
- name: Test Mathics
3231
run: |
3332
pip install pytest pexpect

.github/workflows/ubuntu.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,10 @@ jobs:
2222
run: |
2323
sudo apt-get update -qq && sudo apt-get install -qq liblapack-dev llvm-dev
2424
python -m pip install --upgrade pip
25-
python -m pip install -e git://github.com/Mathics3/mathics-scanner.git#egg=Mathics_Scanner
2625
- name: Install Mathics
2726
run: |
2827
sed -i "s/'sympy==[0-9]\.[0-9]\.[0-9]', //" setup.py
29-
make
28+
make develop
3029
- name: Test Mathics
3130
run: |
3231
pip install pytest pexpect

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ before_install:
1919
- pip install ipywidgets ipykernel requests IPython==5.0.0 langid pycountry pyenchant lxml matplotlib unittest2 pexpect
2020
- python travis.py
2121
- pip install cython
22-
- pip install -e git://github.com/Mathics3/mathics-scanner.git#egg=Mathics_Scanner
2322
install:
2423
- sed -i "s/'sympy==[0-9]\.[0-9]\.[0-9]', //" setup.py
2524
- make develop

CHANGES.rst

Lines changed: 79 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,81 @@ CHANGES
44
2.0.0
55
-----
66

7-
The Django front-end has been unbundled and is a separate `PyPI installable package <https://pypi.org/project/Mathics-Django/>`_.
7+
In order to accomdate growth and increase use pieces of Mathics inside other packages, some parts of
8+
Mathics have been split off and moved to separately installable packages. In particular:
9+
10+
* The Django front-end `PyPI installable package <https://pypi.org/project/Mathics-Django/>`_.
11+
* Scanner routines and character translations tables to/from unicode and noting some character properties
12+
* Specific builtins involving heavy, non-standard routines were moved to pymathics modules.
13+
14+
15+
Incompatible changes:
16+
+++++++++++++++++++++
17+
18+
* `-e` `--execute` is better suited for embedded use. It shows just evaluation output as text.
19+
820

921
New builtins
10-
++++++++++++++
22+
++++++++++++
1123

1224
- ``TimeRemaining`` and ``TimeConstrained``
1325
-``MathicsVersion`` (this is not in WL)
1426
- ``\[RadicalBox]``
15-
- ``FirstCase``, ``Lookup``
16-
- ``Catalan``, ``LerchPhi``
17-
- ``System`ConvertersDump`` context variables
27+
- ``ContinuedFraction``
28+
- ``Insert`` and ``Delete``
29+
- ``FirstCase``, ``Lookup``, ``Key``, ``Lookup`` and ``Failure``
30+
- ``ConvertCommonDumpRemoveLinearSyntax`` and ``System`ConvertersDump`` context variables
31+
- ``PossibleZeroQ`` PR #1100
32+
- ``Run``
33+
- ``SympyObject``
34+
- ``NumberQ``
35+
- ``AnglePath``, ``AnglePathFold``, ``AngleVector``
36+
- ``Haversine``, ``InverseHaversine``
37+
- ``Show``
38+
- Improving support for options in the Plot module: ``Axes``, ``Filling``, ``ImageSize``, ``Joined``
39+
- ``BoxData``, ``TextData``, ``InterpretationBox``, ``StyleBox``, ``TagBox``, ``TemplateBox``, ``ButtonBox``, ``InterpretationBox``
40+
- ``LerchPhi``
41+
42+
New Constants
43+
+++++++++++++
44+
45+
Mathematical Constants is now its own module/section. Contants have been filled out.
46+
These constants have been added:
47+
48+
- ``Catalan``
49+
- ``Glaisher``
50+
- ``Khinchin``
51+
- ``Degree``
52+
- ``GoldenRatio``
53+
- ``Khinchin``
54+
55+
56+
Many of these and the existing constants are computable via mpmath, numpy, or sympy.
57+
58+
59+
Settings through WL variables
60+
-----------------------------
61+
62+
Certain aspects of the configuration of the kernel are now controlled by variables, defined in /autoad/settings.m
63+
64+
- ``$GetTrace`` (``False`` by default). Defines if when a WL module is load through ``Get``, definitions will be traced (for debug).
65+
- ``$PreferredBackendMethod`` Set this do whether to use mpmath, numpy or Sympy for numeric and symbolic constants and methods when there is s choice (``"sympy"`` by default) (see #1124)
66+
67+
68+
Enhancements
69+
------------
70+
71+
- Add ``Method`` option "mpmath" to compute ``Eignevalues`` using mpmath (#1115).
72+
- Improving the support for OptionValue and OptionsPattern (#1113)
73+
74+
75+
Bug Fixes
76+
---------
77+
78+
There have been numerous bug is driven by working on Combinatorica V0.9 and CellsToTeX.
79+
80+
- ``Sum`` involving numeric integer bounds involving Mathics functions fixed.
81+
- ``Equal`` ``UnEqual`` testing on Strings (#1128).
1882

1983
Document updates
2084
----------------
@@ -33,6 +97,14 @@ Enhancements and Bug fixes:
3397
- Adding support in ``from_python()`` to convert dictionaries in list of rules.
3498

3599

100+
101+
Miscelanea
102+
----------
103+
104+
- Enlarge of the set of gries_schneider tests
105+
- Improvement in the way builtins modules are loaded at initialization time (#1138).
106+
107+
36108
1.1.1
37109
-----
38110

@@ -52,7 +124,7 @@ Package Updates
52124

53125
Mathics Packages added:
54126

55-
- ``DiscreteMath`CombinatoricaV0.9`` (preferred) aand
127+
- ``DiscreteMath`CombinatoricaV0.9`` (preferred) and
56128
``DiscreteMath`CombinatoricaV0.6``.
57129

58130
Both of these correspond to Steven Skiena's *older* book: "Implementing Discrete Mathematics: Combinatorics and Graph Theory" book.
@@ -94,7 +166,7 @@ New builtins:
94166
- Adding support in ``from_python()`` to convert dictionaries in list of rules.
95167
- Fix OptionsPattern associated symbols.
96168

97-
169+
98170
1.1.0
99171
-----
100172

examples/symbolic_logic/gries_schneider/test_gs.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@
66
from mathics.core.expression import Expression, Integer, Rational, Symbol
77
from mathics.core.definitions import Definitions
88
from mathics.core.evaluation import Evaluation
9-
from mathics.core.parser import SingleLineFeeder, parse
9+
from mathics.core.parser import MathicsSingleLineFeeder, parse
1010

1111
definitions = Definitions(add_builtin=True)
1212

1313
for i in range(1, 4):
1414
evaluation = Evaluation(definitions=definitions, catch_interrupt=False)
1515

16-
expr = parse(definitions, SingleLineFeeder(f"<< GS{i}.m"))
16+
expr = parse(definitions, MathicsSingleLineFeeder(f"<< GS{i}.m"))
1717
expr.evaluate(evaluation)
18-
19-

mathics/autoload/settings.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@
55
Settings`$TraceGet::usage = "If this Boolean variable is set True, 'Get' traces the lines it reads that start a new expression";
66
Settings`$TraceGet = False
77
Unprotect[Settings`$TraceGet]
8+
9+
10+
Settings`$PreferredBackendMethod::usage = "Set this do whether to use mpmath, numpy or Sympy for numeric and symbolic constants and methods when there is s choice";
11+
Settings`$PreferredBackendMethod = "sympy"
12+
Unprotect[Settings`$PreferredBackendMethod]

mathics/benchmark.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616

1717
import mathics
18-
from mathics.core.parser import parse, MultiLineFeeder, SingleLineFeeder
18+
from mathics.core.parser import parse, MathicsMultiLineFeeder, MathicsSingleLineFeeder
1919
from mathics.core.definitions import Definitions
2020
from mathics.core.evaluation import Evaluation
2121

@@ -126,7 +126,7 @@ def truncate_line(string):
126126

127127
def benchmark_parse(expression_string):
128128
print(" '{0}'".format(truncate_line(expression_string)))
129-
timeit(lambda: parse(definitions, SingleLineFeeder(expression_string)))
129+
timeit(lambda: parse(definitions, MathicsSingleLineFeeder(expression_string)))
130130

131131

132132
def benchmark_parse_file(fname):
@@ -140,7 +140,7 @@ def benchmark_parse_file(fname):
140140
code = f.read().decode('utf-8')
141141

142142
def do_parse():
143-
feeder = MultiLineFeeder(code)
143+
feeder = MathicsMultiLineFeeder(code)
144144
while not feeder.empty():
145145
parse(definitions, feeder)
146146
timeit(do_parse)
@@ -156,13 +156,13 @@ def benchmark_parser():
156156

157157
def benchmark_format(expression_string):
158158
print(" '{0}'".format(expression_string))
159-
expr = parse(definitions, SingleLineFeeder(expression_string))
159+
expr = parse(definitions, MathicsSingleLineFeeder(expression_string))
160160
timeit(lambda: expr.default_format(evaluation, "FullForm"))
161161

162162

163163
def benchmark_expression(expression_string):
164164
print(" '{0}'".format(expression_string))
165-
expr = parse(definitions, SingleLineFeeder(expression_string))
165+
expr = parse(definitions, MathicsSingleLineFeeder(expression_string))
166166
timeit(lambda: expr.evaluate(evaluation))
167167

168168

0 commit comments

Comments
 (0)