Logo CalcAlCalcAl - Historique des versions



Versions utilisateurs

A venir.


Versions de développement

CalcAl_v0.55 : 28/7/2018 : use Python 3.7
- 9580 lines py code (include 1901 lines pytest)
- gui/CalcAlGUI.py:        # 21/7/2018 : TMD : Bug correction _tkinter.TclError: expected integer but got ""
- remove a duplicate unit test function
- Installer and packager works again on Mac after py2app source code modification
- Pylint quality : 9.06/10

CalcAl_v0.54 : 19/2/2018 : read Ciqual 2017 new Anses table
- 9633 lines py code (include 1959 lines pytest)
- read Ciqual 2017 new Anses table
- Logging system restored as in V0.52.

CalcAl_v0.53 : 8/5/2017 : Modify logging init
- 8787 lines py code (include 1489 lines pytest)
- Suppress -d, --debug option
- Logging system is now defined in .ini file and can be modified without modifying python code.

CalcAl_v0.52 : 8/5/2017 : Quality and ergonomy
- 8693 lines py code (include 1409 lines pytest), 4722 statements analysed
- Pylint : code has been rated at 9.91/10
    - Import BD dialog : file chooser filter according DB type
    - Possibility to cancel Web Browser launching
    - correct bug when importing zipped Ciqual : zipped archive not supported because
          Ciqual table is given uncompressed on ANSES web site.
- Use decorators for statics functions
- Use flake8 to check PEPS 8 coding rules.
- Quality improvements, harden pylints rules in .pylintrc.

CalcAl_v0.51 : 5/3/2017 : Include documentation in project
    - French documentation available in directory CalcAl_doc
    - New option of menu ? / Documentation that launch documentation in user's WEB browser.
    - New Help button in New database dialog

CalcAl_v0.50 : 18/2/2017 : Improve packaging on Mac and correct bugs
- 8577 lines py code (include 1364 lines pytest)
    - Rewrite package_mac.sh :
        - correct crash in semi-standalone version
        - import the good tinter version in standalone .app
        - parameter to script to build semi-standalone version with -s option.
            - identify .app : standalone and semi_standalone
    - Round group composition values with 1 digit.
    - CalculatorFrame : add buttons :
        + to improve food search, - to clear food selector entry
    - Clean Database/createUserTables() : remove old database updating

CalcAl_v0.49 : 1/2/2017 : correction bug search frame
- 8547 lines py code (include 1364 lines pytest)
- Pylint : code has been rated at 9.77/10
    - SearchFood() : correct bug in column order :
        SearchThreadedTask.py/runSearch remove set conversion for listComp
        set is not ordered, but list is ordered when iterating
    - Search frame messages : add constituent names in message
        To see on an hight speed machine, activate debug
    - Message Translation : results, about group…


CalcAl_v0.48 : 18/1/2017 : Installer on Mac and windows
    - On windows : Package_win.bat
        Create exe with py2exe and package it
        Build an installer using InnoSetup
    - On mac : Package_mac.sh
        - Add background image in .dmg
        - Add a link to /applications in .dmg

CalcAl_v0.47 : 7/1/2017 : Energies recalculated when missing
- 8509 lines py code (include 1364 lines pytest)
- Pylint : code has been rated at 9.77/10
    - Add new function : Database/correctEnergyKcal() to correct databases
        when energies are missing.
    - Remove absolute path in package_mac.sh and setup_model.py

CalcAl_v0.46 : 27/12/2016 : correct encoding and accent problems
    - in CiqualReader.py  : change encoding when reading ciqual ref file :
        iso8859-1 -> cp1252
    - Bug implementation Tkinter 8.5 with new OS X.12.1 corrected in OS X.12.2
        2016-11-18 17:22:15.145 Python[2389:114966] CALayer position contains NaN: [nan 0]
        when placing mouse cursor on an empty scrollbar.
    - Correct Tk 8.5.18 corrects accents problems causing exception
        http://www.activestate.com/activetcl/downloads/thank-you?dl=http://downloads.activestate.com/ActiveTcl/releases/8.5.18.0/ActiveTcl8.5.18.0.298892-macosx10.5-i386-x86_64-threaded.dmg
        This version Tk 8.5.18 corrects accents problems causing exception :
        libc++abi.dylib: terminating with uncaught exception of type NSException
        Install :
        Download .dmg, double clic on it
        Right-clic on the package + Open + admin password + Continue + Accept licence +
        admin password + install Software + Yes + No + Installation Succes + Close
    - Correct problem in database/Database.py/getProductsNamesContainingPart() :
        capitalise only first car in global search for selecting food with wildcards

