New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tool for drawing track #26

Merged
merged 2 commits into from Dec 4, 2016

Conversation

Projects
None yet
2 participants
@m3d
Member

m3d commented Dec 3, 2016

This is simplest version to draw track using matplotlib. The plan is to extend it to take into account track width and later draw logged car position data (offline, as post processing & analysis).

@m3d m3d added the enhancement label Dec 3, 2016

@m3d m3d assigned zwn Dec 3, 2016

@zwn

Since this requires a package not included in the python distribution, we need requirements.txt file listing this dependency (with the exact version number it is tested with). To learn more about pip see for example https://pip.pypa.io/en/stable/user_guide/#requirements-files

@m3d

This comment has been minimized.

Member

m3d commented Dec 4, 2016

Good point. This plot.py is rather "tool" i.e. it is not necessarily "must have" (and I would keep it that way). So would you prefer to have folder "tools" and move it there with "requirements.txt"?
This script works fine with

>>> import matplotlib
>>> matplotlib.__version__
'1.4.2'
@zwn

This comment has been minimized.

Member

zwn commented Dec 4, 2016

Just installing current matplotlib with pip from pypi (into virtualenv) does not work for me (btw: it installs around 6 dependent packages). Running the plot.py I get:

_tkinter.TclError: Can't find a usable init.tcl in the following directories:
....

So, probably some special version combination of those packages is required. Providing pip freeze of your working environment can help big time.

@zwn

This comment has been minimized.

Member

zwn commented Dec 4, 2016

I have found pypa/virtualenv#93. After I have updated my copy of virtualenv from 15.0.1 to 15.1.0, it works 🎉 . But let's add a proper requirements.txt anyway.

@zwn

This comment has been minimized.

Member

zwn commented Dec 4, 2016

Let's use just one requirements.txt in the root with all the dependencies. I'd rather not complicate the install instructions with multiple requirements.txt and tools directories and such. Thanks.

@zwn

This comment has been minimized.

Member

zwn commented Dec 4, 2016

I've added the requirements.txt file. Please test it - even better - use it every day 😉. For the tcl to work, you need to have virtualenv 15.1.0 installed in your system python. You can easily upgrade it by issuing pip install --upgrade virtualenv.

Can we have a simple test for draw that draws to a temporary png file? It does not need to check anything - just that it runs and no exception is thrown. That way we will be notified if we change the track structure to become incompatible with draw.

@m3d

This comment has been minimized.

Member

m3d commented Dec 4, 2016

There is a unit test for plot.py now (with minor refactoring of plot.py in order to return figure and try to save it in test). It works fine for me locally but not on CI machines - can you please try to fix it?

@zwn

This comment has been minimized.

Member

zwn commented Dec 4, 2016

I have no idea why it is trying to open a window in the travis build 😞

@zwn

This comment has been minimized.

@m3d

This comment has been minimized.

Member

m3d commented Dec 4, 2016

Whoow! Great, thanks a lot. So what now? Squash everything and merge? Or do you want to split it into several commits?

@zwn

This comment has been minimized.

Member

zwn commented Dec 4, 2016

The last commit enables pip cache on travis. That should speed up the install there since it builds matplotlib from source. With that I am done. Feel free to squash everything - I wouldn't know how to split it so it makes sense anyway.

@zwn

zwn approved these changes Dec 4, 2016

@zwn

This comment has been minimized.

Member

zwn commented Dec 4, 2016

The next travis build hopefully won't take four and a half minutes.

zwn and others added some commits Dec 4, 2016

Add install step to autotests.
This is preparation commit for matplotlib import.

@m3d m3d force-pushed the feature/draw-track branch to 0ef8d74 Dec 4, 2016

@m3d

This comment has been minimized.

Member

m3d commented Dec 4, 2016

rebased & swapped order ... please check both commits & now I would use "normal merge"

@zwn zwn merged commit 90e0e95 into master Dec 4, 2016

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@zwn zwn deleted the feature/draw-track branch Dec 4, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment