Skip to content

Commit cde2a68

Browse files
authored
Merge pull request #1508 from mathics/settings-cleanup
Settings cleanup
2 parents f3c89ec + 51df6cb commit cde2a68

File tree

3 files changed

+18
-34
lines changed

3 files changed

+18
-34
lines changed

mathics/doc/tex/Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ LATEXMK ?= latexmk
66
BASH ?= /bin/bash
77
#-quiet
88

9+
DOC_DATA_PCL ?= $(HOME)/.local/var/mathics/doc_data.pcl
10+
911
#: Default target: Make everything
1012
all doc texdoc: mathics.pdf
1113

12-
doc-data doc_tex_data.pcl:
14+
doc-data $(DOC_DATA_PCL):
1315
(cd ../.. && $(PYTHON) docpipeline.py --output --keep-going)
1416

1517
#: Build mathics PDF
16-
mathics.pdf: mathics.tex documentation.tex logo-text-nodrop.pdf logo-heptatom.pdf doc_tex_data.pcl
18+
mathics.pdf: mathics.tex documentation.tex logo-text-nodrop.pdf logo-heptatom.pdf $(DOC_DATA_PCL)
1719
$(LATEXMK) --verbose -f -pdf -pdflatex="$(XETEX) -halt-on-error" mathics
1820

1921
#: Build test PDF
@@ -26,7 +28,7 @@ logo-heptatom.pdf logo-text-nodrop.pdf:
2628
(cd .. && $(BASH) ./images.sh)
2729

2830
#: The build of the documentation which is derived from docstrings in the Python code
29-
documentation.tex: doc_tex_data.pcl
31+
documentation.tex: $(DOC_DATA_PCL)
3032
$(PYTHON) ./doc2latex.py
3133

3234
#: Same as mathics.pdf
@@ -38,6 +40,6 @@ clean:
3840
rm -f test-mathics.aux test-mathics.idx test-mathics.log test-mathics.mtc test-mathics.mtc* test-mathics.out test-mathics.toc || true
3941
rm -f mathics.fdb_latexmk mathics.ilg mathics.ind mathics.maf mathics.pre || true
4042
rm -f mathics_*.* || true
41-
rm -f mathics-*.* documentation.tex doc_tex_data.pcl || true
43+
rm -f mathics-*.* documentation.tex doc_data.pcl || true
4244
rm -f mathics.pdf mathics.dvi data_tex_data.pcl test-mathics.pdf test-mathics.dvi || true
4345
rm -f mathics-test.pdf mathics-test.dvi || true

mathics/doc/tex/README.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ Here is a flow of the data::
2424

2525
doc/documentation/*.mdoc --+
2626
|
27-
bultins/*.py -------------+--> doc/tex/doc_tex_data.pcl ---> documentation.tex -+
28-
docpipeline.py doc2latex.py |
29-
|
30-
doc/images/*.svg -------------> doc/tex/log*.pdf --------------------------------+------------------------------> mathics.pdf
31-
images.sh | latexmk,xetex,asyptote,gv
32-
|
33-
doc/tex/mathics.tex -------------------------------------------------------------+
27+
bultins/*.py -------------+--> doc_tex_data.pcl ---> documentation.tex -+
28+
docpipeline.py doc2latex.py |
29+
|
30+
doc/images/*.svg -------------> doc/tex/log*.pdf ------------------------+------------------------------> mathics.pdf
31+
images.sh | latexmk,xetex,asyptote,gv
32+
|
33+
doc/tex/mathics.tex -----------------------------------------------------+
3434

3535
A GNU Makefile in this directory has been created to manage the complicated workflow above.
3636

mathics/settings.py

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,10 @@
99

1010
DEBUG = True
1111

12-
# set only to True in DEBUG mode
13-
DEBUG_MAIL = True
14-
PROPAGATE_EXCEPTIONS = True
15-
DISPLAY_EXCEPTIONS = True
1612
DEBUG_PRINT = False
1713

18-
LOG_QUERIES = False
19-
2014
# Either None (no timeout) or a positive integer.
21-
# unix only
15+
# Unix only
2216
TIMEOUT = None
2317

2418
# specifies a maximum recursion depth is safe for all Python environments
@@ -29,9 +23,6 @@
2923
# historically 10000 was used on public mathics servers
3024
MAX_STORED_SIZE = 10000
3125

32-
ADMINS = (("Admin", "[email protected]"),)
33-
MANAGERS = ADMINS
34-
3526
ROOT_DIR = pkg_resources.resource_filename("mathics", "")
3627
if sys.platform.startswith("win"):
3728
DATA_DIR = os.environ["APPDATA"].replace(os.sep, "/") + "/Python/Mathics/"
@@ -40,26 +31,17 @@
4031
# if not path.exists(DATA_DIR):
4132
# os.makedirs(DATA_DIR)
4233

34+
# Location of internal document data.
35+
# NOTE: Storing this in JSON if possible would be preferable and faster
36+
DOC_DATA_PATH = os.path.join(DATA_DIR, "doc_data.pcl")
37+
4338
DOC_DIR = os.path.join(ROOT_DIR, "doc/documentation/")
44-
DOC_DATA_PATH = os.path.join(ROOT_DIR, "doc/tex/doc_tex_data.pcl")
4539
DOC_LATEX_FILE = os.path.join(ROOT_DIR, "doc/tex/documentation.tex")
4640

47-
# Local time zone for this installation. Choices can be found here:
48-
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
49-
# although not all choices may be available on all operating systems.
50-
# If running in a Windows environment this must be set to the same as your
51-
# system time zone.
52-
TIME_ZONE = "Europe/Vienna"
5341

5442
# Set this True if you prefer 12 hour time to be the default
5543
TIME_12HOUR = False
5644

57-
# Language code for this installation. All choices can be found here:
58-
# http://www.i18nguy.com/unicode/language-identifiers.html
59-
LANGUAGE_CODE = "en-us"
60-
61-
SITE_ID = 1
62-
6345
# Leave this True unless you have specific reason for not permitting
6446
# users to access local files
6547
ENABLE_FILES_MODULE = True

0 commit comments

Comments
 (0)