Skip to content

Commit

Permalink
Merge pull request #801 from Mathics3/release-6.0.0
Browse files Browse the repository at this point in the history
Release 6.0.0
  • Loading branch information
rocky authored Feb 25, 2023
2 parents d799526 + fdab864 commit e436501
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 31 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
os: [macOS]
python-version: [3.7, 3.8, 3.9]
python-version: ['3.7', '3.8', '3.9']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -30,7 +30,8 @@ jobs:
- name: Install Mathics3 with full Python dependencies
run: |
# We can comment out after next Mathics-Scanner release
python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
# python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
python -m pip install Mathics-Scanner
make develop-full
- name: Test Mathics3
run: |
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/ubuntu-cython.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.9]
python-version: ['3.10']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -25,7 +25,8 @@ jobs:
sudo apt-get update -qq && sudo apt-get install -qq liblapack-dev llvm-dev tesseract-ocr
python -m pip install --upgrade pip
# We can comment out after next Mathics-Scanner release
python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
# python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
python -m pip install Mathics-Scanner
- name: Install Mathics with full dependencies
run: |
make develop-full-cython
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install OS dependencies
Expand All @@ -25,7 +25,8 @@ jobs:
run: |
python -m pip install --upgrade pip
# We can comment out after next Mathics-Scanner release
python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
# python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
python -m pip install Mathics-Scanner
make develop-full
- name: Test Mathics
run: |
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
strategy:
matrix:
os: [windows]
python-version: [3.7, 3.8]
python-version: ['3.8', '3.9']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install OS dependencies
Expand All @@ -32,7 +32,8 @@ jobs:
- name: Install Mathics3 with Python dependencies
run: |
# We can comment out after next Mathics-Scanner release
python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
# python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
python -m pip install Mathics-Scanner
make develop-full
- name: Test Mathics3
# Limit pip install to a basic install *without* full dependencies.
Expand Down
52 changes: 40 additions & 12 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,31 @@
CHANGES
=======

6.0.0dev0
---------
6.0.0
-----

A fair bit of code refactoring has gone on so that we might be able to
scale the code, get it to be more performant, and more in line with
other interpreters. There is Greater use of Symbols as opposed to strings.

The builtin Functions have been organized into grouping akin to what is found in WMA.
This is not just for documentation purposes, but it better modularizes the code and keep
the modules smaller while suggesting where functions below as we scale.

Image Routines have been gone over and fixed. Basically we use Pillow
imaging routines and as opposed to home-grown image code.

A number of Built-in functions that were implemented were not accessible for various reasons.

Mathics3 Modules are better integrated into the documentation.
Existing Mathics3 modules ``pymathics.graph`` and ``pymathics.natlang`` have
had a major overhaul, although more is needed. And will continue after the 6.0.0 release

A fair bit of code refactoring has gone on so that we might be able to scale the code, get it to be more performant, and more in line with other interpreters.
We have gradually been rolling in more Python type annotations and
current Python practices such as using ``isort``, ``black`` and ``flake8``.

Evaluation methods of built-in functions start ``eval_`` not ``apply_``.

Image Routines have been gone over. A number of Built-in functions that were implemented were not accessible for various reasons.

API
+++
Expand Down Expand Up @@ -59,21 +78,22 @@ Documentation
#. "Exponential Functional" split out from "Trigonometry Functions"
#. "Functional Programming" section split out.
#. "Image Manipulation" has been split off from Graphics and Drawing and turned into a guide section.
#. Image examples now appear in the PDF doc
#. Image examples now appear in the LaTeX and therfore the PDF doc
#. "Logic and Boolean Algebra" section reinstated.
#. "Forms of Input and Output" is its own guide section.
#. More url links to Wiki pages added; more internal cross links added.
#. More URL links to Wiki pages added; more internal cross links added.
#. "Units and Quantities" section reinstated.
#. The Mathics3 Modules are now included in LaTeX and therefore the PDF doc.

Internals
+++++++++

#. ``boxes_to_`` methods are now optional for ``BoxElement`` subclasses. Most of the code is now moved to the ``mathics.format`` submodule, and implemented in a more scalable way.
#. ``from_mpmath`` conversion supports a new parameter ``acc`` to set the accuracy of the number.
#. ``mathics.builtin.inout`` was split in several modules (``inout``, ``messages``, ``layout``, ``makeboxes``) in order to improve the documentation.
#. ``mathics.eval`` was create to have code that might be put in an instruction interperter. The opcodes-like functions start ``eval_``, other functions are helper functions for those.
#. Operator name to unicode or ASCII comes from Mathics scanner character tables.
#. Builtin instance methods that start ``apply`` are considered rule matching and function application; the use of the name ``apply``is deprecated, when ``eval`` is intended.
#. ``mathics.eval`` was create to have code that might be put in an instruction interpreter. The opcodes-like functions start ``eval_``, other functions are helper functions for those.
#. Operator name to Unicode or ASCII comes from Mathics scanner character tables.
#. Builtin instance methods that start ``eval`` are considered rule matching and function application; the use of the name ``apply``is deprecated, when ``eval`` is intended.
#. Modularize and improve the way in which ``Builtin`` classes are selected to have an associated ``Definition``.
#. ``_SetOperator.assign_elementary`` was renamed as ``_SetOperator.assign``. All the special cases are not handled by the ``_SetOperator.special_cases`` dict.
#. ``isort`` run over all Python files. More type annotations and docstrings on functions added.
Expand All @@ -90,12 +110,14 @@ Bugs
#. ``RandomSample`` with one list argument now returns a random ordering of the list items. Previously it would return just one item.
#. Origin placement corrected on ``ListPlot`` and ``LinePlot``.
#. Fix long-standing bugs in Image handling
#. Some scikit image routines line ``EdgeDetect`` were getting omitted due to overly stringent PYPI requirements

