Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions kbstats_points_odds_lineup_score.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
EXPECTED_POINTS_DIR,
KBSTATS_PLAYERS_DIR,
ensure_directory,
prune_timestamped_outputs,
)
from sofascore_average_rating_score import load_kbstats_players, normalize_name, validate_scored_players
from sofascore_rating_odds_lineup_score import (
Expand Down Expand Up @@ -528,6 +529,7 @@ def run_score_creation(
if output_path.exists():
raise FileExistsError(f"Refusing to overwrite existing score CSV: {output_path}")
scored.to_csv(output_path, index=False, encoding="utf-8-sig")
prune_timestamped_outputs()

review = pd.DataFrame(review_rows)
print("Input summary")
Expand Down
14 changes: 14 additions & 0 deletions notebooks/03_team_data/01_sofascore_recent_form.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8153,6 +8153,20 @@
"outputs": [],
"source": []
}
,
{
"cell_type": "code",
"execution_count": null,
"id": "prune-timestamped-outputs",
"metadata": {},
"outputs": [],
"source": [
"from project_paths import prune_timestamped_outputs\n",
"\n",
"removed_outputs = prune_timestamped_outputs()\n",
"print(f\"Pruned {len(removed_outputs)} expired timestamped output(s).\")\n"
]
}
],
"metadata": {
"kernelspec": {
Expand Down
14 changes: 14 additions & 0 deletions notebooks/03_team_data/02_sofascore_team_stats.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,20 @@
"team_statistics_df.head()\n"
]
}
,
{
"cell_type": "code",
"execution_count": null,
"id": "prune-timestamped-outputs",
"metadata": {},
"outputs": [],
"source": [
"from project_paths import prune_timestamped_outputs\n",
"\n",
"removed_outputs = prune_timestamped_outputs()\n",
"print(f\"Pruned {len(removed_outputs)} expired timestamped output(s).\")\n"
]
}
],
"metadata": {
"kernelspec": {
Expand Down
14 changes: 14 additions & 0 deletions notebooks/03_team_data/03_transfermarkt_squads.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2004,6 +2004,20 @@
"outputs": [],
"source": []
}
,
{
"cell_type": "code",
"execution_count": null,
"id": "prune-timestamped-outputs",
"metadata": {},
"outputs": [],
"source": [
"from project_paths import prune_timestamped_outputs\n",
"\n",
"removed_outputs = prune_timestamped_outputs()\n",
"print(f\"Pruned {len(removed_outputs)} expired timestamped output(s).\")\n"
]
}
],
"metadata": {
"kernelspec": {
Expand Down
14 changes: 14 additions & 0 deletions notebooks/03_team_data/04_kbstats_players.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,20 @@
"print(f\"Rows: {len(players_df):,} | Columns: {len(players_df.columns):,}\")\n"
]
}
,
{
"cell_type": "code",
"execution_count": null,
"id": "prune-timestamped-outputs",
"metadata": {},
"outputs": [],
"source": [
"from project_paths import prune_timestamped_outputs\n",
"\n",
"removed_outputs = prune_timestamped_outputs()\n",
"print(f\"Pruned {len(removed_outputs)} expired timestamped output(s).\")\n"
]
}
],
"metadata": {
"kernelspec": {
Expand Down
14 changes: 14 additions & 0 deletions notebooks/03_team_data/05_sofascore_upcoming_matches.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1581,6 +1581,20 @@
" print(f'Chrome driver shutdown warning: {exc}')\n"
]
}
,
{
"cell_type": "code",
"execution_count": null,
"id": "prune-timestamped-outputs",
"metadata": {},
"outputs": [],
"source": [
"from project_paths import prune_timestamped_outputs\n",
"\n",
"removed_outputs = prune_timestamped_outputs()\n",
"print(f\"Pruned {len(removed_outputs)} expired timestamped output(s).\")\n"
]
}
],
"metadata": {
"kernelspec": {
Expand Down
14 changes: 14 additions & 0 deletions notebooks/04_derived_analysis/01_bundesliga_snapshot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1695,6 +1695,20 @@
"outputs": [],
"source": []
}
,
{
"cell_type": "code",
"execution_count": null,
"id": "prune-timestamped-outputs",
"metadata": {},
"outputs": [],
"source": [
"from project_paths import prune_timestamped_outputs\n",
"\n",
"removed_outputs = prune_timestamped_outputs()\n",
"print(f\"Pruned {len(removed_outputs)} expired timestamped output(s).\")\n"
]
}
],
"metadata": {
"kernelspec": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1477,6 +1477,20 @@
"outputs": [],
"source": []
}
,
{
"cell_type": "code",
"execution_count": null,
"id": "prune-timestamped-outputs",
"metadata": {},
"outputs": [],
"source": [
"from project_paths import prune_timestamped_outputs\n",
"\n",
"removed_outputs = prune_timestamped_outputs()\n",
"print(f\"Pruned {len(removed_outputs)} expired timestamped output(s).\")\n"
]
}
],
"metadata": {
"kernelspec": {
Expand Down
14 changes: 14 additions & 0 deletions notebooks/04_derived_analysis/03_kbstats_high_average_points.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,20 @@
"outputs": [],
"source": []
}
,
{
"cell_type": "code",
"execution_count": null,
"id": "prune-timestamped-outputs",
"metadata": {},
"outputs": [],
"source": [
"from project_paths import prune_timestamped_outputs\n",
"\n",
"removed_outputs = prune_timestamped_outputs()\n",
"print(f\"Pruned {len(removed_outputs)} expired timestamped output(s).\")\n"
]
}
],
"metadata": {
"kernelspec": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,20 @@
"outputs": [],
"source": []
}
,
{
"cell_type": "code",
"execution_count": null,
"id": "prune-timestamped-outputs",
"metadata": {},
"outputs": [],
"source": [
"from project_paths import prune_timestamped_outputs\n",
"\n",
"removed_outputs = prune_timestamped_outputs()\n",
"print(f\"Pruned {len(removed_outputs)} expired timestamped output(s).\")\n"
]
}
],
"metadata": {
"kernelspec": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,20 @@
"outputs": [],
"source": []
}
,
{
"cell_type": "code",
"execution_count": null,
"id": "prune-timestamped-outputs",
"metadata": {},
"outputs": [],
"source": [
"from project_paths import prune_timestamped_outputs\n",
"\n",
"removed_outputs = prune_timestamped_outputs()\n",
"print(f\"Pruned {len(removed_outputs)} expired timestamped output(s).\")\n"
]
}
],
"metadata": {
"kernelspec": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,20 @@
"print(f'CSV output: {csv_output_path}')\n"
]
}
,
{
"cell_type": "code",
"execution_count": null,
"id": "prune-timestamped-outputs",
"metadata": {},
"outputs": [],
"source": [
"from project_paths import prune_timestamped_outputs\n",
"\n",
"removed_outputs = prune_timestamped_outputs()\n",
"print(f\"Pruned {len(removed_outputs)} expired timestamped output(s).\")\n"
]
}
],
"metadata": {
"kernelspec": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,20 @@
"print(f'CSV output: {csv_output_path}')\n"
]
}
,
{
"cell_type": "code",
"execution_count": null,
"id": "prune-timestamped-outputs",
"metadata": {},
"outputs": [],
"source": [
"from project_paths import prune_timestamped_outputs\n",
"\n",
"removed_outputs = prune_timestamped_outputs()\n",
"print(f\"Pruned {len(removed_outputs)} expired timestamped output(s).\")\n"
]
}
],
"metadata": {
"kernelspec": {
Expand Down
14 changes: 14 additions & 0 deletions notebooks/05_predicted_lineups/01_rotowire_lineups.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,20 @@
"outputs": [],
"source": []
}
,
{
"cell_type": "code",
"execution_count": null,
"id": "prune-timestamped-outputs",
"metadata": {},
"outputs": [],
"source": [
"from project_paths import prune_timestamped_outputs\n",
"\n",
"removed_outputs = prune_timestamped_outputs()\n",
"print(f\"Pruned {len(removed_outputs)} expired timestamped output(s).\")\n"
]
}
],
"metadata": {
"kernelspec": {
Expand Down
14 changes: 14 additions & 0 deletions notebooks/05_predicted_lineups/02_ligainsider_lineups.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,20 @@
"outputs": [],
"source": []
}
,
{
"cell_type": "code",
"execution_count": null,
"id": "prune-timestamped-outputs",
"metadata": {},
"outputs": [],
"source": [
"from project_paths import prune_timestamped_outputs\n",
"\n",
"removed_outputs = prune_timestamped_outputs()\n",
"print(f\"Pruned {len(removed_outputs)} expired timestamped output(s).\")\n"
]
}
],
"metadata": {
"kernelspec": {
Expand Down
14 changes: 14 additions & 0 deletions notebooks/06_score_creation/randomize_score.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,20 @@
"print(f\"Created at: {created_datetime.isoformat(timespec='seconds')}\")"
]
}
,
{
"cell_type": "code",
"execution_count": null,
"id": "prune-timestamped-outputs",
"metadata": {},
"outputs": [],
"source": [
"from project_paths import prune_timestamped_outputs\n",
"\n",
"removed_outputs = prune_timestamped_outputs()\n",
"print(f\"Pruned {len(removed_outputs)} expired timestamped output(s).\")\n"
]
}
],
"metadata": {
"kernelspec": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1785,6 +1785,20 @@
"selected_lineup_path = select_lineup_interactively(selected_lineup_snapshot)\n"
]
}
,
{
"cell_type": "code",
"execution_count": null,
"id": "prune-timestamped-outputs",
"metadata": {},
"outputs": [],
"source": [
"from project_paths import prune_timestamped_outputs\n",
"\n",
"removed_outputs = prune_timestamped_outputs()\n",
"print(f\"Pruned {len(removed_outputs)} expired timestamped output(s).\")\n"
]
}
],
"metadata": {
"kernelspec": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2129,6 +2129,20 @@
"outputs": [],
"source": []
}
,
{
"cell_type": "code",
"execution_count": null,
"id": "prune-timestamped-outputs",
"metadata": {},
"outputs": [],
"source": [
"from project_paths import prune_timestamped_outputs\n",
"\n",
"removed_outputs = prune_timestamped_outputs()\n",
"print(f\"Pruned {len(removed_outputs)} expired timestamped output(s).\")\n"
]
}
],
"metadata": {
"kernelspec": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2128,6 +2128,20 @@
"outputs": [],
"source": []
}
,
{
"cell_type": "code",
"execution_count": null,
"id": "prune-timestamped-outputs",
"metadata": {},
"outputs": [],
"source": [
"from project_paths import prune_timestamped_outputs\n",
"\n",
"removed_outputs = prune_timestamped_outputs()\n",
"print(f\"Pruned {len(removed_outputs)} expired timestamped output(s).\")\n"
]
}
],
"metadata": {
"kernelspec": {
Expand Down
Loading
Loading