Thu, 28 Sep 2017 17:20:31 +0300fix ungrouped imports from package X
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Thu, 28 Sep 2017 17:20:31 +0300] rev 1834
fix ungrouped imports from package X

Thu, 28 Sep 2017 16:25:05 +0300fix unnecessary lambda and enable corresponding pylint check
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Thu, 28 Sep 2017 16:25:05 +0300] rev 1833
fix unnecessary lambda and enable corresponding pylint check

Thu, 28 Sep 2017 15:17:57 +0300fix wrong-import-order. first standard modules are imported, then others
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Thu, 28 Sep 2017 15:17:57 +0300] rev 1832
fix wrong-import-order. first standard modules are imported, then others

Thu, 28 Sep 2017 12:20:40 +0300fix (old-style-class) Old-style class defined error for most parts of
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Thu, 28 Sep 2017 12:20:40 +0300] rev 1831
fix (old-style-class) Old-style class defined error for most parts of
the code

only PyJS code is left, because it does some fancy tricks and can't be
easily fixed. So far PyJS doesn't support Python3 anyway.

Fri, 22 Sep 2017 20:12:22 +0300remove in-tree version of Zeroconf and use upstream from
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Fri, 22 Sep 2017 20:12:22 +0300] rev 1830
remove in-tree version of Zeroconf and use upstream from
python-zeroconf package

Fri, 22 Sep 2017 18:06:15 +0300remove reimported modules
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Fri, 22 Sep 2017 18:06:15 +0300] rev 1829
remove reimported modules

Fri, 22 Sep 2017 16:37:38 +0300fix unnecessary parens after keyword
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Fri, 22 Sep 2017 16:37:38 +0300] rev 1828
fix unnecessary parens after keyword

Fri, 22 Sep 2017 10:57:57 +0300enable pylint checker
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Fri, 22 Sep 2017 10:57:57 +0300] rev 1827
enable pylint checker

so far only print statement is checked

Fri, 22 Sep 2017 10:54:42 +0300fix usage of python2-only print statement
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Fri, 22 Sep 2017 10:54:42 +0300] rev 1826
fix usage of python2-only print statement

Fri, 22 Sep 2017 10:52:44 +0300run python tests with non-english locale to catch bugs related to localization
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Fri, 22 Sep 2017 10:52:44 +0300] rev 1825
run python tests with non-english locale to catch bugs related to localization

Thu, 21 Sep 2017 17:19:18 +0300make it possible to update XSD schema in project controller after new
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Thu, 21 Sep 2017 17:19:18 +0300] rev 1824
make it possible to update XSD schema in project controller after new
target PLC is added or removed.

For example:


...
import targets
targets.targets["PLC"] = {"xsd": os.path.join(self.customBeremizPath, "PLCtarget", xsd),
"class": lambda: PLC_target,
"code": {"plc_PLC_main.c": os.path.join(self.customBeremizPath, "PLCtarget", "plc_PLC_main.c")}
}

from ProjectController import ProjectController, GetProjectControllerXSD
ProjectController.XSD = GetProjectControllerXSD()

Thu, 21 Sep 2017 16:06:51 +0300fix commit "lazy initialization of highlight pens and brushes
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Thu, 21 Sep 2017 16:06:51 +0300] rev 1823
fix commit "lazy initialization of highlight pens and brushes
for DebugVariableViewer" (5562f34f)

Thu, 21 Sep 2017 15:04:15 +0300clean build example project after running test
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Thu, 21 Sep 2017 15:04:15 +0300] rev 1822
clean build example project after running test

Thu, 21 Sep 2017 15:02:36 +0300fix problem if DataTypeEditor was imported before localization is
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Thu, 21 Sep 2017 15:02:36 +0300] rev 1821
fix problem if DataTypeEditor was imported before localization is
loaded

That doesn't affect systems with english locales.

