[PR #523] [CLOSED] Modify season codes to account for seasons within single calendar year #628

Closed
opened 2026-03-02 15:58:50 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/probberechts/soccerdata/pull/523
Author: @marcjbaron
Created: 3/29/2024
Status: Closed

Base: masterHead: season-code-amend


📝 Commits (8)

📊 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.

## 📋 Pull Request Information **Original PR:** https://github.com/probberechts/soccerdata/pull/523 **Author:** [@marcjbaron](https://github.com/marcjbaron) **Created:** 3/29/2024 **Status:** ❌ Closed **Base:** `master` ← **Head:** `season-code-amend` --- ### 📝 Commits (8) - [`9e0954f`](https://github.com/probberechts/soccerdata/commit/9e0954fc44f146a873a457603801dde7a9b48b59) Modify season codes to account for seasons within single calendar year - [`ff0bc9f`](https://github.com/probberechts/soccerdata/commit/ff0bc9f3af22b0217c7161f8fcd1dc61a6bb8aef) Add 'league' argument to "season_code" function. - [`2c59d96`](https://github.com/probberechts/soccerdata/commit/2c59d967fe3c13d113f915a604b0545ed25396e6) Merge branch 'season-code-amend' of https://github.com/marcjbaron/soccerdata into season-code-amend - [`eba4e51`](https://github.com/probberechts/soccerdata/commit/eba4e51fb9d45769aa6cc91ad16c6a22b1226ae1) Merge branch 'master' into season-code-amend - [`46f657a`](https://github.com/probberechts/soccerdata/commit/46f657a40ad8e993f3b35df83765ae3f2f64f39a) Address type checking errors - [`69bb46c`](https://github.com/probberechts/soccerdata/commit/69bb46c8328d3472177f84d9c387cdcd9c947a1b) Merge branch 'master' into season-code-amend - [`34e8d0b`](https://github.com/probberechts/soccerdata/commit/34e8d0bee110ecbbcc204639361d2c4f47c9b770) Formatting and style fixes - [`fa2b79c`](https://github.com/probberechts/soccerdata/commit/fa2b79ce630b3c564d722e9aeaaa6dd578774a7d) Merge branch 'season-code-amend' of https://github.com/marcjbaron/soccerdata into season-code-amend ### 📊 Changes **8 files changed** (+85 additions, -40 deletions) <details> <summary>View changed files</summary> 📝 `.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) </details> ### 📄 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 15:58:50 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/soccerdata#628
No description provided.