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

Set default NCAAB time to midnight #185

Merged
merged 1 commit into from
Sep 7, 2019

Conversation

roclark
Copy link
Owner

@roclark roclark commented Sep 6, 2019

In case an NCAAB game doesn't have a time value associated with it, the default time should be set to midnight instead of 7:00PM as users should have the option on how to handle missing data instead of providing false information. Now, users can check if the time property is empty and determine how they want to treat the data in such cases.

Signed-Off-By: Robert Clark robdclark@outlook.com

In case an NCAAB game doesn't have a time value associated with it, the
default time should be set to midnight instead of 7:00PM as users should
have the option on how to handle missing data instead of providing false
information. Now, users can check if the `time` property is empty and
determine how they want to treat the data in such cases.

Signed-Off-By: Robert Clark <robdclark@outlook.com>
@roclark roclark added the enhancement New feature or request label Sep 6, 2019
@roclark roclark added this to the Release 0.4.4 milestone Sep 6, 2019
@roclark roclark self-assigned this Sep 6, 2019
@roclark
Copy link
Owner Author

roclark commented Sep 6, 2019

@alokpattani, this update is to resolve what we've discussed in #181. With this patch, users can now run the following (of course, in a more elegant fashion than this, but it gets the idea across):

from sportsreference.ncaab.schedule import Schedule

for game in Schedule('PURDUE'):
    if not game.time:
        # Handling for game not containing valid time goes here

@roclark roclark merged commit f66a2c7 into master Sep 7, 2019
@roclark roclark deleted the patch/update-ncaab-games-datetimes branch September 7, 2019 02:32
@codecov
Copy link

codecov bot commented Sep 7, 2019

Codecov Report

Merging #185 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #185   +/-   ##
=======================================
  Coverage   99.97%   99.97%           
=======================================
  Files          43       43           
  Lines        9298     9298           
=======================================
  Hits         9296     9296           
  Misses          2        2
Impacted Files Coverage Δ
sportsreference/ncaab/schedule.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b55927d...5f775da. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant