Skip to content

Commit 3b54e1b

Browse files
authored
Merge branch 'master' into makeboxes_refactor_2025_step_0p5
2 parents 9acbd0a + d446ead commit 3b54e1b

Some content is hidden

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

43 files changed

+1067
-1233
lines changed

.github/workflows/consistency-checks.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@ jobs:
2222
run: |
2323
sudo apt update -qq && sudo apt install llvm-dev remake
2424
python -m pip install --upgrade pip
25-
# We can comment out after next Mathics-Scanner release
26-
python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
27-
git clone https://github.com/Mathics3/mathics-scanner.git
28-
cd mathics-scanner/
2925
pip install -e .
30-
cd ..
26+
# We can comment out after next Mathics-Scanner release
27+
# python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
28+
# git clone https://github.com/Mathics3/mathics-scanner.git
29+
# cd mathics-scanner/
30+
# pip install -e .
31+
# cd ..
3132
3233
- name: Install Mathics with minimum dependencies
3334
run: |

.github/workflows/mypy.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,21 @@ jobs:
2222
run: |
2323
sudo apt update -qq && sudo apt install llvm-dev remake
2424
python -m pip install --upgrade pip
25-
python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
26-
# We can comment out after next Mathics-Scanner release
27-
git clone --depth 1 https://github.com/Mathics3/mathics-scanner.git
28-
# git clone --single-branch --branch operator-refactor-part1.5 https://github.com/Mathics3/mathics-scanner.git
29-
cd mathics-scanner/
3025
pip install -e .
31-
cd ..
26+
# python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
27+
# We can comment out after next Mathics-Scanner release
28+
# git clone --depth 1 https://github.com/Mathics3/mathics-scanner.git
29+
# cd mathics-scanner/
30+
# pip install -e .
31+
# cd ..
3232
3333
- name: Install Mathics with minimum dependencies
3434
run: |
3535
make develop
3636
- name: Run mypy
3737
run: |
3838
pip install mypy==1.13 sympy==1.12
39+
git clone --depth 1 https://github.com/Mathics3/mathics-scanner.git
3940
touch ./mathics-scanner/mathics_scanner/py.typed
4041
pip install ./mathics-scanner/
4142
mypy --install-types --non-interactive mathics

.github/workflows/pyodide.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ jobs:
5555
pip install "setuptools>=70.0.0" PyYAML click packaging pytest
5656
5757
# We can comment out after next Mathics-Scanner release
58-
git clone --depth 1 https://github.com/Mathics3/mathics-scanner.git
58+
# git clone --depth 1 https://github.com/Mathics3/mathics-scanner.git
5959
# git clone --single-branch --branch operator-refactor-part1.5 https://github.com/Mathics3/mathics-scanner.git
60-
cd mathics-scanner/
61-
pip install --no-build-isolation -e .
62-
cd ..
60+
# cd mathics-scanner/
61+
# pip install --no-build-isolation -e .
62+
# cd ..
6363
64-
make mathics/data/op-tables.json mathics/data/operator-tables.json
6564
pip install --no-build-isolation -e .
65+
make mathics/data/op-tables.json mathics/data/operator-tables.json
6666
make -j3 check

.github/workflows/ubuntu-cython.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ jobs:
3030
pip install -e .
3131
cd ..
3232
# We can comment out after next Mathics-Scanner release
33-
python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
34-
git clone --depth 1 https://github.com/Mathics3/mathics-scanner.git
33+
# python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
34+
# git clone --depth 1 https://github.com/Mathics3/mathics-scanner.git
3535
# git clone --single-branch --branch operator-refactor-part1.5 https://github.com/Mathics3/mathics-scanner.git
36-
cd mathics-scanner/
36+
# cd mathics-scanner/
3737
pip install -e .
3838
cd ..
3939

.github/workflows/ubuntu.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ jobs:
3131
cd ..
3232
# We can comment out after next Mathics-Scanner release
3333
# python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
34-
git clone --depth 1 https://github.com/Mathics3/mathics-scanner.git
34+
# git clone --depth 1 https://github.com/Mathics3/mathics-scanner.git
3535
# git clone --single-branch --branch operator-refactor-part1.5 https://github.com/Mathics3/mathics-scanner.git
36-
cd mathics-scanner/
37-
pip install -e .
38-
python -m mathics_scanner.generate.build_tables
39-
cd ..
36+
# cd mathics-scanner/
37+
# pip install -e .
38+
# python -m mathics_scanner.generate.build_tables
39+
# cd ..
4040
41-
# python -m pip install Mathics-Scanner[full]
41+
python -m pip install Mathics-Scanner[full]
4242
remake -x develop-full
4343
- name: Test Mathics
4444
run: |

