jldbc / pybaseball

Pull current and historical baseball statistics using Python (Statcast, Baseball Reference, FanGraphs)
MIT License
1.18k stars 323 forks source link

Add module level __version__method #295

Closed tjburch closed 1 year ago

tjburch commented 1 year ago

Following some of the annoyance in #281, I thought it might be good to introduce a module level version method like a lot of packages out there have. This adds that to a new file called pybaseball/version.py, which we should increment at every release. It's loaded in pybaseball.__init__.py so you can do the following:

>>> import pybaseball
>>> pybaseball.__version__
'2.2.4'

Then lastly, setup.py loads in the value from that file rather than internally defining it.

BrayanMnz commented 1 year ago

Safe to merge per my review.

tjburch commented 1 year ago

With all the recent bug fixes, I think it's time to version bump. I raised the value on this PR, and then we should be good to go for that. @schorrm, if you're good with this, merge and bump. Otherwise if you don't want the method in this PR you can just raise the numbers without the new method and bump.

tjburch commented 1 year ago

replaced by #320 after a truly wretched diff here.