mirror of
https://github.com/probberechts/soccerdata.git
synced 2026-04-25 10:05:53 +03:00
[PR #523] [CLOSED] Modify season codes to account for seasons within single calendar year #628
Labels
No labels
ESPN
FBref
FotMob
MatchHistory
SoFIFA
Sofascore
WhoScored
WhoScored
bug
build
common
dependencies
discussion
documentation
duplicate
enhancement
good first issue
invalid
performance
pull-request
question
question
removal
understat
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/soccerdata#628
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/probberechts/soccerdata/pull/523
Author: @marcjbaron
Created: 3/29/2024
Status: ❌ Closed
Base:
master← Head:season-code-amend📝 Commits (8)
9e0954fModify season codes to account for seasons within single calendar yearff0bc9fAdd 'league' argument to "season_code" function.2c59d96Merge branch 'season-code-amend' of https://github.com/marcjbaron/soccerdata into season-code-amendeba4e51Merge branch 'master' into season-code-amend46f657aAddress type checking errors69bb46cMerge branch 'master' into season-code-amend34e8d0bFormatting and style fixesfa2b79cMerge branch 'season-code-amend' of https://github.com/marcjbaron/soccerdata into season-code-amend📊 Changes
8 files changed (+85 additions, -40 deletions)
View changed files
📝
.github/workflows/ci.yml(+1 -0)📝
.github/workflows/release.yml(+1 -0)📝
poetry.lock(+3 -0)📝
soccerdata/_common.py(+69 -31)📝
soccerdata/fbref.py(+6 -3)📝
soccerdata/fotmob.py(+1 -1)📝
soccerdata/sofascore.py(+1 -1)📝
soccerdata/whoscored.py(+3 -4)📄 Description
This PR addresses a problem of gathering data from certain unsupported leagues, referenced in #246, #218, and a comment in #354; specifically, custom leagues whose seasons take place within a single calendar year. Previously, the way the season codes were interpreted for single-year seasons would mean some seasons were skipped over or the same season was downloaded twice.
There is a change to the behaviour of currently supported leagues: Using a season code like "2015" would now be interpreted as "1415", as opposed to the previous interpretation of "1516". The original interpretation seems to make more logical sense, but at the expense of the non-supported leagues.
If this behaviour for supported leagues is not desired, I can comment on previous issues for visibility instead, but hopefully this is a minimally invasive change.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.