From 6632544f21d7fe26913c7fd344f63c7cc8e63886 Mon Sep 17 00:00:00 2001 From: Kit Yan Choi Date: Wed, 14 Oct 2020 12:06:10 +0100 Subject: [PATCH 01/14] Make sure we install the local source. Some other test dependencies bring in the released enable already. This means attempt to install the local source may not override the released copy. --- ci/edmtool.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ci/edmtool.py b/ci/edmtool.py index c0223d3b2..a9a2878e2 100644 --- a/ci/edmtool.py +++ b/ci/edmtool.py @@ -135,6 +135,10 @@ dependencies.add('Cython') +#: Path to the top-level source directory +ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) + + @click.group() def cli(): pass @@ -165,7 +169,9 @@ def install(runtime, toolkit, pillow, environment): if toolkit == 'pyqt5': commands.append("edm run -e {environment} -- pip install pyqt5==5.9.2") - commands.append("edm run -e {environment} -- python setup.py install") + commands.append( + "edm run -e {environment} -- pip install --force-reinstall " + ROOT + ) click.echo("Creating environment '{environment}'".format(**parameters)) execute(commands, parameters) From 375a3a71f96ad312cfd0c6a7a0d86bb391f8a8f3 Mon Sep 17 00:00:00 2001 From: Kit Yan Choi Date: Wed, 14 Oct 2020 12:25:36 +0100 Subject: [PATCH 02/14] Add liblzma to the travis CI environment --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 6c6738449..b802e9649 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,7 @@ addons: - libpng-dev - libfreetype6-dev - libcairo2-dev + - liblzma-dev - libglu1-mesa-dev env: From e7670a0b85b1641b88a829a660a00d027bdfc3c1 Mon Sep 17 00:00:00 2001 From: Kit Yan Choi Date: Wed, 14 Oct 2020 14:42:11 +0100 Subject: [PATCH 03/14] Pin libtiff 4.0.10-5 and see what happens on CI --- ci/edmtool.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci/edmtool.py b/ci/edmtool.py index a9a2878e2..e87df4e59 100644 --- a/ci/edmtool.py +++ b/ci/edmtool.py @@ -109,6 +109,8 @@ "chaco", "mayavi", "scipy", + # FIXME: We need to workaround libtiff 4.0.10-6 from EDM? + "libtiff==4.0.10-5", } extra_dependencies = { From 46f010aa44b62b492aa4c47be599ef676556de5e Mon Sep 17 00:00:00 2001 From: Kit Yan Choi Date: Wed, 14 Oct 2020 14:54:38 +0100 Subject: [PATCH 04/14] Test if the liblzma-dev from apt is necessary --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b802e9649..6c6738449 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,6 @@ addons: - libpng-dev - libfreetype6-dev - libcairo2-dev - - liblzma-dev - libglu1-mesa-dev env: From 05bf0b71d091accf288bdd43fa1dfb2cbd9e59fa Mon Sep 17 00:00:00 2001 From: Kit Yan Choi Date: Wed, 14 Oct 2020 15:52:41 +0100 Subject: [PATCH 05/14] Upgrade EDM so to use the default RH7 repo --- .travis.yml | 2 +- appveyor.yml | 2 +- ci/edmtool.py | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6c6738449..4325645b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ addons: env: global: - - INSTALL_EDM_VERSION=2.0.0 + - INSTALL_EDM_VERSION=3.0.1 PYTHONUNBUFFERED="1" matrix: diff --git a/appveyor.yml b/appveyor.yml index e0ff6139f..598edc366 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,7 +5,7 @@ environment: global: PYTHONUNBUFFERED: "1" - INSTALL_EDM_VERSION: "2.0.0" + INSTALL_EDM_VERSION: "3.0.1" matrix: - RUNTIME: '3.5' diff --git a/ci/edmtool.py b/ci/edmtool.py index e87df4e59..a9a2878e2 100644 --- a/ci/edmtool.py +++ b/ci/edmtool.py @@ -109,8 +109,6 @@ "chaco", "mayavi", "scipy", - # FIXME: We need to workaround libtiff 4.0.10-6 from EDM? - "libtiff==4.0.10-5", } extra_dependencies = { From 9d7a077d19877c066dfa04e0c4eb5965399eccc0 Mon Sep 17 00:00:00 2001 From: Kit Yan Choi Date: Wed, 14 Oct 2020 16:45:05 +0100 Subject: [PATCH 06/14] Use released versions close to the build on #387 --- ci/requirements.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ci/requirements.txt b/ci/requirements.txt index fb94103ba..5f90d62e4 100644 --- a/ci/requirements.txt +++ b/ci/requirements.txt @@ -4,7 +4,7 @@ fonttools==3.28.0 reportlab<=3.1 kiwisolver ; python_version <= "2.7" https://bitbucket.org/pyglet/pyglet/get/pyglet-1.1.4.zip ; python_version <= "2.7" -git+http://github.com/enthought/traits.git#egg=traits -git+http://github.com/enthought/pyface.git#egg=pyface -git+http://github.com/enthought/traitsui.git#egg=traitsui[demo] -git+http://github.com/enthought/apptools.git#egg=apptools +traits==6.1.0 +traitsui==6.1.0 +pyface==6.1.0 +apptools==4.5.0 From 17a53be7d6dbbc0f3c3072b6a74c1c026d3ab9d6 Mon Sep 17 00:00:00 2001 From: Kit Yan Choi Date: Wed, 14 Oct 2020 17:01:18 +0100 Subject: [PATCH 07/14] Fix test asserting list identity --- enable/tests/container_test_case.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enable/tests/container_test_case.py b/enable/tests/container_test_case.py index b35a17b96..a43afb5aa 100644 --- a/enable/tests/container_test_case.py +++ b/enable/tests/container_test_case.py @@ -39,7 +39,7 @@ def test_get_set_components(self): # Exercise set_components: new_list = [self.c1, self.c3] container.components = new_list - self.assertIs(container.components, new_list) + self.assertEqual(container.components, new_list) def test_add_remove(self): container = self.create_simple_components() From 8b73c6b1462a98f64a4080644d021d9c03410b4b Mon Sep 17 00:00:00 2001 From: Kit Yan Choi Date: Wed, 14 Oct 2020 17:21:32 +0100 Subject: [PATCH 08/14] Use the latest releases (for now) for ETS dependencies --- ci/edmtool.py | 5 +++-- ci/requirements.txt | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ci/edmtool.py b/ci/edmtool.py index a9a2878e2..7172c929d 100644 --- a/ci/edmtool.py +++ b/ci/edmtool.py @@ -162,7 +162,7 @@ def install(runtime, toolkit, pillow, environment): "edm install -y -e {environment} {packages}", "edm run -e {environment} -- pip install {pillow}", ("edm run -e {environment} -- pip install -r ci/requirements.txt" - " --no-dependencies --ignore-installed"), + " --no-dependencies --force-reinstall"), ] # pip install pyqt5, because we don't have it in EDM yet @@ -170,7 +170,8 @@ def install(runtime, toolkit, pillow, environment): commands.append("edm run -e {environment} -- pip install pyqt5==5.9.2") commands.append( - "edm run -e {environment} -- pip install --force-reinstall " + ROOT + "edm run -e {environment} -- " + "pip install --force-reinstall --no-dependencies " + ROOT ) click.echo("Creating environment '{environment}'".format(**parameters)) diff --git a/ci/requirements.txt b/ci/requirements.txt index 5f90d62e4..ef51b92e1 100644 --- a/ci/requirements.txt +++ b/ci/requirements.txt @@ -4,7 +4,7 @@ fonttools==3.28.0 reportlab<=3.1 kiwisolver ; python_version <= "2.7" https://bitbucket.org/pyglet/pyglet/get/pyglet-1.1.4.zip ; python_version <= "2.7" -traits==6.1.0 -traitsui==6.1.0 -pyface==6.1.0 +traits==6.1.1 +traitsui==7.0.1 +pyface==7.0.1 apptools==4.5.0 From 8bbfe5a577ad24091215af34252975d0d75909ed Mon Sep 17 00:00:00 2001 From: Kit Yan Choi Date: Wed, 21 Oct 2020 12:04:12 +0100 Subject: [PATCH 09/14] Fix test case which cannot be instantiated on null toolkit --- enable/tests/tools/hover_tool_test_case.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/enable/tests/tools/hover_tool_test_case.py b/enable/tests/tools/hover_tool_test_case.py index 1243f4ee2..ec68521b9 100644 --- a/enable/tests/tools/hover_tool_test_case.py +++ b/enable/tests/tools/hover_tool_test_case.py @@ -19,6 +19,13 @@ GuiTestAssistant = toolkit_object('util.gui_test_assistant:GuiTestAssistant') +if GuiTestAssistant.__name__ == "Unimplemented": + + # ensure null toolkit has an inheritable GuiTestAssistant + # Note that without this definition, the test caseĀ fails as soon as it + # is instantiated, before it can be s + class GuiTestAssistant(object): + pass LOWER_BOUND = 50 From 44e8d2ea12098154f4e1ed27b5cd96fd97c372e1 Mon Sep 17 00:00:00 2001 From: Kit Yan Choi Date: Wed, 21 Oct 2020 13:54:42 +0100 Subject: [PATCH 10/14] Move requirements for EDM and remove installing demo dependencies Instead of installing the same releases of traits/traitsui/pyface twice, set the requirements for EDM. The installation for demo dependencies (see #386) was removed. They are not used for CI, and are rarely used for development. Installing demo dependencies brings in the released egg of enable, causing CI to stop testing local enable source. --- ci/edmtool.py | 17 ++++++++++------- ci/requirements.txt | 4 ---- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/ci/edmtool.py b/ci/edmtool.py index 7172c929d..b1c7778f2 100644 --- a/ci/edmtool.py +++ b/ci/edmtool.py @@ -89,11 +89,11 @@ import click supported_combinations = { - '3.5': {'pyqt', 'pyqt5', 'null'}, '3.6': {'pyqt', 'pyqt5', 'null'}, } dependencies = { + "apptools", "six", "nose", "mock", @@ -102,13 +102,14 @@ "pygments", "pyparsing", "swig", - "unittest2", + "traits", + # Avoiding traitsui 7.1.0 for now due to private imports + # in test suite (see enthought/enable#425) + "traitsui==7.0.1-1", + "pyface==7.0.1-1", "pypdf2", "swig", - # required by some demos - "chaco", - "mayavi", - "scipy", + "unittest2", } extra_dependencies = { @@ -162,13 +163,15 @@ def install(runtime, toolkit, pillow, environment): "edm install -y -e {environment} {packages}", "edm run -e {environment} -- pip install {pillow}", ("edm run -e {environment} -- pip install -r ci/requirements.txt" - " --no-dependencies --force-reinstall"), + " --no-dependencies"), ] # pip install pyqt5, because we don't have it in EDM yet if toolkit == 'pyqt5': commands.append("edm run -e {environment} -- pip install pyqt5==5.9.2") + # No matter happens before, always install local source again or + # we risk testing against an released enable. commands.append( "edm run -e {environment} -- " "pip install --force-reinstall --no-dependencies " + ROOT diff --git a/ci/requirements.txt b/ci/requirements.txt index ef51b92e1..320ea930f 100644 --- a/ci/requirements.txt +++ b/ci/requirements.txt @@ -4,7 +4,3 @@ fonttools==3.28.0 reportlab<=3.1 kiwisolver ; python_version <= "2.7" https://bitbucket.org/pyglet/pyglet/get/pyglet-1.1.4.zip ; python_version <= "2.7" -traits==6.1.1 -traitsui==7.0.1 -pyface==7.0.1 -apptools==4.5.0 From 4ae59032bdc5a1f2b86a76dee0083af3f4e15656 Mon Sep 17 00:00:00 2001 From: Kit Yan Choi Date: Wed, 21 Oct 2020 14:11:34 +0100 Subject: [PATCH 11/14] Allow build for Python 3.5 to stay for now It will need to die soon enough. --- ci/edmtool.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ci/edmtool.py b/ci/edmtool.py index b1c7778f2..f85d47b7d 100644 --- a/ci/edmtool.py +++ b/ci/edmtool.py @@ -89,6 +89,7 @@ import click supported_combinations = { + '3.5': {'pyqt', 'pyqt5', 'null'}, '3.6': {'pyqt', 'pyqt5', 'null'}, } @@ -105,8 +106,8 @@ "traits", # Avoiding traitsui 7.1.0 for now due to private imports # in test suite (see enthought/enable#425) - "traitsui==7.0.1-1", - "pyface==7.0.1-1", + "traitsui<=7.0.1-1", + "pyface<=7.0.1-1", "pypdf2", "swig", "unittest2", From 41e413bfdeb601ff46ee368c36e33d88d47b9ddb Mon Sep 17 00:00:00 2001 From: Kit Yan Choi Date: Wed, 21 Oct 2020 14:12:33 +0100 Subject: [PATCH 12/14] Revert "Allow build for Python 3.5 to stay for now" This reverts commit 4ae59032bdc5a1f2b86a76dee0083af3f4e15656. --- ci/edmtool.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ci/edmtool.py b/ci/edmtool.py index f85d47b7d..b1c7778f2 100644 --- a/ci/edmtool.py +++ b/ci/edmtool.py @@ -89,7 +89,6 @@ import click supported_combinations = { - '3.5': {'pyqt', 'pyqt5', 'null'}, '3.6': {'pyqt', 'pyqt5', 'null'}, } @@ -106,8 +105,8 @@ "traits", # Avoiding traitsui 7.1.0 for now due to private imports # in test suite (see enthought/enable#425) - "traitsui<=7.0.1-1", - "pyface<=7.0.1-1", + "traitsui==7.0.1-1", + "pyface==7.0.1-1", "pypdf2", "swig", "unittest2", From 0cab83272a8e4573e5b3c84ec51fcea2dc97115e Mon Sep 17 00:00:00 2001 From: Kit Yan Choi Date: Wed, 21 Oct 2020 14:13:38 +0100 Subject: [PATCH 13/14] Remove Python 3.5 from CI --- .travis.yml | 2 -- appveyor.yml | 2 -- 2 files changed, 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4325645b2..2e4b51713 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,10 +25,8 @@ env: matrix: include: - - env: RUNTIME=3.5 TOOLKITS="null pyqt pyqt5" PILLOW='pillow' - env: RUNTIME=3.6 TOOLKITS="null pyqt pyqt5" PILLOW='pillow' - env: RUNTIME=3.6 TOOLKITS="wx" PILLOW='pillow' - - env: RUNTIME=3.5 TOOLKITS=null PILLOW='pillow<3.0.0' - env: RUNTIME=3.6 TOOLKITS=null PILLOW='pillow<3.0.0' allow_failures: - env: RUNTIME=3.6 TOOLKITS="wx" PILLOW='pillow' diff --git a/appveyor.yml b/appveyor.yml index 598edc366..1f789c36c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,8 +8,6 @@ environment: INSTALL_EDM_VERSION: "3.0.1" matrix: - - RUNTIME: '3.5' - TOOLKITS: "null pyqt pyqt5" - RUNTIME: '3.6' TOOLKITS: "null pyqt pyqt5" - RUNTIME: '3.6' From 15452268d7352c85fe266b7d8da2af73361430b0 Mon Sep 17 00:00:00 2001 From: Kit Choi Date: Wed, 21 Oct 2020 14:54:16 +0100 Subject: [PATCH 14/14] Fix spelling in a comment Co-authored-by: Poruri Sai Rahul --- enable/tests/tools/hover_tool_test_case.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enable/tests/tools/hover_tool_test_case.py b/enable/tests/tools/hover_tool_test_case.py index ec68521b9..9bb6b5ce6 100644 --- a/enable/tests/tools/hover_tool_test_case.py +++ b/enable/tests/tools/hover_tool_test_case.py @@ -23,7 +23,7 @@ # ensure null toolkit has an inheritable GuiTestAssistant # Note that without this definition, the test caseĀ fails as soon as it - # is instantiated, before it can be s + # is instantiated, before it can be skipped. class GuiTestAssistant(object): pass