Skip to content

Commit

Permalink
Remove file_names method
Browse files Browse the repository at this point in the history
  • Loading branch information
probberechts committed Sep 6, 2023
1 parent f73ebd6 commit 44c4681
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions socceraction/data/opta/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,26 +323,6 @@ def _get_parsers_for_feeds(
warnings.warn(f"No parser available for {feed} feeds. This feed is ignored.")
return parsers

def file_names(self, competition_id: int, season_id: int):
"""Return a list of all the file names in the data folder of a given season.
Parameters
----------
competition_id : int
The ID of the competition.
season_id : int
The ID of the season.
"""
# feed = 'ma1'
feed_pattern = '{competition_id}\\{season_id}\\MA1\\{game_id}.json'
glob_pattern = feed_pattern.format(
competition_id=competition_id, season_id=season_id, game_id="*"
)
feed_files = glob.glob(os.path.join(self.root, glob_pattern))
for i in range(len(feed_files)):
feed_files[i] = feed_files[i][25:][:-5]
return feed_files

def competitions(self) -> DataFrame[OptaCompetitionSchema]:
"""Return a dataframe with all available competitions and seasons.
Expand Down

0 comments on commit 44c4681

Please sign in to comment.