CalcAl_v0.45 : 19/12/2016 : Ciqual 2016
- 8415 lines py code (include 1364 lines pytest)
- Pylint : code has been rated at 9.78/10
- Create resources/database/ciqual_2016_constituants.txt table to get components codes
- Add new components codes in locale/*/componants_shortcuts.txt to get shorctcuts for
    new components : Salt and Chloride
- Ciqual_2013_Reader -> Ciqual_Reader for reading Ciqual 2013 and 2016 init file
- Modify database/joinDatabase to add or update components from second DB
    and to deal with product of same name but different code in the 2 databases
- Correct bug in Energy table when database does not contain alcool component
    ie : USDA SR28 database
- Log message when deleting a database.
- Correct Bug in getEnergyRatio() when adding food without energy defined
    or no energy supplied like for water.
- Correct Bug in EnergyFrame : don’t update when erasing a food in calculator frame.

CalcAl_v0.44 : 3/12/2016 : Test on Pocket PC Windows 7 + Quality
- 8277 lines py code (include 1364 lines pytest)
- Pylint : code has been rated at 9.73/10
- portability on Windows 7 :
    User home detection : package pwd not available
    homeUser = os.path.expanduser("~")
- Adapt Windows size to tiny computer (Pocket PC)
- Correct Pylint warnings

CalcAl_v0.43 : 2/12/2016 : Quality review
- 7980 lines py code (include 1379 lines pytest)
- Pylint : code has been rated at 9.63/10
- Solve problem update() of observer overriding tkinter update() method
Pylint warning : Arguments number differs from overridden 'update' method (arguments-differ)
- Solve Pylint warning :
    Wildcard import tkinter (wildcard-import)
    Wildcard import tkinter.ttk (wildcard-import)
- Solve bug missing argument in Module model.CalculatorFrameModel
************* Module model.CalculatorFrameModel
E:166,18: No value for argument 'message' in constructor call (no-value-for-parameter)
E:208,18: No value for argument 'message' in constructor call (no-value-for-parameter)
W:213,12: Unused variable 'name' (unused-variable)
W:213,18: Unused variable 'quantity' (unused-variable)
W:395,12: Unused variable 'name' (unused-variable)
W:395,18: Unused variable 'quantity' (unused-variable)
W:429,12: Unused variable 'name' (unused-variable)
W:429,18: Unused variable 'quantity' (unused-variable)
C: 41, 0: standard import "import logging" comes before "from model import Foodstuff" (wrong-import-order)
- CalculatorFrame : Solve bug when deleting a group : definition Frame not updated :
    family combobox and food name combobox.
- PatientFrame : add new tooltips
- When deleting a pathologies, deletes all records related to this pathology in
    patientPathologies table

CalcAl_v0.42 : 1/12/2016 : Patient frame
- 7927 lines py code (include 1380 lines pytest)
- Pylint : code has been rated at 9.55/10
- Correct error button label in Pathology Frame
- Create new tables
- Get existing patient from portions table to initialise patients
- Comboboxes for rations frame and dialog
- Clear not error messages automatically after a delay
- New banner for frame patient designed by Perrine
- Disable pathologie definition if multiple pathologies selection
- Use quality checker Pylint and correct some problems
python3 -m pylint --disable=invalid-name,unused-wildcard-import,undefined-variable,too-many-locals,too-many-branches,too-many-arguments,too-many-public-methods,too-many-statements,too-few-public-methods,too-many-instance-attributes,too-many-ancestors,too-many-nested-blocks,bad-continuation,line-too-long,unused-argument,bad-continuation *.py */*.py > doc/resu_pylint.txt

CalcAl_v0.41 : 25/11/2016 : nbDays stored in portions table
- 7253 lines py code (include 1380 lines pytest)
- insert all pathology constituants with only one SQL statement
    in database/savePathology()
- Update schema of portions table with a new column nbDays (default value to 1)
    in database/Database.py/createUserTables()
    existing database are updating
- save nbDays in table portions in database.Database/insertPortion()
- Displaying nbDays when reloading a portion from database
- Correct bug in CalculatorFrame/changeNbDays() when setting nbDays to 1 (pb test)
- Correct dates format in portion tables
- Check date entered by user when saving a portion
- New button Today in gui/PortionInfoChooser()
- Tooltip on Date entry in gui/PortionInfoChooser()
- Check date copied from and old portion : if problem : message warning dialog.
- New banner designed by Perrine for pathology Frame.
- Editor for pathology description instead of entry field +
    Reorganisation frames in gui/PathologyFrame.py

CalcAl_v0.40 : 23/11/2016 : Pathology frame
- 7021 lines py code (include 1299 lines pytest)
- Correct problem of special component not present in Model when loading a ration.
- Implement pathology frame