Sat, 16 Sep 2017 21:26:17 +0300add shell script to run all python tests and automatically handle Xvfb
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Sat, 16 Sep 2017 21:26:17 +0300] rev 1820
add shell script to run all python tests and automatically handle Xvfb

Sat, 16 Sep 2017 21:24:22 +0300add PLCOpenEditor tests
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Sat, 16 Sep 2017 21:24:22 +0300] rev 1819
add PLCOpenEditor tests

Sat, 16 Sep 2017 21:22:53 +0300run application tests in full screen mode
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Sat, 16 Sep 2017 21:22:53 +0300] rev 1818
run application tests in full screen mode

Sat, 16 Sep 2017 21:22:06 +0300clean sys.argv, because if test is running from pytest
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Sat, 16 Sep 2017 21:22:06 +0300] rev 1817
clean sys.argv, because if test is running from pytest
sys.argv contains string "pytest --timeout 0 ./tests/tools"
Beremiz application parses it and throws exception.

Sat, 16 Sep 2017 21:19:19 +0300rework Beremiz application "testCheckProject" test to allow easier reuse later
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Sat, 16 Sep 2017 21:19:19 +0300] rev 1816
rework Beremiz application "testCheckProject" test to allow easier reuse later

Sat, 16 Sep 2017 21:04:34 +0300add application name for PLCOpenEditor
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Sat, 16 Sep 2017 21:04:34 +0300] rev 1815
add application name for PLCOpenEditor

This is needed to work user configuration load/store, if PLCOpenEditor
is launched from test environment.

Fri, 15 Sep 2017 20:30:24 +0300rewrite PLCOpenEditor. Add PLCOpenEditorApp class for easier customizations.
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Fri, 15 Sep 2017 20:30:24 +0300] rev 1814
rewrite PLCOpenEditor. Add PLCOpenEditorApp class for easier customizations.

Fri, 15 Sep 2017 20:28:54 +0300lazy locale initialization
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Fri, 15 Sep 2017 20:28:54 +0300] rev 1813
lazy locale initialization

wx.Locale() can't be called without wx.App. So don't call it at
import. It makes PLCOpenEditor simpler.

Fri, 15 Sep 2017 20:05:41 +0300use CustomIntCtrl instead of wx.SpinCtrl because it doesn't support
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Fri, 15 Sep 2017 20:05:41 +0300] rev 1812
use CustomIntCtrl instead of wx.SpinCtrl because it doesn't support
long integer needed for UDINT, (U)LINT types.

This commit complements commit 74a3f4d "fix LINT and ULINT ranges".

Fri, 15 Sep 2017 20:01:21 +0300add custom TextCtrl allowed to enter long integer with bounds checking
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Fri, 15 Sep 2017 20:01:21 +0300] rev 1811
add custom TextCtrl allowed to enter long integer with bounds checking

It's needed because wx.SpinCtrl supports only 'int' type. For UDINT
and (U)LINT long type is necessary.

Fri, 15 Sep 2017 19:53:49 +0300use pytest for testing
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Fri, 15 Sep 2017 19:53:49 +0300] rev 1810
use pytest for testing

Fri, 15 Sep 2017 19:51:31 +0300run separate test on every project instead of one big long test all projects
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Fri, 15 Sep 2017 19:51:31 +0300] rev 1809
run separate test on every project instead of one big long test all projects

Fri, 15 Sep 2017 19:45:41 +0300move configuration for test environment into separate file conftest.py
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Fri, 15 Sep 2017 19:45:41 +0300] rev 1808
move configuration for test environment into separate file conftest.py

Fri, 15 Sep 2017 19:01:31 +0300lazy initialization of highlight pens and brushes for DebugVariableViewer
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Fri, 15 Sep 2017 19:01:31 +0300] rev 1807
lazy initialization of highlight pens and brushes for DebugVariableViewer

