Skip to content

Commit

Permalink
Get ready for release 1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
rocky committed Aug 9, 2024
1 parent c115937 commit bc1979b
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 19 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
/.cache
/.python-version
/ChangeLog
/ChangeLog.orig
/ChangeLog.rej
/mma.css
/mma.css.map
__pycache__/
Expand Down
11 changes: 11 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
CHANGES
=======

1.0.3
-----

Modernize:

* update Python style (black),
* import order (isort),
* convert test to pytest,
* fix spelling errors, and
* add code of conduct.

1.0.2
-----

Expand Down
61 changes: 61 additions & 0 deletions ChangeLog-spell-corrected.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
--- ChangeLog 2024-08-09 09:09:48.813412728 -0400
+++ ChangeLog-spell-corrected 2024-08-09 09:10:01.463349041 -0400
@@ -52,7 +52,7 @@
2021-09-04 rocky <[email protected]>

* mathics_pygments/builtins.py,
- mathics_pygments/data/mma-tables.json: Fix script capital N. Rebuld
+ mathics_pygments/data/mma-tables.json: Fix script capital N. Rebuild
tables

2021-06-27 rocky <[email protected]>
@@ -73,7 +73,7 @@

2021-06-22 R. Bernstein <[email protected]>

- * : Merge pull request #2 from Mathics3/administrivia Varous lintings
+ * : Merge pull request #2 from Mathics3/administrivia Various lintings

2021-06-22 rocky <[email protected]>

@@ -91,7 +91,7 @@
2021-06-22 rocky <[email protected]>

* .github/workflows/autoblack.yml, .github/workflows/{osx.yaml =>
- osx.yml}, .github/workflows/{ubuntu.yaml => ubuntu.yml}: Varous
+ osx.yml}, .github/workflows/{ubuntu.yaml => ubuntu.yml}: Various
lintings

2021-06-22 rocky <[email protected]>
@@ -144,7 +144,7 @@

2021-05-14 rocky <[email protected]>

- * CHANGES.rst, MANIFEST.in, Makefile, mathics_pygments/version.py:
+ * CHANGES.rst, MANIFEST.in, Makefile, mathics_pygments/version.py:
Get ready for release 1.0.0

2021-05-14 rocky <[email protected]>
@@ -154,7 +154,7 @@

2021-05-13 rocky <[email protected]>

- * .gitignore, MANIFEST.in, mathics_pygments/builtins.py:
+ * .gitignore, MANIFEST.in, mathics_pygments/builtins.py:
Administriva

2021-05-12 rocky <[email protected]>
@@ -167,7 +167,7 @@

* mathics_pygments/builtins.py,
mathics_pygments/data/mma-tables.json, mathics_pygments/lexer.py,
- mathics_pygments/style.py: More oeprators, what's up with Degree
+ mathics_pygments/style.py: More operators, what's up with Degree

2021-05-09 rocky <[email protected]>

@@ -337,4 +337,3 @@
2016-02-14 Ravi Menon <[email protected]>

* Initial commit for v0.1.0 of the Mathematica Lexer for Pygments
-
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ rmChangeLog:
#: Create a ChangeLog from git via git log and git2cl
ChangeLog: rmChangeLog
git log --pretty --numstat --summary | $(GIT2CL) >$@
patch ChangeLog < ChangeLog-spell-corrected.diff
16 changes: 6 additions & 10 deletions admin-tools/make-dist.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#!/bin/bash
PACKAGE=mathics-pygments
package=mathics_pygments

# FIXME put some of the below in a common routine
function finish {
cd $owd
cd $mathics_pygments_owd
}

cd $(dirname ${BASH_SOURCE[0]})
owd=$(pwd)
mathics_pygments_owd=$(pwd)
trap finish EXIT

if ! source ./pyenv-versions ; then
Expand All @@ -23,15 +24,10 @@ for pyversion in $PYVERSIONS; do
if ! pyenv local $pyversion ; then
exit $?
fi
# pip bdist_egg create too-general wheels. So
# we narrow that by moving the generated wheel.

# Pick out first two number of version, e.g. 3.7.9 -> 37
first_two=$(echo $pyversion | cut -d'.' -f 1-2 | sed -e 's/\.//')
rm -fr build
python setup.py bdist_egg
python setup.py bdist_wheel
python setup.py bdist_wheel --universal
done

python setup.py bdist_wheel --universal
mv -v dist/${package}-${__version__}-{py2.,}py3-none-any.whl
python ./setup.py sdist
finish
10 changes: 6 additions & 4 deletions mathics_pygments/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2016 rsmenon
# Copyright (c) 2021 Rocky Bernstein
# Copyright (c) 2021, 2024 Rocky Bernstein
# Licensed under the MIT License (https://opensource.org/licenses/MIT)

from mathics_pygments.lexer import MathematicaLexer
from mathics_pygments.style import MathematicaNotebookStyle, MathematicaStyle
from mathics_pygments.version import __version__

__all__ = [
MathematicaLexer,
MathematicaNotebookStyle,
MathematicaStyle,
"MathematicaLexer",
"MathematicaNotebookStyle",
"MathematicaStyle",
"__version__",
]
2 changes: 1 addition & 1 deletion mathics_pygments/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# space around "=" below.

# fmt: off
__version__="1.0.3.dev0" # noqa
__version__="1.0.3" # noqa
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@
It currently supports:
- All builtin functions in the ``System`` context including unicode symbols except \
those that use characters from the private unicode space (e.g. ``\[FormalA]``).
- All builtin functions in the ``System`` context including unicode symbols except those that use characters from the private unicode space (e.g. ``\[FormalA]``).
- User defined symbols, including those in a context.
- All operators including unicode operators like \u03C0.
- Comments, including multi line and nested.
- Strings, including multi line and escaped quotes.
- Patterns, slots (including named slots ``#name`` introduced in version 10) and slot sequences.
- Message names (e.g. the ivar in ``General::ivar``)
- Numbers including base notation (e.g. ``8 ^^ 23 == 19``) and scientific notation \
(e.g. ``1 *^ 3 == 1000``).
- Numbers including base notation (e.g. ``8 ^^ 23 == 19``) and scientific notation (e.g. ``1 *^ 3 == 1000``).
- Local variables in ``Block``, ``With`` and ``Module``.
A Sass file containing the styles can be obtained from the package repository for use in static \
Expand Down

0 comments on commit bc1979b

Please sign in to comment.