.github/workflows/windows.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,14 @@ jobs:
3939
pip install -e .
4040
cd ..
4141
# We can comment out after next Mathics-Scanner release
42-
python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
43-
git clone --depth 1 https://github.com/Mathics3/mathics-scanner.git
42+
# python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
43+
# git clone --depth 1 https://github.com/Mathics3/mathics-scanner.git
4444
# git clone --single-branch --branch operator-refactor-part1.5 https://github.com/Mathics3/mathics-scanner.git
45-
cd mathics-scanner
45+
# cd mathics-scanner
46+
# pip install -e .
47+
# python -m mathics_scanner.generate.build_tables
48+
# cd ..
4649
pip install -e .
47-
python -m mathics_scanner.generate.build_tables
48-
cd ..
4950
5051
# python -m pip install Mathics-Scanner[full]
5152
make develop-full

.pre-commit-config.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ repos:
77
- id: check-merge-conflict
88
- id: debug-statements
99
stages: [pre-commit]
10+
exclude: ChangeLog-spell-corrected.diff
1011
- id: end-of-file-fixer
1112
stages: [pre-commit]
13+
exclude: ChangeLog-spell-corrected.diff
1214
- repo: https://github.com/pycqa/isort
1315
rev: 5.13.2
1416
hooks:
@@ -19,4 +21,5 @@ repos:
1921
hooks:
2022
- id: black
2123
language_version: python3
24+
exclude: 'mathics/version.py'
2225
stages: [pre-commit]

CHANGES.rst

+52-17
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
CHANGES
22
=======
33

4+
8.0.0
5+
-----
6+
7+
Jan 26, 2025
8+
49
This release is to get out some of the major changes that have gone on
510
already in advance of redoing Boxing and Formatting.
611

12+
Code now supports the emscripten platform, so this code can be installed
13+
in pyodide using ``micropip.install``.
14+
715
Operators are now controlled from a new operators YAML table from the
816
``mathics-scanner`` repository. A pass was made over the Mathics parser
917
to handle box operators more properly. More work is needed here.
1018

11-
We started adding more debugging capabilites:
19+
We started adding more debugging capabilities:
1220

1321
* ``Breakpoint[]``
1422
* ``Stack[]``, and
@@ -20,33 +28,41 @@ And in the ``Mathics3-Trepan`` repository:
2028
* ``Debugger[]``, and
2129
* ``TraceActivate[]``
2230

23-
This code is very much alpha quality, but it greatly improves the
24-
ability to debug problems in loading existing packages written from
25-
Mathematica. So packages ``BoolEval`` and ``CleanSlate`` were added to
26-
the repostiory.
31+
Option ``--post-mortem`` was added which goes into the `trepan3k debugger <https https://pypi.org/project/trepan3k/>`_ on an unrecoverable error. This option is available on other front ends.
32+
33+
This debugging code is very much alpha quality, but it greatly
34+
improves the ability to debug problems in loading existing packages
35+
written from Mathematica. So packages ``BoolEval`` and ``CleanSlate``
36+
were added to the repository.
2737

2838
Also as a result of the improved ability to debug Mathics3, we now
2939
provide a version of Rubi 4.17 using git submodules . To use this you
3040
will need a patched version of ``stopit``. Aravindh Krishnamoorthy
31-
led the initial port of Rubi.
41+
led the initial port of `Rubi <https://github.com/Mathics3/Mathics3-Rubi>`_.
3242

3343
David A. Roberts worked on ensuring Mathics3 runs on pyodide and
3444
contributed a number of new Built-in Functions that are found in `The
35-
On-Line Encyclopedia of Integer Sequences (OEIS) <https://oeis.org/>`_
45+
On-Line Encyclopedia of Integer Sequences (OEIS) <https://oeis.org/>`_.
3646

3747

3848
New Builtins
3949
++++++++++++
4050

