Skip to content

Commit c4a373d

Browse files
committed
merge
2 parents 8ae1e98 + b6eac71 commit c4a373d

File tree

240 files changed

+14699
-14437
lines changed

Some content is hidden

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

240 files changed

+14699
-14437
lines changed

.github/workflows/macos.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,15 @@ jobs:
2828
python -m pip install --upgrade pip
2929
- name: Install Mathics3 with full Python dependencies
3030
run: |
31-
# We can comment out after next Mathics-Scanner release
31+
# First install our patched version of stopit
32+
git clone --depth 1 https://github.com/Mathics3/stopit.git
33+
cd stopit/
34+
pip install -e .
35+
cd ..
3236
python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
33-
git clone https://github.com/Mathics3/mathics-scanner.git
37+
# We can comment out after next Mathics-Scanner release
38+
git clone --depth 1 https://github.com/Mathics3/mathics-scanner.git
39+
# git clone --single-branch --branch operator-refactor-part1.5 https://github.com/Mathics3/mathics-scanner.git
3440
cd mathics-scanner/
3541
pip install -e .
3642
cd ..

.github/workflows/mypy.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ 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
2625
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
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
2829
cd mathics-scanner/
2930
pip install -e .
3031
cd ..

.github/workflows/packages.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Mathics3 Packages (ubuntu)
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: '**'
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ['3.11']
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install OS dependencies
22+
run: |
23+
sudo apt-get update -qq && sudo apt-get install -qq liblapack-dev llvm-dev tesseract-ocr remake
24+
- name: Install Mathics3 with full dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
# We can comment out after next Mathics-Scanner release
28+
python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
29+
git clone --depth 1 https://github.com/Mathics3/mathics-scanner.git
30+
# git clone --single-branch --branch operator-refactor-part1.5 https://github.com/Mathics3/mathics-scanner.git
31+
cd src/mathics-scanner/
32+
pip install -e .
33+
python -m mathics_scanner.generate.build_tables
34+
cd ../..
35+
- name: Run Mathics3 Combinatorica tests
36+
run: |
37+
git submodule init
38+
git submodule update
39+
remake -x develop
40+
cd mathics/Packages/Combinatorica-repo
41+
# If Combinatorica repo changes, we may need the below altered
42+
# with a branch name, (not HEAD) for testing.
43+
git pull origin HEAD
44+
pip install -e .[dev]
45+
remake -x check

.github/workflows/pyodide.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ jobs:
5454
5555
pip install "setuptools>=70.0.0" PyYAML click packaging pytest
5656
57-
git clone https://github.com/Mathics3/mathics-scanner.git
57+
# We can comment out after next Mathics-Scanner release
58+
git clone --depth 1 https://github.com/Mathics3/mathics-scanner.git
59+
# git clone --single-branch --branch operator-refactor-part1.5 https://github.com/Mathics3/mathics-scanner.git
5860
cd mathics-scanner/
5961
pip install --no-build-isolation -e .
6062
cd ..

.github/workflows/ubuntu-cython.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,15 @@ jobs:
2424
run: |
2525
sudo apt-get update -qq && sudo apt-get install -qq liblapack-dev llvm-dev tesseract-ocr
2626
python -m pip install --upgrade pip
27+
# First install our patched version of stopit
28+
git clone --depth 1 https://github.com/Mathics3/stopit.git
29+
cd stopit/
30+
pip install -e .
31+
cd ..
2732
# We can comment out after next Mathics-Scanner release
2833
python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
29-
git clone https://github.com/Mathics3/mathics-scanner.git
34+
git clone --depth 1 https://github.com/Mathics3/mathics-scanner.git
35+
# git clone --single-branch --branch operator-refactor-part1.5 https://github.com/Mathics3/mathics-scanner.git
3036
cd mathics-scanner/
3137
pip install -e .
3238
cd ..

.github/workflows/ubuntu.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,15 @@ jobs:
2424
- name: Install Mathics3 with full dependencies
2525
run: |
2626
python -m pip install --upgrade pip
27+
# First install our patched version of stopit
28+
git clone --depth 1 https://github.com/Mathics3/stopit.git
29+
cd stopit/
30+
pip install -e .
31+
cd ..
2732
# We can comment out after next Mathics-Scanner release
2833
# python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
29-
git clone https://github.com/Mathics3/mathics-scanner.git
34+
git clone --depth 1 https://github.com/Mathics3/mathics-scanner.git
35+
# git clone --single-branch --branch operator-refactor-part1.5 https://github.com/Mathics3/mathics-scanner.git
3036
cd mathics-scanner/
3137
pip install -e .
3238
python -m mathics_scanner.generate.build_tables

.github/workflows/windows.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,15 @@ jobs:
3333
set LLVM_DIR="C:\Program Files\LLVM"
3434
- name: Install Mathics3 with Python dependencies
3535
run: |
36+
# First install our patched version of stopit
37+
git clone --depth 1 https://github.com/Mathics3/stopit.git
38+
cd stopit/
39+
pip install -e .
40+
cd ..
3641
# We can comment out after next Mathics-Scanner release
3742
python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
38-
39-
git clone https://github.com/Mathics3/mathics-scanner.git
43+
git clone --depth 1 https://github.com/Mathics3/mathics-scanner.git
44+
# git clone --single-branch --branch operator-refactor-part1.5 https://github.com/Mathics3/mathics-scanner.git
4045
cd mathics-scanner
4146
pip install -e .
4247
python -m mathics_scanner.generate.build_tables

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[submodule "mathics/Packages/Combinatorica-repo"]
2+
path = mathics/Packages/Combinatorica-repo
3+
url = https://github.com/Mathics3/Mathics3-Combinatorica.git
4+
[submodule "mathics/Packages/Rubi"]
5+
path = mathics/Packages/Rubi
6+
url = https://github.com/Mathics3/Mathics3-Rubi.git

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ repos:
66
hooks:
77
- id: check-merge-conflict
88
- id: debug-statements
9-
stages: [commit]
9+
stages: [pre-commit]
1010
- id: end-of-file-fixer
11-
stages: [commit]
11+
stages: [pre-commit]
1212
- repo: https://github.com/pycqa/isort
1313
rev: 5.13.2
1414
hooks:
1515
- id: isort
16-
stages: [commit]
16+
stages: [pre-commit]
1717
- repo: https://github.com/psf/black
1818
rev: 23.12.1
1919
hooks:
2020
- id: black
2121
language_version: python3
22-
stages: [commit]
22+
stages: [pre-commit]

CHANGES.rst

Lines changed: 77 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,52 @@
11
CHANGES
22
=======
33

4+
This release is to get out some of the major changes that have gone on
5+
already in advance of redoing Boxing and Formatting.
6+
7+
Operators are now controlled from a new operators YAML table from the
8+
``mathics-scanner`` repository. A pass was made over the Mathics parser
9+
to handle box operators more properly. More work is needed here.
10+
11+
We started adding more debugging capabilites:
12+
13+
* ``Breakpoint[]``
14+
* ``Stack[]``, and
15+
* ``Trace[]``
16+
17+
And in the ``Mathics3-Trepan`` repository:
18+
19+
* ``DebugActivate[]``
20+
* ``Debugger[]``, and
21+
* ``TraceActivate[]``
22+
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.
27+
28+
Also as a result of the improved ability to debug Mathics3, we now
29+
provide a version of Rubi 4.17 using git submodules . To use this you
30+
will need a patched version of ``stopit``. Aravindh Krishnamoorthy
31+
led the initial port of Rubi.
32+
33+
David A. Roberts worked on ensuring Mathics3 runs on pyodide and
34+
contributed a number of new Built-in Functions that are found in `The
35+
On-Line Encyclopedia of Integer Sequences (OEIS) <https://oeis.org/>`_
36+
437

538
New Builtins
639
++++++++++++
740

41+
* ``Between``
42+
* ``Breakpoint`` - forces a Python ``breakpoint()``
843
* ``CheckAbort``
944
* ``FileNameDrop``
45+
* ``FormatValues``
1046
* ``SetEnvironment``
47+
* ``SequenceForm``
48+
* ``Stack``
49+
* ``Trace``
1150

1251
By `@davidar <https://github.com/davidar>`_:
1352

@@ -40,16 +79,18 @@ By `@davidar <https://github.com/davidar>`_:
4079

4180
* ``--post-mortem`` option added which will go into the `trepan3k debugger <https https://pypi.org/project/trepan3k/>`_ on an unrecoverable error.
4281

43-
Compatibility
44-
-------------
82+
WMA Compatibility
83+
-----------------
4584

4685
* ``GetEnvironment`` expanded to handle ``[]`` and ``{var1, var2,...}`` forms
86+
* The system ``packages`` directory has been renamed ``Packages`` to conformance with WMA.
87+
* ``$Path`` now includes a ``Packages`` directory under ``$HOME``.
4788

