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 probable starter attributes, fixes #32 #64

Merged
merged 1 commit into from
Feb 27, 2018
Merged

Add probable starter attributes, fixes #32 #64

merged 1 commit into from
Feb 27, 2018

Conversation

ajbowler
Copy link
Contributor

The overview API hits linescore.xml which has all of the useful probable starting pitcher info (ERA, names, player IDs, etc.)

Example: http://gd2.mlb.com/components/game/mlb/year_2018/month_02/day_25/gid_2018_02_25_chnmlb_sfnmlb_1/linescore.xml

This adds all of those attributes. Would appreciate a quick review and tag 😄 my LED board wants to scroll starting pitcher text across the screen and this file has the info readily available on at least the day before the game it seems.

@ajbowler
Copy link
Contributor Author

ajbowler commented Feb 25, 2018

Sorry the additional commit mess...still pretty nooby at Python

@panzarino so it looks like the unit tests are hitting the MLB servers directly. Since the probable starter attributes are time-dependent (they go away once the game starts) any test that grabs them would start failing after their "test date" has passed.

Also don't really see much I can improve upon for the code that's triggering the climate issue but I'd appreciate any feedback.

@panzarino
Copy link
Owner

@ajbowler looks good to me, for the tests that constantly change I just set it to test that the attributes are the correct type (basically just making sure they aren't null and the method actually works for the current data, ex. test roster). Can you please add tests for these new attributes and then I will merge.

Copy link
Owner

@panzarino panzarino left a comment

Choose a reason for hiding this comment

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

Please add test cases for new attributes

@ajbowler
Copy link
Contributor Author

@panzarino code updated. The Travis build appears to be failing on some unrelated test

@panzarino
Copy link
Owner

@ajbowler not sure why that happened, restarted the build and it passed. Great work!

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