Skip to content

Commit 96572aa

Browse files
committed
Get ready for release 3.0.0
Also blacken all files and start using pre-commit
1 parent a655685 commit 96572aa

20 files changed

Lines changed: 197 additions & 111 deletions

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ repos:
55
- id: debug-statements
66
- id: end-of-file-fixer
77
- repo: https://github.com/psf/black
8-
rev: 19.3b0
8+
rev: 20.8b1
99
hooks:
1010
- id: black
1111
language_version: python3
12-
exclude: 'mathicsscript/version.py'
12+
exclude: 'mathics_django/version.py'

CHANGES.rst

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,46 @@
11
CHANGES
22
=======
33

4+
3.0.0
5+
-----
6+
7+
This release contains been a major overhaul and upgrade of the code.
8+
9+
It can't be stressed enough, but this was made only possible due to
10+
the tireless work of Tiago Cavalcante Trindade.
11+
12+
There is still a lot of work still to do. However where we are at
13+
right now, there have been massive changes and improvements:
14+
15+
* three.js has been upgraded to r124 (from r52) which brings us from
16+
up seven years from circa 2013 to late 2020!
17+
* Plots and Graphs no longer appear inside MathML when there is no reason for them to be in MathML.
18+
* The "About" page now shows all of the the Mathics ``Settings`` that
19+
are in effect. You can change Boolean setting inside the About page.
20+
* 3D Polygon rendering has been greatly improved. However we currently
21+
do not handle even/odd space filling.
22+
* We support TickStyle coloring in 3D Graphics.
23+
* Tick positions in most 2D Plots and Graphs as been fixed.
24+
* We tolerate smaller screens in SVG rendering.
25+
* Styling of Cells has been improved. A somewhat Jupyter-style frame box is used.
26+
* Output which are strings now have surrounding quotes. (This can be
27+
turned off via ``Settings`$QuotedStrings``.)
28+
* In headings, we make it more clear that the code is Django
29+
based. This is to make clear the distinction should there be a
30+
Flask-based front-end or the long sought for Jupyter front end.
31+
* In the online document, sections which are empty are omitted from
32+
the online view.
33+
* A stray in the space between logo and Mathics at the top was removed.
34+
* Gallery examples have been improved.
35+
* A major rewrite of the JavaScript code according to more modern
36+
Javascript style has been started. More work will probably continue
37+
in future releases.
38+
* Respecting ``PointSize`` in the rendering of 3D plots as been
39+
fixed. The default point size now more closely matches the intended specification.
40+
* The use of Prototype and Scriptaculous are being phased out.
41+
42+
43+
444
2.2.0
545
-----
646

@@ -52,4 +92,4 @@ Small bug fixes.
5292
1.0.0
5393
-----
5494

55-
Code split off from Mathics 1.1.0. We have some support for NetworkX/pyplot graphs.
95+
Code split off from Mathics 1.1.0. We have some support for NetworkX/pyplot graphs.

MANIFEST.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
include README.rst
21
include CHANGES.rst
3-
include ChangeLog
42
include COPYING.txt
3+
include ChangeLog
54
include FUTURE.rst
65
include Makefile
6+
include README.rst
77
include mathics/Makefile
8-
include mathics/Makefile
8+
include requirements-full.txt
99
recursive-include mathics *.py
10-
recursive-include test *.py
10+
recursive-include test *.py

mathics_django/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
PrecisionReal,
2121
)
2222
from mathics import version_info
23+
2324
version_info["django"] = django.__version__
2425

2526
version_string = """Mathics {mathics}

mathics_django/doc/utils.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,12 @@ def slugify(value):
3939
4040
Based on the Django version, but modified to preserve '$'.
4141
"""
42-
value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore').decode('ascii')
43-
value = re.sub('[^$`\w\s-]', '', value).strip().lower()
44-
return re.sub('[-\s`]+', '-', value)
42+
value = (
43+
unicodedata.normalize("NFKD", value).encode("ascii", "ignore").decode("ascii")
44+
)
45+
value = re.sub("[^$`\w\s-]", "", value).strip().lower()
46+
return re.sub("[-\s`]+", "-", value)
47+
4548

4649
# FIXME: can we replace this with Python 3's html.escape ?
4750
def escape_html(text, verbatim_mode=False, counters=None, single_line=False):

mathics_django/docpipeline.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,9 @@ def main():
527527
if args.pymathics: # in case the section is in a pymathics module...
528528
documentation.load_pymathics_doc()
529529

530-
test_chapters(chapters, stop_on_failure=args.stop_on_failure, reload=args.reload)
530+
test_chapters(
531+
chapters, stop_on_failure=args.stop_on_failure, reload=args.reload
532+
)
531533
else:
532534
# if we want to check also the pymathics modules
533535
if args.pymathics:

mathics_django/settings.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@
4646
# os.makedirs(DATA_DIR)
4747

4848
MATHICS_DJANGO_DB = os.environ.get("MATHICS_DJANGO_DB", "mathics.sqlite")
49-
MATHICS_DJANGO_DB_PATH = os.environ.get("MATHICS_DJANGO_DB_PATH", DATA_DIR + MATHICS_DJANGO_DB)
49+
MATHICS_DJANGO_DB_PATH = os.environ.get(
50+
"MATHICS_DJANGO_DB_PATH", DATA_DIR + MATHICS_DJANGO_DB
51+
)
5052

5153
DOC_DIR = os.path.join(MATHICS_ROOT_DIR, "doc/documentation/")
5254

mathics_django/test_django.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@
55

66

77
class HomePageTests(SimpleTestCase):
8-
98
def test_home_page_status_code(self):
10-
response = self.client.get('/')
9+
response = self.client.get("/")
1110
self.assertEquals(response.status_code, 200)
1211

13-
1412
def test_home_page_does_not_contain_incorrect_html(self):
15-
response = self.client.get('/')
16-
self.assertNotContains(
17-
response, 'Hi there! I should not be on the page.')
13+
response = self.client.get("/")
14+
self.assertNotContains(response, "Hi there! I should not be on the page.")

mathics_django/urls.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
from django.conf.urls.static import static
77
from django.conf import settings
88

9-
handler404 = 'mathics_django.web.views.error_404_view'
10-
handler500 = 'mathics_django.web.views.error_500_view'
9+
handler404 = "mathics_django.web.views.error_404_view"
10+
handler500 = "mathics_django.web.views.error_500_view"
1111

1212
urlpatterns = [
1313
# url(''),
14-
url(r'^', include('mathics_django.web.urls')),
14+
url(r"^", include("mathics_django.web.urls")),
1515
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

mathics_django/version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22

3-
43
# This file is suitable for sourcing inside POSIX shell as
54
# well as importing into Python. That's why there is no
65
# space around "=" below.
7-
__version__="2.2.1.dev0" # noqa
6+
# fmt: off
7+
__version__="3.0.0" # noqa

0 commit comments

Comments
 (0)