4889
Internals
4990
---------
5091

51-
Operator precedence has been gone over and is picked up in tables from the Mathics Scanner project.
52-
92+
* Operator information has been gone over and is picked up from JSON
93+
tables produced from the Mathics Scanner project.
5394

5495
Performance
5596
-----------
@@ -60,17 +101,41 @@ API incompatibility
60101
-------------------
61102

62103
* ``Matcher`` now requires an additional ``evaluation`` parameter
63-
* ``Romberg`` removed as an ``NIntegrate[]`` method. It is depcrecated in SciPy and is to be removed by SciPy 1.15.
104+
* ``Romberg`` removed as an ``NIntegrate[]`` method. It is deprecated in SciPy and is to be removed by SciPy 1.15.
105+
* The signature of the ``Definition.__init__`` now receives a single dict parameter instead of the several `*values` parameters.
106+
* Rule positions in ``Definition.{get|set}_values`` now includes the word ``values``. For example ``pos="up"`` now is ``pos="upvalues"``.
107+
* ``Definitions.get_ownvalue`` now returns a ``BaseElement`` instead of a ``BaseRule`` object.
108+
* Patterns in ``eval_`` and ``format_`` methods of builtin classes
109+
parses patterns in docstrings of the form
110+
``Symbol: Expr`` as ``Pattern[Symbol, Expr]``.
111+
To specify associated format in ``format_`` methods the
112+
docstring, the list of format must be wrapped in parenthesis, like
113+
``(InputForm,): Definitions[...]`` instead of just ``InputForm: Definitions[...]``.
114+
64115

65116

66117
Bugs
67118
----
68119

69120
* Fix infinite recursion when formatting ``Sequence[...]``
70121

122+
Mathics3 Packages
123+
+++++++++++++++++
124+
125+
* Added ``BoolEval``
126+
* 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.
129+
* ``Rubi`` version 4.17 (work in progress; algebraic integrations work)
71130

72-
Package updates
73-
+++++++++++++++
131+
132+
Mathics3 Modules
133+
++++++++++++++++
134+
135+
* Added preliminary Mathics3 debugger ("pymathics.trepan")
136+
137+
Python Package Updates
138+
+++++++++++++++++++++++
74139

75140
#. Python 3.12 is now supported
76141
#. SymPy 1.13 is now supported
@@ -785,13 +850,13 @@ New variables and builtins
785850
Enhancements
786851
++++++++++++
787852

788-
#. a function `evaluate_predicate` allows for a basic predicate evaluation using `$Assumptions`.
853+
#. a function ``evaluate_predicate`` allows for a basic predicate evaluation using ``$Assumptions``.
789854
#. ``Attributes`` accepts a string parameter.
790855
#. ``Cases`` accepts Heads option. Issue #1302.
791856
#. ``ColorNegate`` for colors is supported.
792857
#. ``D`` and ``Derivative`` improvements.
793858
#. ``Expand`` and ``ExpandAll`` now support a second parameter ``patt`` Issue #1301.
794-
#. ``Expand`` and ``ExpandAll`` works with hyperbolic functions (`Sinh`, `Cosh`, `Tanh`, `Coth`).
859+
#. ``Expand`` and ``ExpandAll`` works with hyperbolic functions (``Sinh``, ``Cosh``, ``Tanh``, ``Coth``).
795860
#. ``FileNames`` returns a sorted list. Issue #1250.
796861
#. ``FindRoot`` now accepts several optional parameters like ``Method`` and ``MaxIterations``. See Issue #1235.
797862
#. ``FixedPoint`` now supports the ``SameTest`` option.
@@ -876,10 +941,10 @@ Bug fixes
876941
``TeXForm[]`` for integrals are now properly formatted.
877942

878943

879-
Pymathics Modules
880-
+++++++++++++++++
944+
Mathics3 Modules
945+
++++++++++++++++
881946

882-
#. Pymathics modules now can run initialization code when are loaded.
947+
#. Mathics3 modules now can run initialization code when are loaded.
883948
#. The ``builtins`` list is not hard-linked to the library anymore. This simplifies the loading and reloading of pymathics modules.
884949
#. Decoupling of BoxConstructors from the library. Now are defined at the level of the definition objects. This is useful for customizing the Graphics output if it is available.
885950

0 commit comments

Comments
 (0)