CalcAl_v0.39 : 18/11/2016 : Speed portion display
- 6387 lines py code (include 1076 lines pytest)
- Speed portion display when put from Portion frame to calculator.
    by accessing only one time to database and creating Foodstuffs
    and Components without accessing database.

CalcAl_v0.38 : 17/11/2016 : Nb days to eat a portion in Calculator Frame
- 6296 lines py code (include 1064 lines pytest)
- Correct bug of bad version in Mac .app info
    package_mac.sh get version number from CalcAl.ini file
- New combobox in calculator frame for nbDays to eat food if >1 2nd total line
- CalculatorFrameModel/displayPortion() :Reset components to special component
    to speed up components insertion when displaying a portion in calculator frame.

CalcAl_v0.37 : 13/11/2016 : speed search frame
- 6218 lines py code (include 1055 lines pytest)
- Correct bug in CalculatorFrame, unable to change database
    when line of food exist
- improve speed in Search frame

CalcAl_v0.36 : 12/11/2016 : Refactoring
- 6046 lines py code (include 1055 lines pytest)
- Model package to host diet modules
- Introduce Design Pattern : Publish–subscribe pattern
- Unit testing : unittest.sh + unittest
- Add sugar and total energy in energy table
- Better control of Selection Menu : Disable if no food in table

CalcAl_v0.35 : 14/10/2016 : Packaging Mac
- 4404 lines py code
- new doc file : packaging.txt
- import path to package inside gui and database with relative path.
- __init__.py in package dir gui and database
- remove directorysrc and move its entries to project base dir
- Test in Calcal.py if Calcal.ini file is availaible
- Calcal.py : configApp.read(fileConfigApp, encoding="utf-8") add encoding else crash of app
- CalcAlGUIMenu/installReader() : bug : add self.configApp.get("Resources", "ReadersDir")
- Calcal.py/setLocaleCalcal() new function to solve locale setting problems in bundle app
- Impossible to run plugin import for readers in a Mac app.
    Solution :
    Deliver to users versions with or without plugins by adding or deleting pllugin
    in database directory before packaging Mac app.
- Speed up portion insertion in calculator frame by adding group of aliments in tables,
    add functions : CalculatorFrame.py/addFoodGroupInTable() and
    TableTreeView.py/insertGroupRow()

CalcAl_v0.34 : 2/10/2016 : Don't write in project directory
- 4310 lines py code
- Don't write in project directory but in user's home dir for :
    - Log messages,
    - databases.
- Avoid code replication between : Database/formatListComponentsValues() and
    Database/formatListQualifiersValues()
- Avoid portability problem : remove a / in key CalcAl.ini/Resources/ReadersDir
    Create key CalcAl.ini/Resources/SourceDir

CalcAl_v0.33 : 30/9/2016 : speed up
- 4281 lines py code
- StartFrame frame :
    bind return keys on database list
    failed to bind doubleclic on database list
- Calculator frame : speed up insertion of a foodstufff in main table food
    Problem : addTotalRow() exttracts all values for each componant of each foodstuf
              again from database to be summed.
    Solution : Sum values from displayed table and not from database
        TableTreeView : add method getAllColumnsValues()
        Database :  add methods formatListQualifiersValues

CalcAl_v0.32 : 28/9/2016 : Portion management
- 4223 lines py code
- Portion management
- User table are now not created by readers,
    but cheched is done each time a database is opened.
    and created in Database/createUserTables()
- Language detection and translation :
    Hack on Windows : ref : http://python.zirael.org/e-localization4.html
    For gettext.install to detect User language
- Plugin installation modified in CalcAlGUIMenu.py
- add more advice on tables Tooltip : Ctrl-c

CalcAl_v0.31 : 18/9/2016 : Thread when search food
- 3659 lines py code
- SearchFoodFrame : use thread when searching in database to avoid GUI blocking
- CalcAlGUIMenu : Add in menu selection of erase item
- USDA_28_Reader : Capitalize family and product name
- Change icon for erase line in food calculator : eraseselection.gif

CalcAl_v0.30 : 27/8/2016 :
- 3436 lines py code
- DatabaseManager class to manage database operations for CalcAl software
- Info button on database
- Solve problem vO.29 : groups and usda products codes are in the same range >= 1000000
    minCompositionProductCode -> startGroupProductCodes
    all users codes are now negatives : groups codes start below 0
    modif CalcAl.ini and Database.py
- Solve old ungrouping problem :
    When ungrouping and one or more members of the group already present in the list,
    the quantity of this previous element is replace instead of added with ungrouped parts
- Info button for food in CalculatorFrame
- Change field name productCodeCiqual -> productCodePart in compositionProducts table
    + productCodeUSDA -> productCodePart
