File tree Expand file tree Collapse file tree 5 files changed +25
-25
lines changed Expand file tree Collapse file tree 5 files changed +25
-25
lines changed Original file line number Diff line number Diff line change 4
4
/ChangeLog-spell-corrected
5
5
/ChangeLog.orig
6
6
/Mathics3_Module_hello.egg-info
7
+ /Mathics3_hello.egg-info
7
8
/build
8
9
/dist
9
10
/tmp
Original file line number Diff line number Diff line change @@ -2,27 +2,24 @@ default_language_version:
2
2
python : python
3
3
repos :
4
4
- repo : https://github.com/pre-commit/pre-commit-hooks
5
- rev : v4.0.1
5
+ rev : v4.5.0
6
6
hooks :
7
7
- id : check-merge-conflict
8
8
- id : debug-statements
9
9
stages : [pre-commit]
10
+ exclude : ChangeLog-spell-corrected.diff
10
11
- id : end-of-file-fixer
11
12
stages : [pre-commit]
12
- # - repo: https://github.com/pycqa/isort
13
- # rev: 5.10.1
14
- # hooks:
15
- # - id: isort
16
- # stages: [commit]
13
+ exclude : ChangeLog-spell-corrected.diff
14
+ - repo : https://github.com/pycqa/isort
15
+ rev : 5.13.2
16
+ hooks :
17
+ - id : isort
18
+ stages : [pre-commit]
17
19
- repo : https://github.com/psf/black
18
- rev : 22.3.0
20
+ rev : 23.12.1
19
21
hooks :
20
22
- id : black
21
23
language_version : python3
22
24
exclude : ' pymathics/hello/version.py'
23
25
stages : [pre-commit]
24
- - repo : https://github.com/pycqa/flake8
25
- rev : 3.9.2
26
- hooks :
27
- - id : flake8
28
- stages : [pre-commit]
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ LANG = en
16
16
pypi-setup \
17
17
pytest \
18
18
rmChangeLog \
19
- test
19
+ doctest pytest test
20
20
21
21
# : Default target - same as "develop"
22
22
all : develop
@@ -38,7 +38,7 @@ install:
38
38
$(PYTHON ) setup.py install
39
39
40
40
# Run tests
41
- check : pytest
41
+ check : pytest doctest
42
42
43
43
# : Remove derived files
44
44
clean : clean-pyc
@@ -47,11 +47,15 @@ clean: clean-pyc
47
47
clean-pyc :
48
48
@find . -name " *.pyc" -type f -delete
49
49
50
+ # :
51
+ doctest :
52
+ MATHICS_CHARACTER_ENCODING=" ASCII" $(PYTHON ) -m mathics.docpipeline -l pymathics.hello -c ' Example Mathics3 Module' $o
50
53
# : Run py.test tests. Use environment variable "o" for pytest options
51
54
pytest :
52
55
py.test test $o
53
56
54
57
58
+
55
59
# #: Make Mathics PDF manual
56
60
# doc mathics.pdf: mathics/doc/tex/data
57
61
# (cd mathics/doc/tex && $(MAKE) mathics.pdf)
Original file line number Diff line number Diff line change 1
1
# -*- coding: utf-8 -*-
2
2
"""
3
- PyMathics Hello test module.
3
+ Example Mathics3 Module
4
4
5
- This is an example of an external PyMathics module .
5
+ This is an example of an external Mathics3 Module .
6
6
7
- A PyMathics module is a Python module which can be loaded into Mathics using the
7
+ A Mathics3 Module is a Python module which can be loaded into Mathics using the
8
8
``LoadModule[]`` method.
9
9
10
10
In particular, to load this after installing this module as a Python module run inside
27
27
28
28
"""
29
29
30
- from pymathics .hello .version import __version__
31
30
from pymathics .hello .__main__ import Hello
31
+ from pymathics .hello .version import __version__
32
32
33
33
__all__ = ("__version__" , "Hello" , "pymathics_version_data" )
34
34
Original file line number Diff line number Diff line change @@ -12,18 +12,16 @@ class Hello(Builtin):
12
12
<dd>An example function in a Python-importable Mathics3 module.
13
13
</dl>
14
14
15
- >> PyMathics`Hello["World"]
15
+ >> Hello[]
16
+ = "Hello, World!"
17
+
18
+ >> Hello["Everyone"]
19
+ = Hello, "Everyone!"
16
20
17
21
See also the <url>
18
22
:developer guide section:
19
23
https://mathics-development-guide.readthedocs.io/en/latest/extending/developing-code/extending/tutorial/1-builtin.html</url> for an \
20
24
explanation of everything.
21
-
22
- >> Hello[]
23
- = Hello, World!
24
-
25
- >> Hello["rocky"]
26
- = Hello, rocky!
27
25
"""
28
26
29
27
summary_text = """classic "hello" demo"""
You can’t perform that action at this time.
0 commit comments