Skip to content

Use EDM for Travis CI builds#281

Merged
jwiggins merged 1 commit into
masterfrom
ci/edm-dance-party
Jul 27, 2017
Merged

Use EDM for Travis CI builds#281
jwiggins merged 1 commit into
masterfrom
ci/edm-dance-party

Conversation

@jwiggins
Copy link
Copy Markdown
Member

🎶 👢 🐈 👢 🐈 👢 🐈...

@jwiggins jwiggins force-pushed the ci/edm-dance-party branch 8 times, most recently from 98ba5db to 8fc4b45 Compare June 28, 2017 21:28
@jwiggins
Copy link
Copy Markdown
Member Author

Okie dokie then.

I'm not sure why wx is failing, but it was coming from Ubuntu before and now it's coming from EDM. I've marked it as an expected failure for now. Someone with better wx kung fu should take a look.

Having 2.7 as the environment which runs the CI script was unexpectedly painful because click is passing in arguments as unicode objects. It's all better now, but some of the code was written in anger. 🙄

@codecov-io
Copy link
Copy Markdown

codecov-io commented Jun 29, 2017

Codecov Report

Merging #281 into master will decrease coverage by 2.19%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #281     +/-   ##
=========================================
- Coverage   35.42%   33.22%   -2.2%     
=========================================
  Files         206      206             
  Lines       18814    18559    -255     
  Branches     2627     2520    -107     
=========================================
- Hits         6664     6167    -497     
- Misses      11724    11998    +274     
+ Partials      426      394     -32
Impacted Files Coverage Δ
enable/wx/constants.py 0% <0%> (-69.24%) ⬇️
kiva/cairo.py 0% <0%> (-39.14%) ⬇️
enable/wx/base_window.py 0% <0%> (-36.99%) ⬇️
kiva/trait_defs/ui/wx/kiva_font_editor.py 0% <0%> (-36.37%) ⬇️
enable/wx/scrollbar.py 0% <0%> (-33.88%) ⬇️
enable/wx/image.py 0% <0%> (-28.95%) ⬇️
enable/colors.py 25% <0%> (-18.48%) ⬇️
enable/savage/svg/backends/wx/__init__.py 21.21% <0%> (-12.13%) ⬇️
kiva/trait_defs/kiva_font_trait.py 76.56% <0%> (-6.25%) ⬇️
enable/component_editor.py 79.16% <0%> (-4.17%) ⬇️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 642e50f...5f5327b. Read the comment docs.

@jvkersch
Copy link
Copy Markdown
Contributor

Cool! Mind if I steal this for Chaco (reviewing along the way)?

@jvkersch
Copy link
Copy Markdown
Contributor

Also, I wonder if it would make sense to have this EDM related code in a separate repo that can be submoduled (or installed) into other repos. Thoughts @jwiggins @corranwebster @itziakos ?

@jwiggins
Copy link
Copy Markdown
Member Author

Please steal this for Chaco! And share the bugs you fix! 😉

@corranwebster
Copy link
Copy Markdown
Contributor

The code is different enough that it may not be useful to pull out the core into some other place (presumably Traits): the command-line arguments for the test runner tool here are different than those for TraitsUI, for example, and I think that is reasonable. That makes the amount of extractable shared code fairly small, I suspect.

But I could be wrong.

Comment thread ci/install-edm.sh
set -e