#. Some scikit image routines line ``EdgeDetect`` were getting omitted due to overly stringent PyPI requirements
#. Units and Quantities were sometimes failing. Also they were omitted from documentation.
#. Better handling of ``Infinite`` quantities.
#. Improved ``Precision`` and ``Accuracy``compatibility with WMA. In particular, ``Precision[0.]`` and ``Accuracy[0.]``
#. Accuracy in numbers using the notation ``` n.nnn``acc ``` now is properly handled.
#. numeric precision in mpmath was not reset after operations that changed these. This cause huges slowdowns after an operation that set the mpmath precison high. This was the source of several-minute slowdowns in testing.
#. GIF87a (```MadTeaParty.gif`` or ExampleData) image loading fixed
#. Replace non-free Leena image with a a freely distributable image. Issue #728


PyPI Package requirements
Expand Down Expand Up @@ -125,6 +147,12 @@ Enhancements

Get in `requirements-cython.txt`` into tarball. Issue #483

New Symbols
+++++++++++

#. ``Undefined``



5.0.1
-----
Expand All @@ -146,7 +174,7 @@ New Builtin
Documentation
+++++++++++++

Hyperbolic functions were split off form trigonometry and exponential functions. More url links were added.
Hyperbolic functions were split off form trigonometry and exponential functions. More URL links were added.

Bugs
++++
Expand Down
4 changes: 2 additions & 2 deletions PAST.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Progress from 2022

A fair bit of code refactoring has gone on so that we might be able to
scale the code, get it to be more performant, and more in line with
other interpreters.
other interpreters. There is Greater use of Symbols as opposed to strings.

The buitin Functions have been organized into grouping akind to what is found in WMA.
This is not just for documentation purposes, but it better modularizes the code and keep
Expand All @@ -21,7 +21,7 @@ Image Routines have been gone over.
A number of Built-in functions that were implemented were not accessible for various reasons.

Mathics3 Modules are better integrated into the documentation.
Existing Mathics3 modules pymathics.graph and pymathics.natlang have
Existing Mathics3 modules ``pymathics.graph`` and ``pymathics.natlang`` have
had a major overhaul, although more is needed. And will continue after th 6.0.0 release

We have gradually been rolling in more Python type annotations and
Expand Down
2 changes: 1 addition & 1 deletion mathics/builtin/atomic/numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ class Precision(Builtin):
<dt>'Precision[$expr$]'
<dd>examines the number of significant digits of $expr$.
</dl>
<i>Notice that the result could be slighly different than the obtained\
<i>Note that the result could be slightly different than the obtained \
in WMA, due to differencs in the internal representation of the real numbers.</i>
The precision of an exact number, e.g. an Integer, is 'Infinity':
Expand Down
2 changes: 1 addition & 1 deletion mathics/builtin/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class None_(Predefined):
:Mesh:
/doc/reference-of-built-in-symbols/drawing-option-and-values/mesh</url> option.
However, you hide the mesh by setting thes 'Mesh' option value to 'None':
However, you hide the mesh by setting the 'Mesh' option value to 'None':
>> Plot3D[{x^2 + y^2, -x^2 - y^2}, {x, -2, 2}, {y, -2, 2}, BoxRatios-> Automatic, Mesh->None]
= -Graphics3D-
Expand Down
9 changes: 6 additions & 3 deletions mathics/builtin/specialfns/elliptic.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,11 @@ class EllipticF(SympyFunction):
"""
<url>
:Complete elliptic integral of the first kind:
https://en.wikipedia.org/wiki/Elliptic_integral#Complete_elliptic_integral_of_the_first_kind</url> (<url>:SymPy:
https://docs.sympy.org/latest/modules/functions/special.html#sympy.functions.special.elliptic_integrals.elliptic_f</url>, <url>
https://en.wikipedia.org/wiki/\
Elliptic_integral#Complete_elliptic_integral_of_the_first_kind</url> (<url>
:SymPy:
https://docs.sympy.org/latest/modules/functions/\
special.html#sympy.functions.special.elliptic_integrals.elliptic_f</url>, <url>
:WMA:
https://reference.wolfram.com/language/ref/EllipticF.html</url>)
Expand All @@ -94,7 +97,7 @@ class EllipticF(SympyFunction):
>> EllipticF[0.3, 0.8]
= 0.303652
EllipticF is zero when the firt argument is zero:
EllipticF is zero when the first argument is zero:
>> EllipticF[0, 0.8]
= 0
Expand Down
2 changes: 1 addition & 1 deletion mathics/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# well as importing into Python. That's why there is no
# space around "=" below.
# fmt: off
__version__="6.0.0dev0" # noqa
__version__="6.0.0" # noqa
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
)

INSTALL_REQUIRES = [
"Mathics-Scanner >= 1.3.0.dev0",
"Mathics-Scanner >= 1.3.0",
# 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
Expand Down

0 comments on commit e436501

Please sign in to comment.