Skip to content
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

Fix most flake8 complaints for src/ folder #105

Merged

Conversation

bittner
Copy link
Member

@bittner bittner commented Sep 16, 2018

Theses changes address almost all flake8 complaints in the src/ folder.

@bittner bittner force-pushed the fix/most-flake8-complaints-for-src branch 2 times, most recently from 59c5f43 to d1b412f Compare September 16, 2018 21:23
@bittner bittner force-pushed the fix/most-flake8-complaints-for-src branch 6 times, most recently from ce2273e to f3a2790 Compare September 17, 2018 08:40
@bittner
Copy link
Member Author

bittner commented Sep 17, 2018

This is really bad: The Travis CI stable image runs on Debian Trusty, which sports neither python-wxgtk3.0 nor python3-wxgtk4.0. We have to install python-wxgtk2.8, but this doesn't seem to install the wx Python 2 module in a way to make Pylint recognize its existance, e.g.

************* Module src.pythonturtle
E:  7, 0: Unable to import 'wx' (import-error)
E:  8, 0: Unable to import 'wx.aui' (import-error)
E:  9, 0: Unable to import 'wx.lib.buttons' (import-error)
E: 10, 0: Unable to import 'wx.lib.scrolledpanel' (import-error)

This also makes clear that we need to test running PythonTurtle against several target distributions, and operating systems later.

It probably makes sense to switch to Docker-based builds, and prepare a Docker image with wxPython for each and every combination of wxPython + distro, to make things easier.

@bittner
Copy link
Member Author

bittner commented Sep 17, 2018

I opened an issue in the wxPython project issue tracker. This will probably lead to a more lengthy discussion and/or implementation effort. But that's the only direction that makes sense, IMHO.

@bittner bittner force-pushed the fix/most-flake8-complaints-for-src branch from 4062f67 to f21b2df Compare September 17, 2018 10:07
@bittner
Copy link
Member Author

bittner commented Sep 17, 2018

Let me try using the Travis Xenial-based infrastructure before merging. Hang on!

@bittner
Copy link
Member Author

bittner commented Sep 17, 2018

Using Xenial works out for Python 2.7 only. 😒 I'll revert the commit.

@bittner bittner force-pushed the fix/most-flake8-complaints-for-src branch from 033db32 to f21b2df Compare September 17, 2018 10:25
@cool-RR
Copy link
Member

cool-RR commented Sep 17, 2018 via email

@bittner
Copy link
Member Author

bittner commented Sep 17, 2018

Well, it's relevant for me. I made my kids play with PythonTurtle, they have Dell notebooks running Ubuntu 18.04 LTS Bionic. They impress others (students and teachers) at school. That's what I want to happen: That teachers are impressed and that students are motivated to play with Python. Otherwise they use some other, really awkward LOGO-like language environments that favor semicolons and allow mixing UPPERcase and lowERcasE keywords. (No, thank you!)

Can you open an issue where we collect all the information for running Windows and macOS builds? I want to prepare the infrastructure for building installer packages also for Windows and macOS, but my main focus will be on GNU/Linux (.deb, .rpm, snap packages). If we manage to collect all the commands that make Windows builds (probably on AppVeyor, not sure though) and builds for macOS happen (on either Travis CI, Circle CI, or GitLab) -- fine. But I can't and won't do trouble shooting for those non-free platforms.

You may want to look into the feature set of AppVeyor, and open a free OSS project account with them. Would be nice to run everything off a single platform, but I don't see that they support builds on macOS. Maybe you find out.

import turtleprocess
import multiprocessing
import homedirectory; homedirectory.do()
Copy link
Member Author

Choose a reason for hiding this comment

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

@cool-RR This is really bad style. There must be a better way to compute and deal with the "current working directory" and such. (See related flake8 complaint.)

Currently, this is unsolved. I think we have to refactor the project, though, to improve the situation.

Also, the project - from Python's point of view - is currently called src. This is due to __init__.py being in the src folder. No good. This asks for being fixed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe we can do some collaborative programming to solve that in #106. Would be nice!

@bittner
Copy link
Member Author

bittner commented Sep 17, 2018

Other than the above issue (that we can fix later, with a separate effort) this PR is ready to be merged.

@bittner
Copy link
Member Author

bittner commented Sep 17, 2018

You can merge this PR now, if you want. Thank you!

@cool-RR cool-RR merged commit 0e26747 into PythonTurtle:master Sep 18, 2018
@bittner bittner deleted the fix/most-flake8-complaints-for-src branch September 23, 2018 09:07
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.

None yet

2 participants