- Suppress double quotes in familyName when importing Ciqual database
- Bouton to delete user elements in CalculatorFrame : group
- Correction Language detection problems in CalcAl.py
- Translation of shortcut table in english : locale/en/componants_shortcuts.txt
- Join button added : join products and constituants values and names
    from 2 databases are merged but user groups are ignored

CalcAl_v0.29 : 30/7/2016 : USDA_28_Reader
- 2974 lines py code
- Add USDA_28_Reader.py to read USDA abreviated database
- Add file usda_constituants.txt to match Ciqual constituants name

CalcAl_v0.28 : 28/7/2016 : unknown constituants
- 2732 lines py code
- Empty value (-) for unknown constituants are not recorded in databases
- Results of getComponentsValuesRaw4Food() are now sorted by its parameter
    listComponentsCodes order
- SearchFoodFrame : constituants are displayed according filters order
- SearchFoodFrame/search() : Déplacement génération code SQL de condition de recherche
    dans module Database Database/getProductComponents4Filters

CalcAl_v0.27 : 11/7/2016 : Reader plugins
- 2692 lines py code
- Simplify constructors parameter by passing dirProject
- Database reader as plugins : message to contact support if missing
- Add support Emails in About box
- Read .csv or .csv.zip file for ciqual database
- Copy database provider URL in clipboard in DatabaseInitialiser.py
- Install a Ciqual Reader plugin present on the computer

CalcAl_v0.26 : 24/6/2016 :
- 2627 lines py code
- Database is choosen with a file chooser : class DatabaseInitialiser.py
- Correction of bug if change database : init pane calculator
- Suppress btn search by component in pane calculator
- Ciqual init file out of sources
- Demo.db database with only "Aliments moyens"
- prevent to delete Demo.db database

CalcAl_v0.25 : 18/6/2016 :
- 2563 lines py code
- Bypass for python error message when start button icon is disabled
- Module database : implement design pattern factory to structure this module
- New class : DatabaseReaderFactory.py + CiqualReader.py

CalcAl_v0.24 : 3/6/2016 :
- 2463 lines py code
- Solve pb of décimal séparateur when copying in clipboard.
    Use locale.localeconv()['decimal_point'] in TableTreeView.py
    to know local usage for this system.
- In search frame, display first results when too many ar found.
- Correct bug CalculatorFrame/Energy %  when food gives no energy (water)
- Dialog box when creating a group.
- CalculatorFrame : Put a food in table when hitting return in quantity
- set binding Ctrl-C, Command-C and double clic for food tables in
    CalculatorFrame and SearchFrame
- set binding Ctrl-C, Command-C for energy table to copy values in clipboard

CalcAl_v0.23 : 29/5/2016 :
- Compulsory mention of Ciqual in Start Frame and About box
- Add database menu
- In startframe, list of database showing 4 element and a scrollbar added.
- Correct bug in search frame for the order of components titles diferent from
    order of values.
- Icon for start button

CalcAl_v0.22 : 22/5/2016 :
- 2179 lines py code
- Allow . ou , as decimal separator for quantity.
- TableTreeView : Correct change2Numeric() when value contains "< "
- SearchFoodFrame :
    - Display foods and components with TreeView widget for search results
    - Erase filter line if operator is erased.
    - improve look of the frame
- Copy to clipboard for table content.

CalcAl_v0.21 : 21/5/2016 :
- 2054 lines py code
- Tables headers are actives
    - for values header, sort columns by values ascending or descending order
    - for key header, select or deselect al rows
- All Components values are qualified : Number, Traces, -, < Number
    Sums are made according rules in config file to maintain values qualification.

CalcAl_v0.20 : 15/5/2016 :
- 1927 lines py code
- Tables implemented with Tkinter TreeView widget
- Better windows layout and resizing
- Reduce number code lines of 300 lines for same functionalities

CalcAl_v0.19 : 7/5/2016 :
- 2212 lines py code
- Tables implemented with grid layout
- Test on touchable Windows 8 PC and Mac with small screen


Chapitre précédent :  Maintenance - Chapitre suivant : Evolution


Copyleft (c) 2017  - Perrine et Thierry Maillard
Vous avez la permission de copier, distribuer ou modifier ce document selon les termes de la licence GNU de documentation libre, dans sa version 1.3 ou dans toute version ultérieure publiée par la Free Software Foundation ; sans Section Invariante, sans Texte De Première De Couverture, et sansTexte De Quatrième De Couverture.
Une copie de cette licence est incluse dans la section intitulée "Licence GNU de documentation libre" : GNU Free Documentation License.
Une copie de cette Licence est incluse dans le fichier gfdl.1.3-js.fr.html