Skip to content

Latest commit

 

History

History
148 lines (122 loc) · 6.58 KB

File metadata and controls

148 lines (122 loc) · 6.58 KB

Hello this is my devlog in this project

[27 Feb 2026 20:53] I started the project today Yay!!!! I set up all the files and folders to start coding tbh it seems hard but my planning is good Also I set up the read.md i think personally it look really nice Also entry point , basic code today ill just plan the project cuz im to lazy T_T ps: Ngl im kinda excited to get this going :)


[1 Mar 2026 22:22] Created teams and competitions table and standing table and matches table Starting to look like a real database I took like 3hrs cuz i couldnt connect the database but all worst is for best Another 30 mins gone for other 2 tables but they were similar so it was easy :(


[2 Mar 2026 22:06] Created Scrape Log table Added unique constraint thing to Standings Table Updated Create Matches Table today Add helper functions for inserting data Im Actually so BORED of those databases cuz i do like couple of them a day Also today i had my physics assigment and it was kinda easy even tho i was worrying about it a lot ill also have it on wednesday


[5 Mar 2026 16:38] I missed 3 days because i broke my foot while playing rugby somehow Started the scraper today. First try got a 403 error from ESPN. Fixed it by adding browser headers so ESPN thinks we are a real browser Feels good that the error made sense and i knew how to fix it Parsing finally works after fighting ESPN's split table layout like wtf who even uses ts
also had to find the stats table manually by checking classes. France top of Six Nations with 15 points, Wales bottom with 1 even tho its real data it was hard to get i spent like 3hr on it :(


[6 Mar 2026 09:01] Soooo im home today due to my leg so im going to add more stuff than i usually do Ok so rn i finished the scrapper.py where i added one of the most important parts function called parse_standings() it is made to get team data from ESPN HTML page bro but it took me like 4 hours somehow cuz i was refactoring code but omg it takes so long omggg i finally got database working , it was so hard like fr like i had to add UNIQUE to team name , and also fix competitions insert also sort out import list like wtffff thats too hard six nations standings are now properly saved to db! added a really cool logo animation also i added really cool choosing of competition thing i also added a coloured table while watching wales vs ireland game this day i ahd loads of progress and i think it is really good i coded today for like 7hrs thats like so much progress im so happy


[7 Mar 2026 11:08] Added the banner The csv Export Also i made the descriptions to each competiton Added description about me when u press e REAL TABLES NOW!!! Also i added the match results Evrythibng is updaring results table


[8 Mar 2026 10:23] Added better read.me today added last updated stamp


[21 Mar 2026 13:07] OK SO THIS 2 WEEKS WAS MASSIVE like actually insane progress First had loads of setup issues - pip wasnt working on CachyOS cuz of the externally managed environment thing had to use venv which was also a pain but got there in the end

So v2.0 is fully done today here is what i built:

SCRAPER IMPROVEMENTS

  • Added PF, PA, PD columns (points for, against, difference) to standings
  • Fixed the scraper to grab these from the right ESPN cell indices
  • Added proper error handling with 3 retries, specific messages for 403/404/429/500
  • Added ESPN connectivity check at startup
  • Auto-scrapes ALL competitions when you launch the app now
  • Match results now saved to the database properly
  • Fixed date scraping - was using wrong CSS class (ScoreboardScoreCell__Time vs ScoreCell__Time) took a quick HTML inspection to find it

NEW FEATURES

  • Fixture list with dates and team form (f key)
  • Form data scraped directly from ESPN HTML (WWLWL format)
  • Better results screen - winner highlighted green, dates shown
  • Animated team stats screen with growing bar chart
  • Points comparison chart showing all teams at once
  • New result FLASH notifications on startup - flashes each new result one by one with animation, compares db before/after scrape
  • Points trend graph (unlocks after running daily for a few days)
  • Trophy for 1st place, down arrow for last
  • Auto resize for narrow terminals - hides PF/PA/PD columns if too small
  • Fixed description panel text wrapping

Also updated the README with all v2.0 features and pushed everything to GitHub Tagged as v2.0 on main branch

Coded for like 3hrs straight every single day of the week also made pivate repo because almost broke this one, loads of debugging but everything works The notification animation is probably my favourite thing ive built so far Exams soon so might slow down but v2 is done and im happy with it :)

Big refactor today — split display.py into 8 proper modules Fixed magic numbers, type hints, with() for db connections Friend helped catch a redundant check in get_team_form Ruff linter now clean, tagged v2.1


[21 Mar 2026 17:30] MASSIVE day today - basically rewrote half the project

v2.1 - big refactor pass with help from a friend who knows his stuff

  • split display.py into 8 proper modules (constants, utils, animations, menu, standings, team_stats, results, notifications)
  • all magic numbers replaced with named constants
  • type hints on every single function
  • with() statements for all db connections
  • friend caught duplicate result style functions - merged into one
  • friend caught redundant check in get_team_form
  • friend caught os.system("clear") deprecation - fixed with platform.system()
  • zero Ruff linter warnings
  • tagged v2.1

v2.2 - async rewrite + tests + logging

  • switched from requests to aiohttp for async network requests
  • all competitions now scraped CONCURRENTLY at startup
  • proof: 1 competition = 0.58s, all 4 = 3.22s (not 4x0.58 sequential)
  • added Python logging module - all errors/warnings go to data/rugby.log
  • added docstrings to every public function across all files
  • wrote 34 tests covering stats, scraper parsing and database operations
  • 34/34 passing
  • pinned requirements.txt, removed unused requests library
  • empty input on menu no longer crashes with "invalid choice"
  • tagged v2.2

Coded for like 8hrs today ngl - exams soon but this was worth it Project is genuinely clean now and i actually understand why