Constructors wx.Pen() and wx.Brush() require wx.App to exist already.
That causes crash during import of the control,
because import is done before calling main application code.

Fri, 15 Sep 2017 18:57:20 +0300add '_' function to builtin dictionary at import time
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Fri, 15 Sep 2017 18:57:20 +0300] rev 1806
add '_' function to builtin dictionary at import time

This allows to import many Beremiz python modules before calling
util.misc.InstallLocalRessources().

Fri, 15 Sep 2017 18:51:42 +0300remove builtin BMZ_DBG. It's not used.
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Fri, 15 Sep 2017 18:51:42 +0300] rev 1805
remove builtin BMZ_DBG. It's not used.

Wed, 13 Sep 2017 15:39:48 +0300update translation strings
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Wed, 13 Sep 2017 15:39:48 +0300] rev 1804
update translation strings

Wed, 13 Sep 2017 15:35:43 +0300updated all existing translations
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Wed, 13 Sep 2017 15:35:43 +0300] rev 1803
updated all existing translations
added new languages: Portuguese (Portugal), Italian, Hungarian,
Spanish and Bengali. See version.py for information about translators.

Wed, 13 Sep 2017 10:18:04 +0300fix LINT and ULINT ranges
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Wed, 13 Sep 2017 10:18:04 +0300] rev 1802
fix LINT and ULINT ranges

Tue, 12 Sep 2017 18:32:13 +0300found installed Inkscape on Windows
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Tue, 12 Sep 2017 18:32:13 +0300] rev 1801
found installed Inkscape on Windows

tested with Inkscape version 0.9 on Windows 7.

Tue, 12 Sep 2017 16:49:35 +0300make possible to turn off at compile time online debugging, logging
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Tue, 12 Sep 2017 16:49:35 +0300] rev 1800
make possible to turn off at compile time online debugging, logging
and external sync functionality

Defines TARGET_DEBUG_DISABLE, TARGET_LOGGING_DISABLE, TARGET_EXT_SYNC_DISABLE
allow to use generated PLC code in low-cost microcontrollers,
integrate into external programs and so on.

main.c:
extern void __run(void);
int main(void)
{
for(;;) {
__run();
// sleep common_ticktime__ ns
// add common_ticktime__ ns to __CURRENT_TIME
}
return 0;
}

Compile for example for arm bare-metal:
../build$ arm-none-eabi-gcc \
-DTARGET_DEBUG_DISABLE -DTARGET_LOGGER_DISABLE
-DTARGET_EXT_SYNC_DISABLE \
-flto -ffunction-sections -fdata-sections -I../../../../matiec/lib/C \
*.c \
-nodefaultlibs --specs=nano.specs -Wl,--static -Wl,--gc-section -Wl,--start-group -lc -lm -lnosys -lgcc -Wl,--end-group

Tue, 12 Sep 2017 14:22:17 +0300make default caption for PouNameDialog translatable
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Tue, 12 Sep 2017 14:22:17 +0300] rev 1799
make default caption for PouNameDialog translatable

Tue, 12 Sep 2017 14:18:50 +0300fix max value for UDINT and ULINT types
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Tue, 12 Sep 2017 14:18:50 +0300] rev 1798
fix max value for UDINT and ULINT types

Tue, 12 Sep 2017 14:13:39 +0300update Build icon
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Tue, 12 Sep 2017 14:13:39 +0300] rev 1797
update Build icon

Tue, 12 Sep 2017 10:21:51 +0300add couple Beremiz application tests
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Tue, 12 Sep 2017 10:21:51 +0300] rev 1796
add couple Beremiz application tests

These tests trigger around 45% of python code.
Used in tests docker files are avaiable here:
https://bitbucket.org/skvorl/beremiz-dockerfiles

Fri, 08 Sep 2017 11:53:48 +0300fix problem if _should_write is called by expired timer after
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Fri, 08 Sep 2017 11:53:48 +0300] rev 1795
fix problem if _should_write is called by expired timer after
termination of wx application.