4151
* ``Between``
42-
* ``Breakpoint`` - forces a Python ``breakpoint()``
52+
* ``Breakpoint`` - (not WMA; forces a Python ``breakpoint()``
4353
* ``CheckAbort``
4454
* ``FileNameDrop``
4555
* ``FormatValues``
46-
* ``SetEnvironment``
56+
* ``ListStepPlot``
57+
* ``MapApply``
58+
* ``PythonCProfileEvaluation`` (not WMA; interface to Python cProfile)
59+
* ``RealValuedNumberQ``
4760
* ``SequenceForm``
61+
* ``SetEnvironment``
4862
* ``Stack``
63+
* ``SyntaxQ``
4964
* ``Trace``
65+
* ``UnitStep``
5066

5167
By `@davidar <https://github.com/davidar>`_:
5268

@@ -74,23 +90,38 @@ By `@davidar <https://github.com/davidar>`_:
7490
* ``SquaresR``
7591
* ``Subfactorial``
7692

93+
Documentation
94+
+++++++++++++
95+
96+
* Unicode operators appear in Django documentation. In the PDF, AMSLaTeX is used.
97+
* Summaries of builtin functions have been improved and regularized
98+
7799
``mathics`` command line
78100
++++++++++++++++++++++++
79101

80-
* ``--post-mortem`` option added which will go into the `trepan3k debugger <https https://pypi.org/project/trepan3k/>`_ on an unrecoverable error.
102+
Option ``--post-mortem`` was added which goes into the `trepan3k
103+
debugger <https https://pypi.org/project/trepan3k/>`_ on an
104+
unrecoverable error. This option is available on other front-ends..
81105

82106
WMA Compatibility
83107
-----------------
84108

85109
* ``GetEnvironment`` expanded to handle ``[]`` and ``{var1, var2,...}`` forms
86110
* The system ``packages`` directory has been renamed ``Packages`` to conformance with WMA.
87111
* ``$Path`` now includes a ``Packages`` directory under ``$HOME``.
112+
* All of the 100 or so Unicode operators without a pre-defined meaning are now supported
88113

89114
Internals
90115
---------
91116

92-
* Operator information has been gone over and is picked up from JSON
93-
tables produced from the Mathics Scanner project.
117+
* More of the on-OO evaluation code that forms what might be an
118+
instruction evaluator has been moved out of the module
119+
``mathics.builtins`` put in ``mathics.eval``. This includes code for
120+
plotting, and making boxes.
121+
* nested ``TimeConstraint[]`` works via external Python module ``stopit``.
122+
* ``Pause[]`` is more interruptible
123+
* More code has been linted, more type errors removed, and docstrings added/improved
124+
94125

95126
Performance
96127
-----------
@@ -108,31 +139,33 @@ API incompatibility
108139
* Patterns in ``eval_`` and ``format_`` methods of builtin classes
109140
parses patterns in docstrings of the form
110141
``Symbol: Expr`` as ``Pattern[Symbol, Expr]``.
111-
To specify associated format in ``format_`` methods the
142+
To specify the associated format in ``format_`` methods the
112143
docstring, the list of format must be wrapped in parenthesis, like
113144
``(InputForm,): Definitions[...]`` instead of just ``InputForm: Definitions[...]``.
114-
145+
* Character and Operator information that has been gone over in the Mathics Scanner project. The information in JSON tables, the keys, and values have thus change. Here, we read this information in and use that instead of previously hard-coded values.
115146

116147

117148
Bugs
118149
----
119150

120151
* Fix infinite recursion when formatting ``Sequence[...]``
152+
* Parsing ``\(`` ... ``\)`` improved
153+
* Fixed #1105, #1106, #1107, #1172 #1173, #1195, #1205, #1221, #1223, and #1228 among others
121154

122155
Mathics3 Packages
123156
+++++++++++++++++
124157

125158
* Added ``BoolEval``
126159
* Added ``CleanSlate``
127-
* ``Combinatorica`` moved to a separate repository and v.9 renamed to 0.9.1.
128-
More code v0.9.1 works. v2.0 renamed v2.0.1 and some code now works.
160+
* ``Combinatorica`` moved to a separate repository and v.9 was renamed to 0.9.1.
161+
More code v0.9.1 works. v2.0 was renamed v2.0.1 and some code now works.
129162
* ``Rubi`` version 4.17 (work in progress; algebraic integrations work)
130163

131164

132165
Mathics3 Modules
133166
++++++++++++++++
134167

135-
* Added preliminary Mathics3 debugger ("pymathics.trepan")
168+
* Added preliminary `Mathics3 debugger `Mathics3-Trepan <https://github.com/Mathics3/mathics3-trepan>`_.
136169

137170
Python Package Updates
138171
+++++++++++++++++++++++
@@ -144,6 +177,8 @@ Python Package Updates
144177
7.0.0
145178
-----
146179

180+
Aug 9, 2024
181+
147182
Some work was done here in support of planned future improvements like
148183
lazy loading of builtin functions. A bit of effort was also spent to
149184
modernize Python code and style, add more type annotations, remove

0 commit comments

Comments
 (0)