Change names and pass tests

This commit is contained in:
Benjamin Bertrand 2017-04-17 16:48:52 +03:00
parent 30a6402e40
commit 500426bf82
54 changed files with 103 additions and 87 deletions

View File

@ -1,7 +1,7 @@
pyMath Mapytex
====== =======
pyMath est un module python qui permet la manipulation d'expressions Mapytex est un module python qui permet la manipulation d'expressions
mathématiques. Voici ce qu'il est capable de faire: mathématiques. Voici ce qu'il est capable de faire:
- *Calculer comme un collégien*: Pour faire de la correction - *Calculer comme un collégien*: Pour faire de la correction
@ -10,7 +10,7 @@ mathématiques. Voici ce qu'il est capable de faire:
pas analyser ses erreurs ou s'inspirer de la correction. pas analyser ses erreurs ou s'inspirer de la correction.
``` python ``` python
>>> from pymath import Expression >>> from mapytex import Expression
>>> ajout_fractions = Expression("2 / 5 + 2 / 3") >>> ajout_fractions = Expression("2 / 5 + 2 / 3")
>>> resultat = ajout_fractions.simplify() >>> resultat = ajout_fractions.simplify()
>>> print(resultat) >>> print(resultat)
@ -30,23 +30,23 @@ mathématiques. Voici ce qu'il est capable de faire:
générateur d'expressions est inclus. générateur d'expressions est inclus.
``` python ``` python
>>> from pymath import Expression >>> from mapytex import Expression
>>> ajout_fraction = Expression.random("{a} + {b} / {c}") >>> ajout_fraction = Expression.random("{a} + {b} / {c}")
>>> print(ajout_fraction) >>> print(ajout_fraction)
2 + \frac{ 3 }{ 5 } 2 + \frac{ 3 }{ 5 }
``` ```
- *Gérer différents type de données*: Pour le moment, pyMath est - *Gérer différents type de données*: Pour le moment, Mapytex est
capable de gérer les entiers naturels, les rationnels (sous forme capable de gérer les entiers naturels, les rationnels (sous forme
de fractions) et les polynômes. L'utilisation des nombres à virgules de fractions) et les polynômes. L'utilisation des nombres à virgules
et des racines devraient être ajoutés dans les prochaines versions. et des racines devraient être ajoutés dans les prochaines versions.
``` python ``` python
>>> from pymath import Fraction >>> from mapytex import Fraction
>>> une_fraction = Fraction(1,2) >>> une_fraction = Fraction(1,2)
>>> print(une_fraction) >>> print(une_fraction)
1 / 2 1 / 2
>>> from pymath import Polynom >>> from mapytex import Polynom
>>> un_polynom = Polynom([1,2,3]) >>> un_polynom = Polynom([1,2,3])
>>> print(un_polynom) >>> print(un_polynom)
3 x^{ 2 } + 2 x + 1 3 x^{ 2 } + 2 x + 1
@ -57,7 +57,7 @@ mathématiques. Voici ce qu'il est capable de faire:
des documents latex. des documents latex.
``` python ``` python
>>> from pymath import Expression >>> from mapytex import Expression
>>> ajout_fractions = Expression("2 / 5 + 2 / 3") >>> ajout_fractions = Expression("2 / 5 + 2 / 3")
>>> for i in ajout_fractions.simpliy().explain(): >>> for i in ajout_fractions.simpliy().explain():
... print(i) ... print(i)
@ -67,7 +67,7 @@ mathématiques. Voici ce qu'il est capable de faire:
\frac{ 6 }{ 15 } + \frac{ 10 }{ 15 } \frac{ 6 }{ 15 } + \frac{ 10 }{ 15 }
\frac{ 6 + 10 }{ 15 } \frac{ 6 + 10 }{ 15 }
\frac{ 16 }{ 15 } \frac{ 16 }{ 15 }
>>> from pymath import txt >>> from mapytex import txt
>>> with Expression.tmp_render(txt): >>> with Expression.tmp_render(txt):
... for i in ajout_fractions.simpliy().explain(): ... for i in ajout_fractions.simpliy().explain():
... print(i) ... print(i)

8
bugs
View File

@ -43,7 +43,7 @@
In [4]: e = Expression("1+2*3") In [4]: e = Expression("1+2*3")
In [5]: e + P In [5]: e + P
Out[5]: < <class 'pymath.expression.Expression'> [1, 2, 3, '*', '+', < Polynom [1, 2, 1]>, '+'] > Out[5]: < <class 'mapytex.expression.Expression'> [1, 2, 3, '*', '+', < Polynom [1, 2, 1]>, '+'] >
In [6]: P + e In [6]: P + e
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
@ -51,14 +51,14 @@
<ipython-input-6-ff312ef36cdb> in <module>() <ipython-input-6-ff312ef36cdb> in <module>()
----> 1 P + e ----> 1 P + e
/home/lafrite/scripts/pyMath/pymath/polynom.py in __add__(self, other) /home/lafrite/scripts/Mapytex/mapytex/polynom.py in __add__(self, other)
430 [< <class 'pymath.expression.Expression'> [3, 'x', 2, '^', '*', 2, 'x', '*', '+', 1, '+', 5, 'x', '*', 4, '+', '+'] >, < Polynom [< <class 'pymath.expression.Expression'> [1, 4, '+'] >, < <class 'pymath.expression.Expression'> [2, 5, '+'] >, 3]>, < Polynom [< <class 'pymath.expression.Expression'> [1, 4, '+'] >, < <class 'pymath.expression.Expression'> [2, 5, '+'] >, 3]>] 430 [< <class 'mapytex.expression.Expression'> [3, 'x', 2, '^', '*', 2, 'x', '*', '+', 1, '+', 5, 'x', '*', 4, '+', '+'] >, < Polynom [< <class 'mapytex.expression.Expression'> [1, 4, '+'] >, < <class 'mapytex.expression.Expression'> [2, 5, '+'] >, 3]>, < Polynom [< <class 'mapytex.expression.Expression'> [1, 4, '+'] >, < <class 'mapytex.expression.Expression'> [2, 5, '+'] >, 3]>]
431 """ 431 """
--> 432 o_poly = self.conv2poly(other) --> 432 o_poly = self.conv2poly(other)
433 433
434 n_coef = spe_zip(self._coef, o_poly._coef) 434 n_coef = spe_zip(self._coef, o_poly._coef)
/home/lafrite/scripts/pyMath/pymath/polynom.py in conv2poly(self, other) /home/lafrite/scripts/Mapytex/mapytex/polynom.py in conv2poly(self, other)
319 return other 319 return other
320 else: 320 else:
--> 321 raise ValueError(type(other) + " can't be converted into a polynom") --> 321 raise ValueError(type(other) + " can't be converted into a polynom")

View File

@ -85,17 +85,17 @@ qthelp:
@echo @echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:" ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/pyMath.qhcp" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Mapytex.qhcp"
@echo "To view the help file:" @echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/pyMath.qhc" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Mapytex.qhc"
devhelp: devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo @echo
@echo "Build finished." @echo "Build finished."
@echo "To view the help file:" @echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/pyMath" @echo "# mkdir -p $$HOME/.local/share/devhelp/Mapytex"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/pyMath" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Mapytex"
@echo "# devhelp" @echo "# devhelp"
epub: epub:
@ -177,9 +177,9 @@ pseudoxml:
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
#SSH_CONF=kimsufi #SSH_CONF=kimsufi
#SSH_TARGET_DIR=/var/www/opytex.org/pymath #SSH_TARGET_DIR=/var/www/opytex.org/mapytex
SSH_CONF=Embrevade SSH_CONF=Embrevade
SSH_TARGET_DIR=/var/docker/opytex.org/www/pymath SSH_TARGET_DIR=/var/docker/opytex.org/www/mapytex
rsync_upload: html rsync_upload: html
rsync -e "ssh" -P -rvzc --delete $(BUILDDIR)/html/ $(SSH_CONF):$(SSH_TARGET_DIR) --cvs-exclude rsync -e "ssh" -P -rvzc --delete $(BUILDDIR)/html/ $(SSH_CONF):$(SSH_TARGET_DIR) --cvs-exclude

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# pyMath documentation build configuration file, created by # Mapytex documentation build configuration file, created by
# sphinx-quickstart on Thu Apr 23 10:44:48 2015. # sphinx-quickstart on Thu Apr 23 10:44:48 2015.
# #
# This file is execfile()d with the current directory set to its # This file is execfile()d with the current directory set to its
@ -49,7 +49,7 @@ source_suffix = '.rst'
master_doc = 'index' master_doc = 'index'
# General information about the project. # General information about the project.
project = 'pyMath' project = 'Mapytex'
copyright = '2015, Benjamin Bertrand' copyright = '2015, Benjamin Bertrand'
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
@ -121,7 +121,7 @@ html_theme_options = {
#'navbar_title': "Opytex", #'navbar_title': "Opytex",
#'navbar_links': [ #'navbar_links': [
# ('Opytex', "/opytex/"), # ('Opytex', "/opytex/"),
# ("pyMath", "/pymaht/"), # ("Mapytex", "/pymaht/"),
# ("Enseignement", "/Enseignements"), # ("Enseignement", "/Enseignements"),
# #('blog', '/blog_index.html'), # #('blog', '/blog_index.html'),
# ('À propos', "/about") # ('À propos', "/about")
@ -203,7 +203,7 @@ html_static_path = ['_static']
#html_file_suffix = None #html_file_suffix = None
# Output file base name for HTML help builder. # Output file base name for HTML help builder.
htmlhelp_basename = 'pyMathdoc' htmlhelp_basename = 'Mapytexdoc'
# -- Options for LaTeX output --------------------------------------------- # -- Options for LaTeX output ---------------------------------------------
@ -223,7 +223,7 @@ latex_elements = {
# (source start file, target name, title, # (source start file, target name, title,
# author, documentclass [howto, manual, or own class]). # author, documentclass [howto, manual, or own class]).
latex_documents = [ latex_documents = [
('index', 'pyMath.tex', 'pyMath Documentation', ('index', 'Mapytex.tex', 'Mapytex Documentation',
'Benjamin Bertrand', 'manual'), 'Benjamin Bertrand', 'manual'),
] ]
@ -253,7 +253,7 @@ latex_documents = [
# One entry per manual page. List of tuples # One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section). # (source start file, name, description, authors, manual section).
man_pages = [ man_pages = [
('index', 'pymath', 'pyMath Documentation', ('index', 'pymath', 'Mapytex Documentation',
['Benjamin Bertrand'], 1) ['Benjamin Bertrand'], 1)
] ]
@ -267,8 +267,8 @@ man_pages = [
# (source start file, target name, title, author, # (source start file, target name, title, author,
# dir menu entry, description, category) # dir menu entry, description, category)
texinfo_documents = [ texinfo_documents = [
('index', 'pyMath', 'pyMath Documentation', ('index', 'Mapytex', 'Mapytex Documentation',
'Benjamin Bertrand', 'pyMath', 'One line description of project.', 'Benjamin Bertrand', 'Mapytex', 'One line description of project.',
'Miscellaneous'), 'Miscellaneous'),
] ]

View File

@ -1,16 +1,16 @@
.. pyMath documentation master file, created by .. Mapytex documentation master file, created by
sphinx-quickstart on Thu Apr 23 10:44:48 2015. sphinx-quickstart on Thu Apr 23 10:44:48 2015.
You can adapt this file completely to your liking, but it should at least You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive. contain the root `toctree` directive.
Karibou dans la documentation de pyMath Karibou dans la documentation de Mapytex
======================================== ========================================
pyMath est un ensemble de modules écris en Python qui vise à faciliter et automatiser la conception d'exercices de math et leurs corrections. Mapytex est un ensemble de modules écris en Python qui vise à faciliter et automatiser la conception d'exercices de math et leurs corrections.
C'est le moteur qui va permettre à `Opytex <../opytex/>`_ de manipuler les données créer pour faire ces exercices. Il est capable de créer aléatoirement des expressions (calculs de fractions, polynomes, expressions littérales...), des données statistiques et bientôt des figures géométriques, de les simplifier et de faire des calculs avec. C'est le moteur qui va permettre à `Opytex <../opytex/>`_ de manipuler les données créer pour faire ces exercices. Il est capable de créer aléatoirement des expressions (calculs de fractions, polynomes, expressions littérales...), des données statistiques et bientôt des figures géométriques, de les simplifier et de faire des calculs avec.
À la difference d'un logiciel de calcul formel classique (comme `sympy <sympy.org>`_), pyMath va non seulement être capable de simplifier des calculs mais surtout d'expliquer comme un élève les étapes qui permettent d'arriver au résultat. À la difference d'un logiciel de calcul formel classique (comme `sympy <sympy.org>`_), Mapytex va non seulement être capable de simplifier des calculs mais surtout d'expliquer comme un élève les étapes qui permettent d'arriver au résultat.
Le module est séparé en 3 parties: Le module est séparé en 3 parties:

View File

@ -1,7 +1,7 @@
Présentation des outils de calculs de pyMath Présentation des outils de calculs de Mapytex
============================================ ============================================
La partie calcul de pyMath est un module python qui permet la manipulation d'expressions mathématiques. Voici ce qu'il est capable de faire: La partie calcul de Mapytex est un module python qui permet la manipulation d'expressions mathématiques. Voici ce qu'il est capable de faire:
- *Calculer comme un collégien*: Pour faire de la correction automatisé - *Calculer comme un collégien*: Pour faire de la correction automatisé
d'exercice, un logiciel de calcul formel ne suffit pas. Si les étapes d'exercice, un logiciel de calcul formel ne suffit pas. Si les étapes
@ -36,7 +36,7 @@ La partie calcul de pyMath est un module python qui permet la manipulation d'exp
>>> print(ajout_fraction) >>> print(ajout_fraction)
2 + \frac{ 3 }{ 5 } 2 + \frac{ 3 }{ 5 }
- *Gérer différents type de données*: Pour le moment, pyMath est - *Gérer différents type de données*: Pour le moment, Mapytex est
capable de gérer les entiers naturels, les rationnels (sous forme de capable de gérer les entiers naturels, les rationnels (sous forme de
fractions) et les polynômes. L'utilisation des nombres à virgules et fractions) et les polynômes. L'utilisation des nombres à virgules et
des racines devraient être ajoutés dans les prochaines versions. des racines devraient être ajoutés dans les prochaines versions.

View File

@ -1,7 +1,7 @@
Présentation des outils de statistiques de pyMath Présentation des outils de statistiques de Mapytex
================================================= =================================================
La partie statistique de pyMath est un module python qui permet generer des données statistiques et de les analyser pour un niveau collège - début de lycée. La partie statistique de Mapytex est un module python qui permet generer des données statistiques et de les analyser pour un niveau collège - début de lycée.
Analyse des données Analyse des données
------------------- -------------------

View File

@ -206,8 +206,8 @@ class AbstractPolynom(Explicable):
>>> p = AbstractPolynom([1,[-2,0]]) >>> p = AbstractPolynom([1,[-2,0]])
>>> p.coefs_postifx() >>> p.coefs_postifx()
[[1], [-2, 'x', *]] [[1], [-2, 'x', *]]
>>> from pymath.calculus.expression import Expression >>> from mapytex.calculus.expression import Expression
>>> from pymath.calculus.operator import op >>> from mapytex.calculus.operator import op
>>> e = Expression([2,3,op.add]) >>> e = Expression([2,3,op.add])
>>> p = AbstractPolynom([1,e]) >>> p = AbstractPolynom([1,e])
>>> p.coefs_postifx() >>> p.coefs_postifx()
@ -262,8 +262,8 @@ class AbstractPolynom(Explicable):
>>> p = AbstractPolynom([1,[-2,-3]]) >>> p = AbstractPolynom([1,[-2,-3]])
>>> p.postfix_tokens >>> p.postfix_tokens
[-2, 'x', *, -3, 'x', *, +, 1, +] [-2, 'x', *, -3, 'x', *, +, 1, +]
>>> from pymath.calculus.expression import Expression >>> from mapytex.calculus.expression import Expression
>>> from pymath.calculus.operator import op >>> from mapytex.calculus.operator import op
>>> e = Expression([2,3,op.add]) >>> e = Expression([2,3,op.add])
>>> p = AbstractPolynom([1,e]) >>> p = AbstractPolynom([1,e])
>>> p.postfix_tokens >>> p.postfix_tokens

View File

@ -351,7 +351,7 @@ def isPolynom(exp):
:param exp: an expression :param exp: an expression
:returns: True if the expression can be a polynom and false otherwise :returns: True if the expression can be a polynom and false otherwise
>>> from pymath.calculus.polynom import Polynom >>> from mapytex.calculus.polynom import Polynom
>>> p = Polynom([1,2]) >>> p = Polynom([1,2])
>>> isPolynom(p) >>> isPolynom(p)
1 1
@ -373,11 +373,11 @@ def isNumerand(exp):
>>> isNumerand(1) >>> isNumerand(1)
1 1
>>> from pymath.calculus.polynom import Polynom >>> from mapytex.calculus.polynom import Polynom
>>> p = Polynom([1,2]) >>> p = Polynom([1,2])
>>> isNumerand(p) >>> isNumerand(p)
1 1
>>> from pymath.calculus.fraction import Fraction >>> from mapytex.calculus.fraction import Fraction
>>> f = Fraction(12) >>> f = Fraction(12)
>>> isNumerand(f) >>> isNumerand(f)
1 1

View File

@ -79,9 +79,9 @@ p2i = Render(p2i_render)
if __name__ == '__main__': if __name__ == '__main__':
from .operator import op from .operator import op
from itertools import permutations from itertools import permutations
from pymath import Polynom from mapytex import Polynom
from pymath import Expression from mapytex import Expression
from pymath import Fraction from mapytex import Fraction
coefs_p = [[(i - 2), (j - 2)] for i, j in permutations(range(5), 2)] coefs_p = [[(i - 2), (j - 2)] for i, j in permutations(range(5), 2)]
coefs_q = [[2 * (i - 2), 2 * (j - 2)] coefs_q = [[2 * (i - 2), 2 * (j - 2)]
for i, j in permutations(range(5), 2)] for i, j in permutations(range(5), 2)]

View File

@ -101,7 +101,7 @@ def feed_digit(character, tok_b, tok_bb):
[-1] [-1]
>>> feed_digit(1, '-', 2) >>> feed_digit(1, '-', 2)
['-', 1] ['-', 1]
>>> from pymath.calculus.polynom import Polynom >>> from mapytex.calculus.polynom import Polynom
>>> feed_digit(1, '-', Polynom([0,1])) >>> feed_digit(1, '-', Polynom([0,1]))
['-', 1] ['-', 1]
@ -128,7 +128,7 @@ def hidden_meaning_time(tok_b):
['*'] ['*']
>>> hidden_meaning_time(')') >>> hidden_meaning_time(')')
['*'] ['*']
>>> from pymath.calculus.polynom import Polynom >>> from mapytex.calculus.polynom import Polynom
>>> hidden_meaning_time(Polynom([0,1])) >>> hidden_meaning_time(Polynom([0,1]))
['*'] ['*']
>>> hidden_meaning_time("+") >>> hidden_meaning_time("+")
@ -152,7 +152,7 @@ def feed_alpha(character):
:returns: tokens to add :returns: tokens to add
""" """
from pymath.calculus.polynom import Polynom from mapytex.calculus.polynom import Polynom
return Polynom([0, 1], letter=character) return Polynom([0, 1], letter=character)

View File

@ -2,7 +2,7 @@
# encoding: utf-8 # encoding: utf-8
from pymath.calculus import arithmetic from mapytex.calculus import arithmetic
def test_gcd_commu(): def test_gcd_commu():

View File

@ -4,8 +4,8 @@
""" Testing Expression """ """ Testing Expression """
from pymath.calculus.expression import Expression from mapytex.calculus.expression import Expression
from pymath.calculus.operator import op from mapytex.calculus.operator import op
def test_init_from_str(): def test_init_from_str():

View File

@ -3,11 +3,11 @@
import unittest import unittest
from pymath.calculus.fraction import Fraction from mapytex.calculus.fraction import Fraction
class TestFraction(unittest.TestCase): class TestFraction(unittest.TestCase):
"""Testing functions from pymath.calculus.Fraction""" """Testing functions from mapytex.calculus.Fraction"""
def setUp(self): def setUp(self):
self.listFrom = [Fraction(1, 3), 1] self.listFrom = [Fraction(1, 3), 1]

View File

@ -4,11 +4,11 @@
import unittest import unittest
from pymath.calculus import generic from mapytex.calculus import generic
class TestGeneric(unittest.TestCase): class TestGeneric(unittest.TestCase):
"""Testing functions from pymath.calculus.generic""" """Testing functions from mapytex.calculus.generic"""
def test_flatten_list1(self): def test_flatten_list1(self):
l = [1, [2, 3], [[4, 5], 6], 7] l = [1, [2, 3], [[4, 5], 6], 7]

View File

@ -4,15 +4,15 @@
import unittest import unittest
from pymath.calculus.polynom import Polynom from mapytex.calculus.polynom import Polynom
from pymath.calculus.fraction import Fraction from mapytex.calculus.fraction import Fraction
from pymath.calculus.expression import Expression from mapytex.calculus.expression import Expression
from pymath.calculus.render import txt from mapytex.calculus.render import txt
from pymath.calculus.operator import op from mapytex.calculus.operator import op
class TestPolynom(unittest.TestCase): class TestPolynom(unittest.TestCase):
"""Testing functions from pymath.calculus.polynom""" """Testing functions from mapytex.calculus.polynom"""
def setup(self): def setup(self):
Expression.set_render(txt) Expression.set_render(txt)

View File

@ -4,11 +4,11 @@
import unittest import unittest
from pymath.calculus.polynomDeg2 import Polynom_deg2 from mapytex.calculus.polynomDeg2 import Polynom_deg2
class TestPolynomDeg2(unittest.TestCase): class TestPolynomDeg2(unittest.TestCase):
"""Testing functions from pymath.calculus.polynomDeg2""" """Testing functions from mapytex.calculus.polynomDeg2"""
pass pass

View File

@ -2,7 +2,7 @@
# encoding: utf-8 # encoding: utf-8
from pymath.calculus.random_expression import RdExpression from mapytex.calculus.random_expression import RdExpression
def test_only_form(): def test_only_form():

View File

@ -4,11 +4,11 @@
import unittest import unittest
from pymath.calculus.render import tex, txt from mapytex.calculus.render import tex, txt
from pymath.calculus.fraction import Fraction from mapytex.calculus.fraction import Fraction
from pymath.calculus.polynom import Polynom from mapytex.calculus.polynom import Polynom
from pymath.calculus.operator import op from mapytex.calculus.operator import op
from pymath.calculus.expression import Expression from mapytex.calculus.expression import Expression
from itertools import permutations from itertools import permutations
@ -30,7 +30,7 @@ def mass_poly_test(operation, rg=5):
class TestTexRender(unittest.TestCase): class TestTexRender(unittest.TestCase):
"""Testing functions from pymath.calculus.renders.tex""" """Testing functions from mapytex.calculus.renders.tex"""
def test_type_render_int(self): def test_type_render_int(self):
self.assertEqual(tex([2]), "2") self.assertEqual(tex([2]), "2")
@ -209,7 +209,7 @@ class TestTexRender(unittest.TestCase):
class TesttxtRender(unittest.TestCase): class TesttxtRender(unittest.TestCase):
"""Testing functions from pymath.calculus.renders.txt""" """Testing functions from mapytex.calculus.renders.txt"""
def test_type_render_int(self): def test_type_render_int(self):
self.assertEqual(txt([2]), "2") self.assertEqual(txt([2]), "2")

View File

@ -4,13 +4,13 @@
import unittest import unittest
from pymath.calculus.str2tokens import str2tokens, str2in_tokens, in2post_fix from mapytex.calculus.str2tokens import str2tokens, str2in_tokens, in2post_fix
from pymath.calculus.polynom import Polynom from mapytex.calculus.polynom import Polynom
from pymath.calculus.operator import op from mapytex.calculus.operator import op
class TestStr2tokens(unittest.TestCase): class TestStr2tokens(unittest.TestCase):
"""Testing functions from pymath.calculus.str2tokens""" """Testing functions from mapytex.calculus.str2tokens"""
def test_str2in_tokens(self): def test_str2in_tokens(self):
ans = str2in_tokens("2+3*4") ans = str2in_tokens("2+3*4")

View File

@ -1,2 +1,17 @@
pyparsing==2.0.3 appdirs==1.4.3
sympy==0.7.6 decorator==4.0.11
ipython==5.3.0
ipython-genutils==0.2.0
packaging==16.8
pexpect==4.2.1
pickleshare==0.7.4
prompt-toolkit==1.0.14
ptyprocess==0.5.1
py==1.4.33
Pygments==2.2.0
pyparsing==2.2.0
pytest==3.0.7
simplegeneric==0.8.1
six==1.10.0
traitlets==4.3.2
wcwidth==0.1.7

View File

@ -5,11 +5,12 @@ try:
except ImportError: except ImportError:
from distutils.core import setup from distutils.core import setup
setup(name='pyMath', setup(
name='Mapytex',
version='1.1', version='1.1',
description='Computing like a student', description='Computing like a student',
author='Benjamin Bertrand', author='Benjamin Bertrand',
author_email='lafrite@poneyworld.net', author_email='lafrite@poneyworld.net',
packages=['pymath'], packages=['mapytex'],
install_requires=['pyparsing', 'sympy'], # install_requires=['pyparsing', 'sympy'],
) )