Mon, 28 Aug 2017 10:49:53 +0000Initial Bitbucket Pipelines configuration
Sergey Surkov <surkovsv93@gmail.com> [Mon, 28 Aug 2017 10:49:53 +0000] rev 1794
Initial Bitbucket Pipelines configuration

Mon, 28 Aug 2017 13:43:46 +0300fix bug with unfinished debug thread
Surkov Sergey <surkovsv93@gmail.com> [Mon, 28 Aug 2017 13:43:46 +0300] rev 1793
fix bug with unfinished debug thread
this bug occurs when user doesn't stop debugging process in current project, and opens another project

Fri, 25 Aug 2017 14:01:44 +0300unify exception handling of Beremiz and PLCOpenEditor
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Fri, 25 Aug 2017 14:01:44 +0300] rev 1792
unify exception handling of Beremiz and PLCOpenEditor

Fri, 25 Aug 2017 12:23:45 +0300fix problem running PLCOpenEditor
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Fri, 25 Aug 2017 12:23:45 +0300] rev 1791
fix problem running PLCOpenEditor

$ ./PLCOpenEditor.py
../src/common/stdpbase.cpp(62): assert "traits" failed in Get(): create wxApp before calling this

Regression was introduced by '3311eea' (clean-up: fix PEP8 E402 module level import not at top of file)

Fri, 25 Aug 2017 12:01:23 +0300don't check any particular wx version
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Fri, 25 Aug 2017 12:01:23 +0300] rev 1790
don't check any particular wx version

Beremiz works with any version of wx.

Fri, 25 Aug 2017 11:22:08 +0300fix problem when Beremiz is running without matiec installed
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Fri, 25 Aug 2017 11:22:08 +0300] rev 1789
fix problem when Beremiz is running without matiec installed

set matiec settings only once on first use of ProjectController class and give
user-friendly message on compilation about missing matiec
installation.


Traceback (most recent call last):
File "Beremiz.py", line 197, in <module>
beremiz.Start()
File "Beremiz.py", line 192, in Start
self.CreateApplication()
File "Beremiz.py", line 130, in CreateApplication
self.BackgroundInitialization()
File "Beremiz.py", line 137, in BackgroundInitialization
self.ImportModules()
File "Beremiz.py", line 176, in ImportModules
import BeremizIDE
File
"BeremizIDE.py", line 76, in <module>
from ProjectController import ProjectController, GetAddMenuItems,
MATIEC_ERROR_MODEL, ITEM_CONFNODE
File
"ProjectController.py", line 177, in <module>
iec2c_cfg = Iec2CSettings()
File
"ProjectController.py", line 101, in __init__
self.ieclib_c_path = self.findLibCPath()
File
"ProjectController.py", line 135, in findLibCPath
os.path.join(self.ieclib_path, "C"),
File "/usr/lib/python2.7/posixpath.py", line 70, in join
elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

Tue, 22 Aug 2017 14:15:49 +0000Initial Bitbucket Pipelines configuration
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Tue, 22 Aug 2017 14:15:49 +0000] rev 1788
Initial Bitbucket Pipelines configuration

Tue, 22 Aug 2017 17:14:40 +0300add configuration for Bitbucket pipelines
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Tue, 22 Aug 2017 17:14:40 +0300] rev 1787
add configuration for Bitbucket pipelines

Tue, 22 Aug 2017 17:14:08 +0300add shell script to test Beremiz python code
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Tue, 22 Aug 2017 17:14:08 +0300] rev 1786
add shell script to test Beremiz python code

currently only codestyle checking is done using pycodestyle (ex-pep8).
Later checks by flake8 and pylint maybe enabled.

Tue, 22 Aug 2017 12:45:06 +0300clean-up: fix PEP8 W503 line break before binary operator
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Tue, 22 Aug 2017 12:45:06 +0300] rev 1785
clean-up: fix PEP8 W503 line break before binary operator

Mon, 21 Aug 2017 23:22:58 +0300fix codestyle issues according to PEP8
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Mon, 21 Aug 2017 23:22:58 +0300] rev 1784
fix codestyle issues according to PEP8

Mon, 21 Aug 2017 22:41:37 +0300clean-up: fix PEP8 E402 module level import not at top of file
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Mon, 21 Aug 2017 22:41:37 +0300] rev 1783
clean-up: fix PEP8 E402 module level import not at top of file

Mon, 21 Aug 2017 21:55:18 +0300clean-up: fix PEP8 E265 block comment should start with '# '
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Mon, 21 Aug 2017 21:55:18 +0300] rev 1782
clean-up: fix PEP8 E265 block comment should start with '# '

Sat, 19 Aug 2017 21:06:54 +0300clean-up: fix PEP8 E266 too many leading '#' for block comment
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Sat, 19 Aug 2017 21:06:54 +0300] rev 1781
clean-up: fix PEP8 E266 too many leading '#' for block comment

Sat, 19 Aug 2017 18:12:20 +0300clean-up: fix PEP8 E722 do not use bare except'
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Sat, 19 Aug 2017 18:12:20 +0300] rev 1780
clean-up: fix PEP8 E722 do not use bare except'

better it'd be to use particular exception instead of 'except Exception'.

Sat, 19 Aug 2017 17:17:54 +0300clean-up: fix PEP8 E115 expected an indented block (comment)
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Sat, 19 Aug 2017 17:17:54 +0300] rev 1779
clean-up: fix PEP8 E115 expected an indented block (comment)

Sat, 19 Aug 2017 17:12:12 +0300clean-up: fix PEP8 E721 do not compare types, use 'isinstance()'
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Sat, 19 Aug 2017 17:12:12 +0300] rev 1778
clean-up: fix PEP8 E721 do not compare types, use 'isinstance()'

Sat, 19 Aug 2017 17:04:31 +0300clean-up: fix PEP8 E131 continuation line unaligned for hanging indent
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Sat, 19 Aug 2017 17:04:31 +0300] rev 1777
clean-up: fix PEP8 E131 continuation line unaligned for hanging indent

Sat, 19 Aug 2017 16:45:37 +0300clean-up: fix PEP8 E122 continuation line missing indentation or outdented
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Sat, 19 Aug 2017 16:45:37 +0300] rev 1776
clean-up: fix PEP8 E122 continuation line missing indentation or outdented

Sat, 19 Aug 2017 16:30:15 +0300clean-up: fix PEP8 E713 test for membership should be 'not in'
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Sat, 19 Aug 2017 16:30:15 +0300] rev 1775
clean-up: fix PEP8 E713 test for membership should be 'not in'

Sat, 19 Aug 2017 01:11:27 +0300clean-up: fix PEP8 E272 multiple spaces before keyword
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Sat, 19 Aug 2017 01:11:27 +0300] rev 1774
clean-up: fix PEP8 E272 multiple spaces before keyword

Sat, 19 Aug 2017 00:58:44 +0300clean-up: fix PEP8 E124 closing bracket does not match visual indentation
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Sat, 19 Aug 2017 00:58:44 +0300] rev 1773
clean-up: fix PEP8 E124 closing bracket does not match visual indentation

Sat, 19 Aug 2017 00:30:22 +0300clean-up: fix PEP8 W191 indentation contains tabs
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Sat, 19 Aug 2017 00:30:22 +0300] rev 1772
clean-up: fix PEP8 W191 indentation contains tabs

Sat, 19 Aug 2017 00:11:12 +0300clean-up: fix PEP8 E211 whitespace before '[' or '('
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Sat, 19 Aug 2017 00:11:12 +0300] rev 1771
clean-up: fix PEP8 E211 whitespace before '[' or '('