mirror of
https://github.com/probberechts/soccerdata.git
synced 2026-04-25 10:05:53 +03:00
[GH-ISSUE #681] [General] Option to disable having to use the default leagues #139
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#139
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?
Originally created by @lorenzodb1 on GitHub (Aug 19, 2024).
Original GitHub issue: https://github.com/probberechts/soccerdata/issues/681
LEAGUE_DICTprovides a list of default leagues that will be used, along with the ones defined inleague_dict.json.This can be a bit annoying, as I'd have to remove each of the leagues that I don't need individually, thus making my code dirty.
Would it be possible to add an option (maybe as an environment variable, but that's just an idea) to disable this behaviour and only use the leagues in
league_dict.jsoninstead?@probberechts commented on GitHub (Aug 20, 2024):
That's a good suggestion. I think I would implement this by creating a default
league_dict.jsonfile if it does not exist yet and move the league config that is now in_config.pyto that defaultleague_dict.jsonfile.I don't have plan to implement this myself in the short term, but feel free to create a pull request.
@lorenzodb1 commented on GitHub (Aug 20, 2024):
How about letting whatever is specified in
league_dict.json, if present, override the default list of leagues?@probberechts commented on GitHub (Aug 22, 2024):
I don't think that would provide the best user experience. Most users want to add additional leagues, not remove the default ones.
@lorenzodb1 commented on GitHub (Sep 10, 2024):
Ok so I'm starting to think about how I could implement this. If we were to with the solution you suggested, we'd have to create the default league file at
make, as the position of that file isn't fixed. I'm not sure how this can be achieved in a clean way.What do you think about using an environment variable to let the user decide whether they want to include the default set of leagues or not?