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

Add Python 3.7, download badge, PEP8 compliance/test #126

Merged
merged 11 commits into from Nov 23, 2018

Conversation

scivision
Copy link
Contributor

@scivision scivision commented Jul 16, 2018

  • Add Python 3.7 Travis-CI. This temporarily uses sudo until Travis-CI makes Xenial official released. I have been using this Travis Python 3.7 setup extensively and reliably.
  • add PyPi download stat badge
  • modernize to use setup.cfg, which has been supported for a couple years and is the modern Python pathway to better Python security via machine-parsable setup files.
  • PEP8 compliance / self-test via flake8

Note: Python 3.4 was removed from Travis-CI, but is still tested in AppVeyor. I feel this is acceptable as Python 3.4 is nearing end of life, and 3.4 support has been dropped in 2017 in such popular modules as pandas etc.
In my contributions to core Python, I see that 3.4 requires increasingly awkward workarounds to support, and commonly 3.4 is lightly tested by the Python developers, as in this pull request.
Python 3.4 is thus still a part of this package, just not as extensively tested, as happens with Python itself.

P.S. recursive auto-PEP8 compliance edits can be done by autopep8 -i -r .

@scivision scivision mentioned this pull request Jul 16, 2018
@pndurette
Copy link
Owner

Oh damn, this is fantastic, thank you! I had a Python 3.7 branch 'waiting' for TravisCI. But that does it. And I didn't know about setup.cfg and I'm glad to see it takes a an .md as long_description. So I imagine PyPi is good with that nowadays?

@scivision
Copy link
Contributor Author

Yes PyPi is fine with Markdown as long as the setup.cfg includes the markdown specification. You can still use RST without that specification, but I started using Markdown because PyPi wasn't liking my more complicated RST, but PyPi was fine with the Markdown.

@scivision
Copy link
Contributor Author

scivision commented Jul 19, 2018

I added requirements.txt copied from setup.cfg for GitHub's new Python security scan feature. I consider this a temporary workaround, as setup.cfg is trivial to parse and is a standard part of setuptools. I have requested GitHub add setup.cfg to their scan.

@pndurette
Copy link
Owner

pndurette commented Jul 20, 2018

First, ensure that you have checked in a requirements.txt or Pipfile.lock file inside of repositories that have Python code.

Uhm, yeah, that's kinda silly. It doesn't always make sense to ship software with a locked list of dept, especially for libraries..

@scivision
Copy link
Contributor Author

Yes so either way, if it seems silly to have this requirements.txt just delete it. I hope GitHub will improve the scan in the future.

@pndurette
Copy link
Owner

Ahh sorry for the delay @scivision, I appreciate this cleanup + CI work across operating systems! I was a bit iffy about the requirements.txt but I see you deleted it and that I suppose it's not an issue anymore with GH's security scan? Either way, I don't really mind, just curious.

@pndurette pndurette merged commit 18e20c3 into pndurette:master Nov 23, 2018
@pndurette
Copy link
Owner

I will bump the release shortly.

@pndurette
Copy link
Owner

Hmm.. I got some failures to look at too. Things that passed in the PR, but apparently not on master anymore. Some of them seemed intermittent, I couldn't look for too long right now.

@pndurette
Copy link
Owner

The failures were due to another thing (languages fetching from a new translate.google.com). So had to fix that (and also went to a conference, and then got sick post-conference..).

Released in gTTS 2.0.2 !

Thanks again for not only your crazy good contribution, @scivision, but this is great reference for future/other projects! 💯

@scivision
Copy link
Contributor Author

Yes I use this general template for over 100 projects. There are some more cleanups possible for testing vis-a-vis tempfile and pytest when I get time.

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