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

Python 3 support #126

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

playpauseandstop
Copy link

Port nflgame to work on Python 3.3+ as well as on Python 2.6 and 2.7. This fixes #78

To test changes I used simple test-suite with examples from README,

import nflgame

games = nflgame.games(2013, week=1)
players = nflgame.combine_game_stats(games)
for player in players.rushing().sort('rushing_yds').limit(5):
    print('{0} {0.rushing_att} carries for {0.rushing_yds} yards and '
          '{0.rushing_tds} TDs'.format(player))

plays = nflgame.combine_plays(games)
for play in plays.sort('passing_yds').limit(5):
    print(play)

Feel free to update test suite to ensure that all necessary features of nflgame still works properly after migration

@ochawkeye
Copy link
Contributor

Maybe just antecedent, but this branch produced output files identical to those produced by BurntSushi/nflgame in week 17 2014 regular season.

@playpauseandstop
Copy link
Author

Any updates? New NFL season starts very soon and I'd like to use nflgame with Python 3.5 in my project

@ckcollab
Copy link

ckcollab commented Aug 7, 2016

Aye, I'm curious too, any updates/status on merging this @BurntSushi ?

@p2j
Copy link

p2j commented Aug 22, 2016

@playpauseandstop @ckcollab I've been working on a port. You can see my changes in my fork: https://github.com/p2j/nflgame

I haven't tested everything possible, but the examples in the readme work perfectly, and I've updated some other stuff to work with Python 3.5.

(as a side note, is there a better way to promote my changes rather than just mentioning them in this thread? I've never done a pull request, any my Python is mediocre at best, but I'm enjoying the work and would love feedback/help)

@ckcollab
Copy link

@p2j that's fine, pull request is where you can get feedback and make code "Good enough" to get merged!

Go to the main nflgame page, click the "new pull request" button (may have to go to issues first?), then make the base branch nflgame, then the branch to merge your fork (may have to click a checkbox to view forks?), and that's it! Let us know if you need more help, I'm sure googling "github submit PR from fork" will give you some good advice as well.

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.

python 3 support
5 participants