From 500426bf82463f782f88e3730d58a023faa11c54 Mon Sep 17 00:00:00 2001 From: Benjamin Bertrand Date: Mon, 17 Apr 2017 16:48:52 +0300 Subject: [PATCH] Change names and pass tests --- README.md | 20 +++++++++---------- bugs | 8 ++++---- documentation/Makefile | 12 +++++------ documentation/source/conf.py | 16 +++++++-------- documentation/source/index.rst | 8 ++++---- documentation/source/presentation_calculs.rst | 6 +++--- documentation/source/presentation_stat.rst | 4 ++-- {pymath => mapytex}/__init__.py | 0 {pymath => mapytex}/calculus/__init__.py | 0 .../calculus/abstract_polynom.py | 8 ++++---- {pymath => mapytex}/calculus/arithmetic.py | 0 {pymath => mapytex}/calculus/decorators.py | 0 {pymath => mapytex}/calculus/equation.py | 0 {pymath => mapytex}/calculus/explicable.py | 0 {pymath => mapytex}/calculus/expression.py | 0 {pymath => mapytex}/calculus/fraction.py | 0 {pymath => mapytex}/calculus/generic.py | 6 +++--- .../calculus/operator/__init__.py | 0 {pymath => mapytex}/calculus/operator/add.py | 0 {pymath => mapytex}/calculus/operator/div.py | 0 {pymath => mapytex}/calculus/operator/mul.py | 0 .../calculus/operator/operator.py | 0 .../calculus/operator/operator_set.py | 0 {pymath => mapytex}/calculus/operator/par.py | 0 {pymath => mapytex}/calculus/operator/pw.py | 0 {pymath => mapytex}/calculus/operator/sub.py | 0 {pymath => mapytex}/calculus/operator/sub1.py | 0 {pymath => mapytex}/calculus/polynom.py | 0 {pymath => mapytex}/calculus/polynomDeg2.py | 0 .../calculus/random_expression.py | 0 {pymath => mapytex}/calculus/render.py | 6 +++--- {pymath => mapytex}/calculus/renderable.py | 0 {pymath => mapytex}/calculus/step.py | 0 {pymath => mapytex}/calculus/str2tokens.py | 6 +++--- {pymath => mapytex}/calculus/test/__init__.py | 0 .../calculus/test/mass_test.py | 0 .../calculus/test/test_arithmetic.py | 2 +- .../calculus/test/test_expression.py | 4 ++-- .../calculus/test/test_fraction.py | 4 ++-- .../calculus/test/test_generic.py | 4 ++-- .../calculus/test/test_polynom.py | 12 +++++------ .../calculus/test/test_polynomDeg2.py | 4 ++-- .../calculus/test/test_random_expression.py | 2 +- .../calculus/test/test_render.py | 14 ++++++------- .../calculus/test/test_str2tokens.py | 8 ++++---- {pymath => mapytex}/geometry/__init__.py | 0 {pymath => mapytex}/geometry/pythagore.py | 0 {pymath => mapytex}/stat/__init__.py | 0 {pymath => mapytex}/stat/dataset.py | 0 {pymath => mapytex}/stat/number_tools.py | 0 {pymath => mapytex}/stat/random_generator.py | 0 {pymath => mapytex}/stat/weightedDataset.py | 0 requirements.txt | 19 ++++++++++++++++-- setup.py | 17 ++++++++-------- 54 files changed, 103 insertions(+), 87 deletions(-) rename {pymath => mapytex}/__init__.py (100%) rename {pymath => mapytex}/calculus/__init__.py (100%) rename {pymath => mapytex}/calculus/abstract_polynom.py (99%) rename {pymath => mapytex}/calculus/arithmetic.py (100%) rename {pymath => mapytex}/calculus/decorators.py (100%) rename {pymath => mapytex}/calculus/equation.py (100%) rename {pymath => mapytex}/calculus/explicable.py (100%) rename {pymath => mapytex}/calculus/expression.py (100%) rename {pymath => mapytex}/calculus/fraction.py (100%) rename {pymath => mapytex}/calculus/generic.py (98%) rename {pymath => mapytex}/calculus/operator/__init__.py (100%) rename {pymath => mapytex}/calculus/operator/add.py (100%) rename {pymath => mapytex}/calculus/operator/div.py (100%) rename {pymath => mapytex}/calculus/operator/mul.py (100%) rename {pymath => mapytex}/calculus/operator/operator.py (100%) rename {pymath => mapytex}/calculus/operator/operator_set.py (100%) rename {pymath => mapytex}/calculus/operator/par.py (100%) rename {pymath => mapytex}/calculus/operator/pw.py (100%) rename {pymath => mapytex}/calculus/operator/sub.py (100%) rename {pymath => mapytex}/calculus/operator/sub1.py (100%) rename {pymath => mapytex}/calculus/polynom.py (100%) rename {pymath => mapytex}/calculus/polynomDeg2.py (100%) rename {pymath => mapytex}/calculus/random_expression.py (100%) rename {pymath => mapytex}/calculus/render.py (96%) rename {pymath => mapytex}/calculus/renderable.py (100%) rename {pymath => mapytex}/calculus/step.py (100%) rename {pymath => mapytex}/calculus/str2tokens.py (98%) rename {pymath => mapytex}/calculus/test/__init__.py (100%) rename {pymath => mapytex}/calculus/test/mass_test.py (100%) rename {pymath => mapytex}/calculus/test/test_arithmetic.py (92%) rename {pymath => mapytex}/calculus/test/test_expression.py (95%) rename {pymath => mapytex}/calculus/test/test_fraction.py (96%) rename {pymath => mapytex}/calculus/test/test_generic.py (94%) rename {pymath => mapytex}/calculus/test/test_polynom.py (94%) rename {pymath => mapytex}/calculus/test/test_polynomDeg2.py (71%) rename {pymath => mapytex}/calculus/test/test_random_expression.py (97%) rename {pymath => mapytex}/calculus/test/test_render.py (96%) rename {pymath => mapytex}/calculus/test/test_str2tokens.py (90%) rename {pymath => mapytex}/geometry/__init__.py (100%) rename {pymath => mapytex}/geometry/pythagore.py (100%) rename {pymath => mapytex}/stat/__init__.py (100%) rename {pymath => mapytex}/stat/dataset.py (100%) rename {pymath => mapytex}/stat/number_tools.py (100%) rename {pymath => mapytex}/stat/random_generator.py (100%) rename {pymath => mapytex}/stat/weightedDataset.py (100%) diff --git a/README.md b/README.md index 1d51ee9..9009ad3 100644 --- a/README.md +++ b/README.md @@ -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: - *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. ``` python - >>> from pymath import Expression + >>> from mapytex import Expression >>> ajout_fractions = Expression("2 / 5 + 2 / 3") >>> resultat = ajout_fractions.simplify() >>> print(resultat) @@ -30,23 +30,23 @@ mathématiques. Voici ce qu'il est capable de faire: générateur d'expressions est inclus. ``` python - >>> from pymath import Expression + >>> from mapytex import Expression >>> ajout_fraction = Expression.random("{a} + {b} / {c}") >>> print(ajout_fraction) 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 fractions) et les polynômes. L'utilisation des nombres à virgules et des racines devraient être ajoutés dans les prochaines versions. ``` python - >>> from pymath import Fraction + >>> from mapytex import Fraction >>> une_fraction = Fraction(1,2) >>> print(une_fraction) 1 / 2 - >>> from pymath import Polynom + >>> from mapytex import Polynom >>> un_polynom = Polynom([1,2,3]) >>> print(un_polynom) 3 x^{ 2 } + 2 x + 1 @@ -57,7 +57,7 @@ mathématiques. Voici ce qu'il est capable de faire: des documents latex. ``` python - >>> from pymath import Expression + >>> from mapytex import Expression >>> ajout_fractions = Expression("2 / 5 + 2 / 3") >>> for i in ajout_fractions.simpliy().explain(): ... print(i) @@ -67,7 +67,7 @@ mathématiques. Voici ce qu'il est capable de faire: \frac{ 6 }{ 15 } + \frac{ 10 }{ 15 } \frac{ 6 + 10 }{ 15 } \frac{ 16 }{ 15 } - >>> from pymath import txt + >>> from mapytex import txt >>> with Expression.tmp_render(txt): ... for i in ajout_fractions.simpliy().explain(): ... print(i) diff --git a/bugs b/bugs index 39b713e..520a3ff 100644 --- a/bugs +++ b/bugs @@ -43,7 +43,7 @@ In [4]: e = Expression("1+2*3") In [5]: e + P - Out[5]: < [1, 2, 3, '*', '+', < Polynom [1, 2, 1]>, '+'] > + Out[5]: < [1, 2, 3, '*', '+', < Polynom [1, 2, 1]>, '+'] > In [6]: P + e --------------------------------------------------------------------------- @@ -51,14 +51,14 @@ in () ----> 1 P + e - /home/lafrite/scripts/pyMath/pymath/polynom.py in __add__(self, other) - 430 [< [3, 'x', 2, '^', '*', 2, 'x', '*', '+', 1, '+', 5, 'x', '*', 4, '+', '+'] >, < Polynom [< [1, 4, '+'] >, < [2, 5, '+'] >, 3]>, < Polynom [< [1, 4, '+'] >, < [2, 5, '+'] >, 3]>] + /home/lafrite/scripts/Mapytex/mapytex/polynom.py in __add__(self, other) + 430 [< [3, 'x', 2, '^', '*', 2, 'x', '*', '+', 1, '+', 5, 'x', '*', 4, '+', '+'] >, < Polynom [< [1, 4, '+'] >, < [2, 5, '+'] >, 3]>, < Polynom [< [1, 4, '+'] >, < [2, 5, '+'] >, 3]>] 431 """ --> 432 o_poly = self.conv2poly(other) 433 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 320 else: --> 321 raise ValueError(type(other) + " can't be converted into a polynom") diff --git a/documentation/Makefile b/documentation/Makefile index fc633f8..cfe706c 100644 --- a/documentation/Makefile +++ b/documentation/Makefile @@ -85,17 +85,17 @@ qthelp: @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".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 "# assistant -collectionFile $(BUILDDIR)/qthelp/pyMath.qhc" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Mapytex.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/pyMath" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/pyMath" + @echo "# mkdir -p $$HOME/.local/share/devhelp/Mapytex" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Mapytex" @echo "# devhelp" epub: @@ -177,9 +177,9 @@ pseudoxml: @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." #SSH_CONF=kimsufi -#SSH_TARGET_DIR=/var/www/opytex.org/pymath +#SSH_TARGET_DIR=/var/www/opytex.org/mapytex 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 -e "ssh" -P -rvzc --delete $(BUILDDIR)/html/ $(SSH_CONF):$(SSH_TARGET_DIR) --cvs-exclude diff --git a/documentation/source/conf.py b/documentation/source/conf.py index 0fb3f74..20f7fa1 100644 --- a/documentation/source/conf.py +++ b/documentation/source/conf.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # -*- 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. # # This file is execfile()d with the current directory set to its @@ -49,7 +49,7 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = 'pyMath' +project = 'Mapytex' copyright = '2015, Benjamin Bertrand' # The version info for the project you're documenting, acts as replacement for @@ -121,7 +121,7 @@ html_theme_options = { #'navbar_title': "Opytex", #'navbar_links': [ # ('Opytex', "/opytex/"), - # ("pyMath", "/pymaht/"), + # ("Mapytex", "/pymaht/"), # ("Enseignement", "/Enseignements"), # #('blog', '/blog_index.html'), # ('À propos', "/about") @@ -203,7 +203,7 @@ html_static_path = ['_static'] #html_file_suffix = None # Output file base name for HTML help builder. -htmlhelp_basename = 'pyMathdoc' +htmlhelp_basename = 'Mapytexdoc' # -- Options for LaTeX output --------------------------------------------- @@ -223,7 +223,7 @@ latex_elements = { # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - ('index', 'pyMath.tex', 'pyMath Documentation', + ('index', 'Mapytex.tex', 'Mapytex Documentation', 'Benjamin Bertrand', 'manual'), ] @@ -253,7 +253,7 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'pymath', 'pyMath Documentation', + ('index', 'pymath', 'Mapytex Documentation', ['Benjamin Bertrand'], 1) ] @@ -267,8 +267,8 @@ man_pages = [ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - ('index', 'pyMath', 'pyMath Documentation', - 'Benjamin Bertrand', 'pyMath', 'One line description of project.', + ('index', 'Mapytex', 'Mapytex Documentation', + 'Benjamin Bertrand', 'Mapytex', 'One line description of project.', 'Miscellaneous'), ] diff --git a/documentation/source/index.rst b/documentation/source/index.rst index 85247fd..49b7ca7 100644 --- a/documentation/source/index.rst +++ b/documentation/source/index.rst @@ -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. You can adapt this file completely to your liking, but it should at least 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. -À la difference d'un logiciel de calcul formel classique (comme `sympy `_), 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 `_), 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: diff --git a/documentation/source/presentation_calculs.rst b/documentation/source/presentation_calculs.rst index 83e4920..7b63df3 100644 --- a/documentation/source/presentation_calculs.rst +++ b/documentation/source/presentation_calculs.rst @@ -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é 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) 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 fractions) et les polynômes. L'utilisation des nombres à virgules et des racines devraient être ajoutés dans les prochaines versions. diff --git a/documentation/source/presentation_stat.rst b/documentation/source/presentation_stat.rst index 784ad88..e49af04 100644 --- a/documentation/source/presentation_stat.rst +++ b/documentation/source/presentation_stat.rst @@ -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 ------------------- diff --git a/pymath/__init__.py b/mapytex/__init__.py similarity index 100% rename from pymath/__init__.py rename to mapytex/__init__.py diff --git a/pymath/calculus/__init__.py b/mapytex/calculus/__init__.py similarity index 100% rename from pymath/calculus/__init__.py rename to mapytex/calculus/__init__.py diff --git a/pymath/calculus/abstract_polynom.py b/mapytex/calculus/abstract_polynom.py similarity index 99% rename from pymath/calculus/abstract_polynom.py rename to mapytex/calculus/abstract_polynom.py index a939b96..28305ea 100644 --- a/pymath/calculus/abstract_polynom.py +++ b/mapytex/calculus/abstract_polynom.py @@ -206,8 +206,8 @@ class AbstractPolynom(Explicable): >>> p = AbstractPolynom([1,[-2,0]]) >>> p.coefs_postifx() [[1], [-2, 'x', *]] - >>> from pymath.calculus.expression import Expression - >>> from pymath.calculus.operator import op + >>> from mapytex.calculus.expression import Expression + >>> from mapytex.calculus.operator import op >>> e = Expression([2,3,op.add]) >>> p = AbstractPolynom([1,e]) >>> p.coefs_postifx() @@ -262,8 +262,8 @@ class AbstractPolynom(Explicable): >>> p = AbstractPolynom([1,[-2,-3]]) >>> p.postfix_tokens [-2, 'x', *, -3, 'x', *, +, 1, +] - >>> from pymath.calculus.expression import Expression - >>> from pymath.calculus.operator import op + >>> from mapytex.calculus.expression import Expression + >>> from mapytex.calculus.operator import op >>> e = Expression([2,3,op.add]) >>> p = AbstractPolynom([1,e]) >>> p.postfix_tokens diff --git a/pymath/calculus/arithmetic.py b/mapytex/calculus/arithmetic.py similarity index 100% rename from pymath/calculus/arithmetic.py rename to mapytex/calculus/arithmetic.py diff --git a/pymath/calculus/decorators.py b/mapytex/calculus/decorators.py similarity index 100% rename from pymath/calculus/decorators.py rename to mapytex/calculus/decorators.py diff --git a/pymath/calculus/equation.py b/mapytex/calculus/equation.py similarity index 100% rename from pymath/calculus/equation.py rename to mapytex/calculus/equation.py diff --git a/pymath/calculus/explicable.py b/mapytex/calculus/explicable.py similarity index 100% rename from pymath/calculus/explicable.py rename to mapytex/calculus/explicable.py diff --git a/pymath/calculus/expression.py b/mapytex/calculus/expression.py similarity index 100% rename from pymath/calculus/expression.py rename to mapytex/calculus/expression.py diff --git a/pymath/calculus/fraction.py b/mapytex/calculus/fraction.py similarity index 100% rename from pymath/calculus/fraction.py rename to mapytex/calculus/fraction.py diff --git a/pymath/calculus/generic.py b/mapytex/calculus/generic.py similarity index 98% rename from pymath/calculus/generic.py rename to mapytex/calculus/generic.py index 1793313..d435083 100644 --- a/pymath/calculus/generic.py +++ b/mapytex/calculus/generic.py @@ -351,7 +351,7 @@ def isPolynom(exp): :param exp: an expression :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]) >>> isPolynom(p) 1 @@ -373,11 +373,11 @@ def isNumerand(exp): >>> isNumerand(1) 1 - >>> from pymath.calculus.polynom import Polynom + >>> from mapytex.calculus.polynom import Polynom >>> p = Polynom([1,2]) >>> isNumerand(p) 1 - >>> from pymath.calculus.fraction import Fraction + >>> from mapytex.calculus.fraction import Fraction >>> f = Fraction(12) >>> isNumerand(f) 1 diff --git a/pymath/calculus/operator/__init__.py b/mapytex/calculus/operator/__init__.py similarity index 100% rename from pymath/calculus/operator/__init__.py rename to mapytex/calculus/operator/__init__.py diff --git a/pymath/calculus/operator/add.py b/mapytex/calculus/operator/add.py similarity index 100% rename from pymath/calculus/operator/add.py rename to mapytex/calculus/operator/add.py diff --git a/pymath/calculus/operator/div.py b/mapytex/calculus/operator/div.py similarity index 100% rename from pymath/calculus/operator/div.py rename to mapytex/calculus/operator/div.py diff --git a/pymath/calculus/operator/mul.py b/mapytex/calculus/operator/mul.py similarity index 100% rename from pymath/calculus/operator/mul.py rename to mapytex/calculus/operator/mul.py diff --git a/pymath/calculus/operator/operator.py b/mapytex/calculus/operator/operator.py similarity index 100% rename from pymath/calculus/operator/operator.py rename to mapytex/calculus/operator/operator.py diff --git a/pymath/calculus/operator/operator_set.py b/mapytex/calculus/operator/operator_set.py similarity index 100% rename from pymath/calculus/operator/operator_set.py rename to mapytex/calculus/operator/operator_set.py diff --git a/pymath/calculus/operator/par.py b/mapytex/calculus/operator/par.py similarity index 100% rename from pymath/calculus/operator/par.py rename to mapytex/calculus/operator/par.py diff --git a/pymath/calculus/operator/pw.py b/mapytex/calculus/operator/pw.py similarity index 100% rename from pymath/calculus/operator/pw.py rename to mapytex/calculus/operator/pw.py diff --git a/pymath/calculus/operator/sub.py b/mapytex/calculus/operator/sub.py similarity index 100% rename from pymath/calculus/operator/sub.py rename to mapytex/calculus/operator/sub.py diff --git a/pymath/calculus/operator/sub1.py b/mapytex/calculus/operator/sub1.py similarity index 100% rename from pymath/calculus/operator/sub1.py rename to mapytex/calculus/operator/sub1.py diff --git a/pymath/calculus/polynom.py b/mapytex/calculus/polynom.py similarity index 100% rename from pymath/calculus/polynom.py rename to mapytex/calculus/polynom.py diff --git a/pymath/calculus/polynomDeg2.py b/mapytex/calculus/polynomDeg2.py similarity index 100% rename from pymath/calculus/polynomDeg2.py rename to mapytex/calculus/polynomDeg2.py diff --git a/pymath/calculus/random_expression.py b/mapytex/calculus/random_expression.py similarity index 100% rename from pymath/calculus/random_expression.py rename to mapytex/calculus/random_expression.py diff --git a/pymath/calculus/render.py b/mapytex/calculus/render.py similarity index 96% rename from pymath/calculus/render.py rename to mapytex/calculus/render.py index 786b995..942fd03 100644 --- a/pymath/calculus/render.py +++ b/mapytex/calculus/render.py @@ -79,9 +79,9 @@ p2i = Render(p2i_render) if __name__ == '__main__': from .operator import op from itertools import permutations - from pymath import Polynom - from pymath import Expression - from pymath import Fraction + from mapytex import Polynom + from mapytex import Expression + from mapytex import Fraction coefs_p = [[(i - 2), (j - 2)] for i, j in permutations(range(5), 2)] coefs_q = [[2 * (i - 2), 2 * (j - 2)] for i, j in permutations(range(5), 2)] diff --git a/pymath/calculus/renderable.py b/mapytex/calculus/renderable.py similarity index 100% rename from pymath/calculus/renderable.py rename to mapytex/calculus/renderable.py diff --git a/pymath/calculus/step.py b/mapytex/calculus/step.py similarity index 100% rename from pymath/calculus/step.py rename to mapytex/calculus/step.py diff --git a/pymath/calculus/str2tokens.py b/mapytex/calculus/str2tokens.py similarity index 98% rename from pymath/calculus/str2tokens.py rename to mapytex/calculus/str2tokens.py index e9c70b6..3d58a1c 100644 --- a/pymath/calculus/str2tokens.py +++ b/mapytex/calculus/str2tokens.py @@ -101,7 +101,7 @@ def feed_digit(character, tok_b, tok_bb): [-1] >>> feed_digit(1, '-', 2) ['-', 1] - >>> from pymath.calculus.polynom import Polynom + >>> from mapytex.calculus.polynom import Polynom >>> feed_digit(1, '-', Polynom([0,1])) ['-', 1] @@ -128,7 +128,7 @@ def hidden_meaning_time(tok_b): ['*'] >>> hidden_meaning_time(')') ['*'] - >>> from pymath.calculus.polynom import Polynom + >>> from mapytex.calculus.polynom import Polynom >>> hidden_meaning_time(Polynom([0,1])) ['*'] >>> hidden_meaning_time("+") @@ -152,7 +152,7 @@ def feed_alpha(character): :returns: tokens to add """ - from pymath.calculus.polynom import Polynom + from mapytex.calculus.polynom import Polynom return Polynom([0, 1], letter=character) diff --git a/pymath/calculus/test/__init__.py b/mapytex/calculus/test/__init__.py similarity index 100% rename from pymath/calculus/test/__init__.py rename to mapytex/calculus/test/__init__.py diff --git a/pymath/calculus/test/mass_test.py b/mapytex/calculus/test/mass_test.py similarity index 100% rename from pymath/calculus/test/mass_test.py rename to mapytex/calculus/test/mass_test.py diff --git a/pymath/calculus/test/test_arithmetic.py b/mapytex/calculus/test/test_arithmetic.py similarity index 92% rename from pymath/calculus/test/test_arithmetic.py rename to mapytex/calculus/test/test_arithmetic.py index 0e582ec..e1a0410 100644 --- a/pymath/calculus/test/test_arithmetic.py +++ b/mapytex/calculus/test/test_arithmetic.py @@ -2,7 +2,7 @@ # encoding: utf-8 -from pymath.calculus import arithmetic +from mapytex.calculus import arithmetic def test_gcd_commu(): diff --git a/pymath/calculus/test/test_expression.py b/mapytex/calculus/test/test_expression.py similarity index 95% rename from pymath/calculus/test/test_expression.py rename to mapytex/calculus/test/test_expression.py index b9ebfe4..dd1dbc4 100644 --- a/pymath/calculus/test/test_expression.py +++ b/mapytex/calculus/test/test_expression.py @@ -4,8 +4,8 @@ """ Testing Expression """ -from pymath.calculus.expression import Expression -from pymath.calculus.operator import op +from mapytex.calculus.expression import Expression +from mapytex.calculus.operator import op def test_init_from_str(): diff --git a/pymath/calculus/test/test_fraction.py b/mapytex/calculus/test/test_fraction.py similarity index 96% rename from pymath/calculus/test/test_fraction.py rename to mapytex/calculus/test/test_fraction.py index a789966..2547440 100644 --- a/pymath/calculus/test/test_fraction.py +++ b/mapytex/calculus/test/test_fraction.py @@ -3,11 +3,11 @@ import unittest -from pymath.calculus.fraction import Fraction +from mapytex.calculus.fraction import Fraction class TestFraction(unittest.TestCase): - """Testing functions from pymath.calculus.Fraction""" + """Testing functions from mapytex.calculus.Fraction""" def setUp(self): self.listFrom = [Fraction(1, 3), 1] diff --git a/pymath/calculus/test/test_generic.py b/mapytex/calculus/test/test_generic.py similarity index 94% rename from pymath/calculus/test/test_generic.py rename to mapytex/calculus/test/test_generic.py index ef730f1..ec1d982 100644 --- a/pymath/calculus/test/test_generic.py +++ b/mapytex/calculus/test/test_generic.py @@ -4,11 +4,11 @@ import unittest -from pymath.calculus import generic +from mapytex.calculus import generic class TestGeneric(unittest.TestCase): - """Testing functions from pymath.calculus.generic""" + """Testing functions from mapytex.calculus.generic""" def test_flatten_list1(self): l = [1, [2, 3], [[4, 5], 6], 7] diff --git a/pymath/calculus/test/test_polynom.py b/mapytex/calculus/test/test_polynom.py similarity index 94% rename from pymath/calculus/test/test_polynom.py rename to mapytex/calculus/test/test_polynom.py index c325443..cf4f8e9 100644 --- a/pymath/calculus/test/test_polynom.py +++ b/mapytex/calculus/test/test_polynom.py @@ -4,15 +4,15 @@ import unittest -from pymath.calculus.polynom import Polynom -from pymath.calculus.fraction import Fraction -from pymath.calculus.expression import Expression -from pymath.calculus.render import txt -from pymath.calculus.operator import op +from mapytex.calculus.polynom import Polynom +from mapytex.calculus.fraction import Fraction +from mapytex.calculus.expression import Expression +from mapytex.calculus.render import txt +from mapytex.calculus.operator import op class TestPolynom(unittest.TestCase): - """Testing functions from pymath.calculus.polynom""" + """Testing functions from mapytex.calculus.polynom""" def setup(self): Expression.set_render(txt) diff --git a/pymath/calculus/test/test_polynomDeg2.py b/mapytex/calculus/test/test_polynomDeg2.py similarity index 71% rename from pymath/calculus/test/test_polynomDeg2.py rename to mapytex/calculus/test/test_polynomDeg2.py index 5670fba..7784770 100644 --- a/pymath/calculus/test/test_polynomDeg2.py +++ b/mapytex/calculus/test/test_polynomDeg2.py @@ -4,11 +4,11 @@ import unittest -from pymath.calculus.polynomDeg2 import Polynom_deg2 +from mapytex.calculus.polynomDeg2 import Polynom_deg2 class TestPolynomDeg2(unittest.TestCase): - """Testing functions from pymath.calculus.polynomDeg2""" + """Testing functions from mapytex.calculus.polynomDeg2""" pass diff --git a/pymath/calculus/test/test_random_expression.py b/mapytex/calculus/test/test_random_expression.py similarity index 97% rename from pymath/calculus/test/test_random_expression.py rename to mapytex/calculus/test/test_random_expression.py index a417447..f383a97 100644 --- a/pymath/calculus/test/test_random_expression.py +++ b/mapytex/calculus/test/test_random_expression.py @@ -2,7 +2,7 @@ # encoding: utf-8 -from pymath.calculus.random_expression import RdExpression +from mapytex.calculus.random_expression import RdExpression def test_only_form(): diff --git a/pymath/calculus/test/test_render.py b/mapytex/calculus/test/test_render.py similarity index 96% rename from pymath/calculus/test/test_render.py rename to mapytex/calculus/test/test_render.py index e8c40af..51ba472 100644 --- a/pymath/calculus/test/test_render.py +++ b/mapytex/calculus/test/test_render.py @@ -4,11 +4,11 @@ import unittest -from pymath.calculus.render import tex, txt -from pymath.calculus.fraction import Fraction -from pymath.calculus.polynom import Polynom -from pymath.calculus.operator import op -from pymath.calculus.expression import Expression +from mapytex.calculus.render import tex, txt +from mapytex.calculus.fraction import Fraction +from mapytex.calculus.polynom import Polynom +from mapytex.calculus.operator import op +from mapytex.calculus.expression import Expression from itertools import permutations @@ -30,7 +30,7 @@ def mass_poly_test(operation, rg=5): class TestTexRender(unittest.TestCase): - """Testing functions from pymath.calculus.renders.tex""" + """Testing functions from mapytex.calculus.renders.tex""" def test_type_render_int(self): self.assertEqual(tex([2]), "2") @@ -209,7 +209,7 @@ class TestTexRender(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): self.assertEqual(txt([2]), "2") diff --git a/pymath/calculus/test/test_str2tokens.py b/mapytex/calculus/test/test_str2tokens.py similarity index 90% rename from pymath/calculus/test/test_str2tokens.py rename to mapytex/calculus/test/test_str2tokens.py index 361f26a..66a7d22 100644 --- a/pymath/calculus/test/test_str2tokens.py +++ b/mapytex/calculus/test/test_str2tokens.py @@ -4,13 +4,13 @@ import unittest -from pymath.calculus.str2tokens import str2tokens, str2in_tokens, in2post_fix -from pymath.calculus.polynom import Polynom -from pymath.calculus.operator import op +from mapytex.calculus.str2tokens import str2tokens, str2in_tokens, in2post_fix +from mapytex.calculus.polynom import Polynom +from mapytex.calculus.operator import op class TestStr2tokens(unittest.TestCase): - """Testing functions from pymath.calculus.str2tokens""" + """Testing functions from mapytex.calculus.str2tokens""" def test_str2in_tokens(self): ans = str2in_tokens("2+3*4") diff --git a/pymath/geometry/__init__.py b/mapytex/geometry/__init__.py similarity index 100% rename from pymath/geometry/__init__.py rename to mapytex/geometry/__init__.py diff --git a/pymath/geometry/pythagore.py b/mapytex/geometry/pythagore.py similarity index 100% rename from pymath/geometry/pythagore.py rename to mapytex/geometry/pythagore.py diff --git a/pymath/stat/__init__.py b/mapytex/stat/__init__.py similarity index 100% rename from pymath/stat/__init__.py rename to mapytex/stat/__init__.py diff --git a/pymath/stat/dataset.py b/mapytex/stat/dataset.py similarity index 100% rename from pymath/stat/dataset.py rename to mapytex/stat/dataset.py diff --git a/pymath/stat/number_tools.py b/mapytex/stat/number_tools.py similarity index 100% rename from pymath/stat/number_tools.py rename to mapytex/stat/number_tools.py diff --git a/pymath/stat/random_generator.py b/mapytex/stat/random_generator.py similarity index 100% rename from pymath/stat/random_generator.py rename to mapytex/stat/random_generator.py diff --git a/pymath/stat/weightedDataset.py b/mapytex/stat/weightedDataset.py similarity index 100% rename from pymath/stat/weightedDataset.py rename to mapytex/stat/weightedDataset.py diff --git a/requirements.txt b/requirements.txt index 4dc1ec2..63a2ac5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,17 @@ -pyparsing==2.0.3 -sympy==0.7.6 +appdirs==1.4.3 +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 diff --git a/setup.py b/setup.py index 59de801..f183703 100644 --- a/setup.py +++ b/setup.py @@ -5,11 +5,12 @@ try: except ImportError: from distutils.core import setup -setup(name='pyMath', - version='1.1', - description='Computing like a student', - author='Benjamin Bertrand', - author_email='lafrite@poneyworld.net', - packages=['pymath'], - install_requires=['pyparsing', 'sympy'], - ) +setup( + name='Mapytex', + version='1.1', + description='Computing like a student', + author='Benjamin Bertrand', + author_email='lafrite@poneyworld.net', + packages=['mapytex'], + # install_requires=['pyparsing', 'sympy'], + )