refactor: flatten app/scoreboard/ subpackage and rename files for clarity
All checks were successful
CI / Lint (push) Successful in 5s
CI / Test (push) Successful in 6s
CI / Build & Push (push) Successful in 16s

This commit is contained in:
2026-03-29 10:16:35 -04:00
parent da277e41a4
commit a4dc7dff52
11 changed files with 11 additions and 12 deletions

5
.gitignore vendored
View File

@@ -2,7 +2,6 @@
/nhle_standings_response.txt
/app/data/nhl_standings.db
/app/data/scoreboard_data.json
/__pycache__
/app/__pycache__
/app/scoreboard/__pycache__
nhl_standings.db
**/__pycache__
.venv/

View File

@@ -4,7 +4,7 @@ from flask import render_template, jsonify
from app import app
from app.config import SCOREBOARD_DATA_FILE
from app.scoreboard.process_data import extract_game_info
from app.games import extract_game_info
@app.route("/")

View File

@@ -3,8 +3,8 @@ import time
import schedule
from app.scoreboard.get_data import store_scoreboard_data
from app.scoreboard.update_nhl_standings_db import update_nhl_standings
from app.api import store_scoreboard_data
from app.standings import update_nhl_standings
logger = logging.getLogger(__name__)

6
run.py
View File

@@ -1,9 +1,9 @@
import threading
from app import app
from app.config import PORT
from app.scoreboard.tasks import schedule_tasks
from app.scoreboard.get_data import store_scoreboard_data
from app.scoreboard.update_nhl_standings_db import update_nhl_standings
from app.scheduler import schedule_tasks
from app.api import store_scoreboard_data
from app.standings import update_nhl_standings
from waitress import serve
if __name__ == "__main__":

View File

@@ -81,10 +81,10 @@ def flask_client(tmp_path, monkeypatch):
# Patch module-level path constants so no reloads are needed
import app.routes as routes
import app.scoreboard.process_data as process_data
import app.games as games
monkeypatch.setattr(routes, "SCOREBOARD_DATA_FILE", str(scoreboard_file))
monkeypatch.setattr(process_data, "DB_PATH", str(db_path))
monkeypatch.setattr(games, "DB_PATH", str(db_path))
from app import app as flask_app

View File

@@ -1,5 +1,5 @@
from tests.conftest import make_game
from app.scoreboard.process_data import (
from app.games import (
convert_game_state,
get_game_outcome,
process_period,