Skip to content
This repository has been archived by the owner on Jun 22, 2022. It is now read-only.

Releases: JacobLee23/FanGraphs-Export

File Hierarchy Refactor

29 Mar 01:42
343bebe
Compare
Choose a tag to compare

File Hierarchy Refactor

Integrate fangraphs.leaders.* modules into fangraphs.leaders.leaders.

  • fangraphs.leaders.gamespan.GameSpan => fangraphs.leaders.leaders.GameSpan
  • fangraphs.leaders.international.International => fangraphs.leaders.leaders.International
  • fangraphs.leaders.majorleague.MajorLeague => fangraphs.leaders.leaders.MajorLeague
  • fangraphs.leaders.seasonstat.SeasonStatGrid => fangraphs.leaders.leaders.SeasonStat
  • fangraphs.leaders.splits.Splits => fangraphs.leaders.leaders.Splits
  • fangraphs.leaders.war.WAR => fangraphs.leaders.leaders.WAR

Bug Fixes

26 Mar 23:40
Compare
Choose a tag to compare

Bug Fixes

  • Fix naming inconsistencies of package (FanGraphs => fangraphs)
  • Fix bug in FanGraphs/tests/test_leaders in the TestMajorLeague setup

FanGraphs Leaders

26 Mar 22:55
1b86103
Compare
Choose a tag to compare

FanGraphs Leaders

The webpages under the FanGraphs Leaders tab are covered by the FanGraphs.leaders module.

Modules

FanGraphs.leaders

FanGraphs.utilities

  • FanGraphs.utilities.ScrapingUtilities: Manager for the web scraping objects used by Fangraphs.leaders

FanGraphs.exceptions

  • FanGraphs.exceptions.FilterUpdateIncapability
  • FanGraphs.exceptions.InvalidFilterGroup
  • FanGraphs.exceptions.InvalidFilterOption
  • FanGraphs.exceptions.InvalidFilterQuery
  • FanGraphs.exceptions.InvalidQuickSplit
  • FanGraphs.exceptions.UnknownBrowser

FanGraphs.selectors.leaders_sel

  • FanGraphs.selectors.leaders_sel.GameSpan: CSS selectors for FanGraphs.leaders.GameSpan
  • FanGraphs.selectors.leaders_sel.International: CSS selectors for FanGraphs.leaders.International
  • FanGraphs.selectors.leaders_sel.MajorLeague: CSS selectors for FanGraphs.leaders.MajorLeague
  • FanGraphs.selectors.leaders_sel.SeasonStatGrid: CSS selectors for FanGraphs.leaders.SeasonStatGrid
  • FanGraphs.selectors.leaders_sel.Splits: CSS selectors for FanGraphs.leaders.Splits
  • FanGraphs.selectors.leaders_sel.WAR: CSS selectors for FanGraphs.leaders.WAR

International Leaderboards

25 Mar 18:27
190cf47
Compare
Choose a tag to compare
Pre-release

International Leaderboards

The FanGraphs KBO Leaders is covered.

The page can be scraped with the InternationalLeaderboards class of the FanGraphs.leaders module.

from FanGraphs.leaders import InternationalLeaderboards
intl = InternationalLeaderboards()
intl.configure(query, option)
intl.export("InternationLeaderboards.csv")
intl.quit()

WAR Leaderboards

25 Mar 15:20
65c1f40
Compare
Choose a tag to compare
WAR Leaderboards Pre-release
Pre-release

WAR Leaderboards

The FanGraphs WAR Leaderboards is covered.

This page can be scraped with the WARLeaderboards class of the FanGraphs.leaders module.

from FanGraphs import leaders
war = leaders.WARLeaderboards()
war.configure(query, option)
war.export("WARLeaderboards.csv")
war.quit()

Game Span Leaderboards

24 Mar 23:31
7ed48aa
Compare
Choose a tag to compare
Pre-release

Game Span Leaderboards

The FanGraphs 60-Game Span Leaderboards is covered.

This page can be scraped by using the GameSpanLeaderboards class in the FanGraphs.leaders module.

from FanGraphs.leaders import GameSpanLeaderboards
gsl = GameSpanLeaderboards()
gsl.configure(query, value)
gsl.export(path="GameSpanLeaderboards.csv")
gsl.quit()

Splits Leaderboards

24 Mar 01:30
0bb9437
Compare
Choose a tag to compare
Splits Leaderboards Pre-release
Pre-release

Splits Leaderboards

The FanGraphs Splits Leaderboards is covered.
This page can be scraped using the SplitsLeaderboards class of the FanGraphs.leaders module.

from FanGraphs.leaders import SplitsLeaderboards
splits = SplitsLeaderboards()
splits.configure(query, value)
splits.export(path="SplitsLeaderboards.csv")
splits.quit()

Pytest Refactor

23 Mar 16:56
66e877b
Compare
Choose a tag to compare
Pytest Refactor Pre-release
Pre-release

Pytest Refactor

The unit tests were refactored to use pytest (docs) over unittest and are now treated like a package nested in FanGraphs (FanGraphs.tests).

FanGraphs/tests:

  • __init__.py
  • test_leaders.py

The functional tests were temporarily relocated to FanGraphs as a package, but were then integrated into the unit tests.

Playwright Refactor

23 Mar 16:52
e9a7f76
Compare
Choose a tag to compare
Playwright Refactor Pre-release
Pre-release

Playwright Refactor

Using selenium as an automated browser was somewhat slow and produced inconsistent results. Thus, the codebase was refactored to utilize playwright (docs).

The usage and functionality of all the modules remains the same.

Season Stat Grid

08 Mar 17:34
16b96fb
Compare
Choose a tag to compare
Season Stat Grid Pre-release
Pre-release

Season Stat Grid

The FanGraphs Season Stat Grid is covered.
This page can be scraped using SeasonStatGrid class of the FanGraphs.leaders module.

from FanGraphs.leaders import SeasonStatGrid
ssg = SeasonStatGrid()
ssg.configure(query, value)
ssg.export(name="SeasonStatGrid.csv")
ssg.quit()