install_edm() {
local EDM_MAJOR_MINOR="$(echo "$INSTALL_EDM_VERSION" | sed -E -e 's/([[:digit:]]+\.[[:digit:]]+)\..*/\1/')"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe abort early if INSTALL_EDM_VERSION is not set?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Among other fixes... yes.

Comment thread .travis.yml
- ETS_TOOLKIT=null.image PILLOW='pillow<3.0.0'
- ETS_TOOLKIT=null.image PILLOW='pillow'
global:
- INSTALL_EDM_VERSION=1.5.2
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not 1.7.1?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not up-to-date with EDM versions. TraitsUI is using this version

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well we should fix traitsui also the current version is 1.7.1

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually... I disagree. 1.7.1 doesn't install correctly

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you point to the error?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I yes, I now remember there is a bug in the sh installer for 1.7.1

@jwiggins jwiggins force-pushed the ci/edm-dance-party branch from 46542fb to 0470e67 Compare June 30, 2017 15:30
@jwiggins
Copy link
Copy Markdown
Member Author

Ugh... pycairo. I even tested it locally. Travis is having none of it

@mdickinson
Copy link
Copy Markdown
Member

When trying to use this approach for local development, I'm running into issues with missing Cython. I did:

taniyama:enable mdickinson$ edm install -y wheel click coverage

followed by

taniyama:enable mdickinson$ edm run -- python ci/edmtool.py install --runtime=2.7 --toolkit=pyqt

The install step fails with a traceback:

creating build/src.macosx-10.6-x86_64-2.7/kiva/quartz
Traceback (most recent call last):
  File "setup.py", line 297, in <module>
    **config)
  File "/Users/mdickinson/.edm/envs/enable-test-2.7-pyqt-pillow/lib/python2.7/site-packages/numpy/distutils/core.py", line 169, in setup
    return old_setup(**new_attr)
  File "/Users/mdickinson/.edm/envs/enable-test-2.7-pyqt-pillow/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/Users/mdickinson/.edm/envs/enable-test-2.7-pyqt-pillow/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/Users/mdickinson/.edm/envs/enable-test-2.7-pyqt-pillow/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Users/mdickinson/.edm/envs/enable-test-2.7-pyqt-pillow/lib/python2.7/site-packages/numpy/distutils/command/install.py", line 62, in run
    r = self.setuptools_run()
  File "/Users/mdickinson/.edm/envs/enable-test-2.7-pyqt-pillow/lib/python2.7/site-packages/numpy/distutils/command/install.py", line 56, in setuptools_run
    self.do_egg_install()
  File "/Users/mdickinson/.edm/envs/enable-test-2.7-pyqt-pillow/lib/python2.7/site-packages/setuptools/command/install.py", line 109, in do_egg_install
    self.run_command('bdist_egg')
  File "/Users/mdickinson/.edm/envs/enable-test-2.7-pyqt-pillow/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/Users/mdickinson/.edm/envs/enable-test-2.7-pyqt-pillow/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Users/mdickinson/.edm/envs/enable-test-2.7-pyqt-pillow/lib/python2.7/site-packages/setuptools/command/bdist_egg.py", line 152, in run
    self.run_command("egg_info")
  File "/Users/mdickinson/.edm/envs/enable-test-2.7-pyqt-pillow/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/Users/mdickinson/.edm/envs/enable-test-2.7-pyqt-pillow/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Users/mdickinson/.edm/envs/enable-test-2.7-pyqt-pillow/lib/python2.7/site-packages/numpy/distutils/command/egg_info.py", line 18, in run
    self.run_command("build_src")
  File "/Users/mdickinson/.edm/envs/enable-test-2.7-pyqt-pillow/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/Users/mdickinson/.edm/envs/enable-test-2.7-pyqt-pillow/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Users/mdickinson/.edm/envs/enable-test-2.7-pyqt-pillow/lib/python2.7/site-packages/numpy/distutils/command/build_src.py", line 147, in run
    self.build_sources()
  File "/Users/mdickinson/.edm/envs/enable-test-2.7-pyqt-pillow/lib/python2.7/site-packages/numpy/distutils/command/build_src.py", line 164, in build_sources
    self.build_extension_sources(ext)
  File "/Users/mdickinson/.edm/envs/enable-test-2.7-pyqt-pillow/lib/python2.7/site-packages/numpy/distutils/command/build_src.py", line 323, in build_extension_sources
    sources = self.generate_sources(sources, ext)
  File "/Users/mdickinson/.edm/envs/enable-test-2.7-pyqt-pillow/lib/python2.7/site-packages/numpy/distutils/command/build_src.py", line 376, in generate_sources
    source = func(extension, build_dir)
  File "kiva/quartz/setup.py", line 22, in generate_c_from_cython
    from Cython.Compiler import Main
ImportError: No module named Cython.Compiler

@mdickinson
Copy link
Copy Markdown
Member

Ah, I see. Cython is needed on OS X, but not on Linux.

Shamelessly copied from the TraitsUI project...
@jwiggins jwiggins force-pushed the ci/edm-dance-party branch from 8125c4d to 5f5327b Compare July 18, 2017 19:29
@jwiggins
Copy link
Copy Markdown
Member Author

Thanks for the input @mdickinson! I think I made the mistake of not cleaning before testing on macOS. Cython has been (conditionally) added now.

@jwiggins
Copy link
Copy Markdown
Member Author

If there are no further comments, I'd like to merge this soon

@mdickinson
Copy link
Copy Markdown
Member

SGTM. I was very confused for a while: I couldn't see the commit where Cython was added. I'm guessing that there was a force push at some point?

@jwiggins
Copy link
Copy Markdown
Member Author

Yeah, sorry. Using GitLab has taught me some anti-social git habits (git commit --amend and git rebase -i)

@jwiggins jwiggins merged commit aa33701 into master Jul 27, 2017
@jwiggins jwiggins deleted the ci/edm-dance-party branch July 27, 2017 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants