File tree Expand file tree Collapse file tree 9 files changed +55
-6
lines changed
Expand file tree Collapse file tree 9 files changed +55
-6
lines changed Original file line number Diff line number Diff line change 1+ 1.1.2
2+ -----
3+
4+ * Fix `` Settings`$ShowFullForm `` now that we use Mathics supports Booleans better
5+ * Show mathicsscript version on startup
6+ * Add ``Settings` MathicsScriptVersion `
7+
181.1.1
29-----
310
1017* Toleratte MS/Windows pyreadline which doesn't handle ` remove_history_item `
1118* Show pygments styles when an invalid one is given
1219* Use "inkpot" for dark backgrounds and "colorful" for light backgrounds.
20+ * Add `` Settings`PygementsStylesAvailable ``
1321* Add settings.m to holds ` mathicsscript ` -specific definitions ` Settings ` and their default values. Settings include
1422 - `` Settings`$ShowFullFormInput ``
1523 - `` Settings`$PygmentsStyle ``
Original file line number Diff line number Diff line change 11|CI status | |Pypi Installs | |Latest Version | |Supported Python Versions |
22
3- mathicsscript is a command-line interface to Mathics.
3+ mathicsscript is a command-line interface to ` Mathics < https://mathics.org >`_ .
44
55|screenshot |
66
@@ -26,7 +26,7 @@ To install, run
2626
2727 $ make install
2828
29- To install from git shources so that you run from the git source tree:
29+ To install from git sources so that you run from the git source tree:
3030
3131
3232::
Original file line number Diff line number Diff line change @@ -5,4 +5,4 @@ if [[ $0 == ${BASH_SOURCE[0]} ]] ; then
55 echo " This script should be *sourced* rather than run directly through bash"
66 exit 1
77fi
8- export PYVERSIONS=' 3.6.12 3.7.9 3.8.6 3.9.0 '
8+ export PYVERSIONS=' 3.6.12 3.7.9 3.8.6 3.9.1 '
Original file line number Diff line number Diff line change @@ -306,7 +306,9 @@ def main(
306306 definitions .set_ownvalue (
307307 "Settings`$PygmentsShowTokens" , from_python (pygments_tokens )
308308 )
309-
309+ definitions .set_ownvalue ("Settings`MathicsScriptVersion" , from_python (__version__ ))
310+ definitions .set_attribute ("Settings`MaticsScriptVersion" , "System`Protected" )
311+ definitions .set_attribute ("Settings`MaticsScriptVersion" , "System`Locked" )
310312 TeXForm = Symbol ("System`TeXForm" )
311313
312314 definitions .set_line_no (0 )
Original file line number Diff line number Diff line change 2121
2222Settings ` $PygmentsShowTokens = False
2323
24- Settings ` $PygmentsStyle ::usage = "This Boolean variable sets whether Unicode is used in terminal input and output."
24+ Settings ` $UseUnicode ::usage = "This Boolean variable sets whether Unicode is used in terminal input and output."
2525Settings ` $UseUnicode = True
26+
27+ Settings ` MathicsScriptVersion ::usage = "This string is the version of MathicsScript we are running."
Original file line number Diff line number Diff line change @@ -217,7 +217,9 @@ def __init__(
217217 Symbol ("Settings`PygmentsStylesAvailable" ),
218218 from_python ("usage" ),
219219 ),
220- from_python ("Lists the available styles for Pygment" ),
220+ from_python (
221+ "A list of Pygments style that are valid in Settings`$PygmentsStyle."
222+ ),
221223 ),
222224 )
223225 self .definitions .set_attribute (
Original file line number Diff line number Diff line change 1+ from mathics .core .parser import parse , SingleLineFeeder
2+ from mathics .core .definitions import Definitions
3+ from mathics .core .evaluation import Evaluation
4+ from mathics .session import MathicsSession
5+
6+ session = MathicsSession (add_builtin = True , catch_interrupt = False )
7+
8+
9+ def check_evaluation (str_expr : str , str_expected : str , message = "" ):
10+ """Helper function to test that a WL expression against
11+ its results"""
12+ result = session .evaluate (str_expr )
13+ expected = session .evaluate (str_expected )
14+
15+ if message :
16+ assert result == expected , "%s: got: %s" % (message , result )
17+ else :
18+ assert result == expected
Original file line number Diff line number Diff line change 1+ # -*- coding: utf-8 -*-
2+ from .helper import session
3+
4+
5+ def test_settings ():
6+ # FIXME: this is a start, but we should do more
7+ for setting in (
8+ "Settings`$ShowFullFormInput::usage" ,
9+ "Settings`$ShowFullFormInput" ,
10+ "Settings`$PygmentsStyle::usage" ,
11+ "Settings`$PygmentsShowTokens::usage" ,
12+ "Settings`$PygmentsShowTokens" ,
13+ "Settings`$UseUnicode::usage" ,
14+ "Settings`$UseUnicode" ,
15+ "Settings`MathicsScriptVersion::usage" ,
16+ ):
17+ assert session .evaluate (setting ), setting
You can’t perform that action at this time.
0 commit comments