Commit ffec4a69 authored by Jérôme Ortais's avatar Jérôme Ortais
Browse files

Préparation de la version 18.6

parent ae90b4e6
......@@ -5,7 +5,7 @@
### CONFIG
#
# Pyromaths version
VERSION ?= 18.5.7
VERSION ?= 18.6
# Archive format(s) produced by 'make src' (bztar,gztar,zip...)
FORMATS ?= bztar,zip
# Verbosity and logging
......
data/ex/img/InterpolationMatrices.png

12.3 KB | W: | H:

data/ex/img/InterpolationMatrices.png

14.4 KB | W: | H:

data/ex/img/InterpolationMatrices.png
data/ex/img/InterpolationMatrices.png
data/ex/img/InterpolationMatrices.png
data/ex/img/InterpolationMatrices.png
  • 2-up
  • Swipe
  • Onion skin
data/ex/img/cercle_trigonometrique.png

21.7 KB | W: | H:

data/ex/img/cercle_trigonometrique.png

21.5 KB | W: | H:

data/ex/img/cercle_trigonometrique.png
data/ex/img/cercle_trigonometrique.png
data/ex/img/cercle_trigonometrique.png
data/ex/img/cercle_trigonometrique.png
  • 2-up
  • Swipe
  • Onion skin
{
"Arithmetique": "36c89ba9c16cbb81ced232cb1351cf2f",
"ArrondirNombreDecimal": "08996c503f0247ecb648384bb7b2e107",
"BilanTrinomeSansDiscriminant": "e657e58f9faf4fd3c7d1ac4aa85ee21a",
"BilanTrinomeSansDiscriminant": "0f83882c7f364d2f0892056349638b70",
"CalculMental": "4901e9079081b9e8d7144e68471245f9",
"ClasserNombres": "8585b809a4a76662119cc707e07e7ea5",
"ConstruireZigZag": "70d954ff1917c2325c7361b48d33d159",
......@@ -13,7 +13,7 @@
"EtatStableSysteme2": "c28bc307317dca72f2c4bad4d1f134ba",
"Fd1Tangentes": "10ed3a781b3ee3ee8480ed73db2e90c9",
"FractionPartage": "d798dc7ffae542cb6881fd5da25958bb",
"InterpolationMatrices": "2a209226153e27a847a9ecbf3ee7b223",
"InterpolationMatrices": "fef817e27110878b0b13fbddfeb08097",
"MesureAngles": "d5422b7c1b3a0820ab656ac4dc5dba8b",
"Operations": "e6fa199addd2b8b0805dc02079628521",
"Perpendiculaires": "80dc4d19e3f46d4b2e420dfbea25fa05",
......
pyromaths (18.6-1) bionic; urgency=medium
[ Jérôme Ortais ]
* Nouvel exercice niveau terminale ES (spécialité) : Déterminer l'état stable d'un graphe probabiliste (en utilisant un système d'équations).
* Nouvel exercice niveau terminale ES (spécialité) : Résoudre un système d'équations en utilisant les matrices.
* Nouvel exercice niveau seconde : Bilan sur les trinômes.
* Création d'une nouvelle classe d'exercices (rétro-compatible), pour faciliter l'écriture d'exercices en utilisant le moteur de templates jinja2.
* Documentation : Ajout d'une page d'exemples.
* Documentation : Ajout d'un tutoriel pour la création de nouveaux exercices.
* Mise à jour de `cree-vignettes.py` (utilisé pour créer les vignettes des exercices).
* Nettoyage du code ; petites corrections de bug ; améliorations diverses.
-- Jérôme Ortais <jerome.ortais@pyromaths.org> Sun, 17 Jun 2018 20:21:32 +0200
pyromaths (18.5.7-1) bionic; urgency=medium
* Correction de bugs
......
......@@ -9,7 +9,7 @@ Homepage: http://www.pyromaths.org/
Package: pyromaths
Architecture: all
Depends: ${python:Depends}, ${misc:Depends}, python-qt4, python-lxml, texlive-pstricks, texlive-latex-base, texlive-latex-extra, texlive-fonts-recommended, texlive-latex-recommended, latexmk, asymptote, texlive-pictures, texlive-lang-french
Depends: ${python:Depends}, ${misc:Depends}, python-jinja2, python-qt4, python-lxml, texlive-pstricks, texlive-latex-base, texlive-latex-extra, texlive-fonts-recommended, texlive-latex-recommended, latexmk, asymptote, texlive-pictures, texlive-lang-french
Description: Exerciseur de mathématiques créant des fiches LaTeX
Pyromaths est un programme qui a pour but de créer des exercices
type de mathématiques niveau collège et lycée ainsi que leur corrigé. C'est
......
......@@ -74,7 +74,7 @@ def _unix_opt():
('share/pyromaths/templates', glob('data/templates/*.tex')),
# ('share/pyromaths/packages', glob('data/packages/*'))
] + \
find_data_files('data/ex','share/pyromaths/ex/',['img/*.png']),
find_data_files('data/ex','share/pyromaths/ex/',['img/*.png', 'templates/*.tex']),
install_requires = COMMON_INSTALL_REQUIRES + ["lxml>=2.2.2"],
)
......@@ -157,7 +157,7 @@ Name: "{commondesktop}\Pyromaths"; Filename: "{app}\pyromaths.exe"
),
(r'data/templates', glob(r'data/templates/*.tex')),
# (r'data/packages', glob(r'data/packages/*')),
] + find_data_files('data/ex','data/ex/',['img/*.png']),
] + find_data_files('data/ex','data/ex/',['img/*.png', 'templates/*.tex']),
zipfile = None,
windows = [dict(script="pyromaths",
icon_resources=[(1, 'data/images/pyromaths.ico')],
......
......@@ -62,7 +62,7 @@ else:
def configdir():
return join(home(), ".config", "pyromaths")
VERSION = '18.5.7'
VERSION = '18.6'
COPYRIGHT_YEAR = strftime('%Y')
COPYRIGHTS = _(u'© 2006 – %s Jérôme Ortais<br/>\n' \
u'<span style=" font-size:small;">Pyromaths est distribué sous ' \
......
......@@ -29,6 +29,71 @@ from pyromaths.classes.PolynomesCollege import Polynome, factoriser
from pyromaths.classes.SquareRoot import SquareRoot
from pyromaths.outils.Arithmetique import carrerise, pgcd, valeur_alea
"""Exercice de seconde : Chapitre Second degré."""
import random
from pyromaths.ex import Jinja2Exercice
from pyromaths.outils.jinja2 import facteur
def signe(nombre):
"""Renvoit une chaîne contenant le signe de l'argument."""
if nombre < 0:
return "-"
return "+"
class BilanTrinomeSansDiscriminant(Jinja2Exercice):
description = u"Bilan sur les trinômes"
level = u"2.Seconde"
def __init__(self):
super(BilanTrinomeSansDiscriminant, self).__init__()
while True:
a = float(random.choice([-1, 1]) * random.choice([0.5, 2]))
x1 = float(random.choice([-1, 1]) * random.randint(2, 15))
x2 = float(random.choice([-1, 1]) * random.randint(2, 15))
b = -a * (x1 + x2)
c = a * x1 * x2
alpha = -b/(2*a)
beta = a * (alpha**2) + b * alpha + c
if alpha == 0 or beta == 0:
continue
if b == 0 or c == 0:
continue
if beta == c:
continue
break
self.context = {
"a": a,
"b": b,
"c": c,
"x1": x1,
"x2": x2,
"alpha": alpha,
"absalpha": abs(alpha), # Valeur absolue de alpha
"signealpha": alpha/abs(alpha), # Signe de alpha (qui est non nul)
"beta": beta,
}
@property
def environment(self):
environment = super(BilanTrinomeSansDiscriminant, self).environment
environment.filters.update({
'facteur': facteur,
'min': min,
'max': max,
'abs': abs,
'signe': signe,
})
return environment
def creerPolydegre2(nb_racines=2, rac_radical=True, rac_quotient=False):
if nb_racines == 2:
redo = True
......
# -*- coding: utf-8 -*-
#
# Pyromaths
#
# Un programme en Python qui permet de créer des fiches d'exercices types de
# mathématiques niveau collège ainsi que leur corrigé en LaTeX.
#
# Copyright (C) 2018 -- Louis Paternault (spalax@gresille.org)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
"""Exercice de seconde : Chapitre Second degré."""
import random
from pyromaths.ex import Jinja2Exercice
from pyromaths.outils.jinja2 import facteur
def signe(nombre):
"""Renvoit une chaîne contenant le signe de l'argument."""
if nombre < 0:
return "-"
return "+"
class BilanTrinomeSansDiscriminant(Jinja2Exercice):
description = u"Bilan sur les trinômes"
level = u"2.Seconde"
def __init__(self):
super(BilanTrinomeSansDiscriminant, self).__init__()
while True:
a = float(random.choice([-1, 1]) * random.choice([0.5, 2]))
x1 = float(random.choice([-1, 1]) * random.randint(2, 15))
x2 = float(random.choice([-1, 1]) * random.randint(2, 15))
b = -a * (x1 + x2)
c = a * x1 * x2
alpha = -b/(2*a)
beta = a * (alpha**2) + b * alpha + c
if alpha == 0 or beta == 0:
continue
if b == 0 or c == 0:
continue
if beta == c:
continue
break
self.context = {
"a": a,
"b": b,
"c": c,
"x1": x1,
"x2": x2,
"alpha": alpha,
"absalpha": abs(alpha), # Valeur absolue de alpha
"signealpha": alpha/abs(alpha), # Signe de alpha (qui est non nul)
"beta": beta,
}
@property
def environment(self):
environment = super(BilanTrinomeSansDiscriminant, self).environment
environment.filters.update({
'facteur': facteur,
'min': min,
'max': max,
'abs': abs,
'signe': signe,
})
return environment
REM Cre l'installateur Windows
C:
REM A effectuer la 1re fois, aprs avoir install Python-2.7.15
REM cd "C:\Users\%username%\"
REM pip install virtualenv
REM virtualenv "C:\Users\%username%\BUILD-pyromaths"
REM C:\Users\%username%\Build-pyromaths\Scripts\python -m pip install lxml C:\Users\%username%\Downloads\PyQt4-4.11.4-cp27-cp27m-win32.whl jinja2==2.8 pypiwin32
REM C:\Users\%username%\Build-pyromaths\Scripts\python -m pip install py2exe_py2
REM C:\Users\%username%\Build-pyromaths\Scripts\python -m pip install innosetup
cd "C:\Users\%username%\BUILD-pyromaths"
copy e:\dist\*.zip . /y /B
"c:\Program Files\7-Zip\7z.exe" x pyromaths-*.zip
del pyromaths-*.zip
cd pyromaths-*
C:\Users\%username%\Build-pyromaths\Scripts\python -m pip install --upgrade lxml PyQt4 pypiwin32 py2exe_py2 innosetup
C:\Users\%username%\BUILD-pyromaths\Scripts\python setup.py innosetup"
copy dist\pyromaths-*-win32.exe e:\dist /Y
cd "C:\Users\%username%\BUILD-pyromaths"
rmdir /Q /S pyromaths-*
cd ..
\ No newline at end of file
......@@ -5,7 +5,7 @@ PYROPATH=$(cd `dirname $0` && cd .. && pwd)
# Install build dependencies (if needed)
if [ ! -f /usr/bin/debuild ];
then
sudo apt-get install devscripts equivs python-setuptools
sudo apt-get install devscripts equivs python-setuptools dh-python
fi
if [ ! -f /usr/bin/rpm ];
then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment