Open MirandaRosalise opened 8 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated (UTC) |
---|---|---|---|
sportsdataverse-py | ✅ Ready (Inspect) | Visit Preview | Mar 19, 2024 3:17am |
The overarching change across the SportsDataverse project involves switching the data concatenation method from "vertical" to "diagonal" in various loaders and roster management files across multiple sports modules (CFB, MBB, NBA, NFL, NHL, WBB, WNBA). This modification aims to optimize data handling and ensure consistency in data structure and processing across the board.
Files | Change Summary |
---|---|
.../cfb/... , .../mbb/... , .../nba/... , .../nfl/... , .../nhl/... , .../wbb/... , .../wnba/... (Multiple files across sports) |
Switched data concatenation method from "vertical" to "diagonal" in various functions. Additionally, made column modifications for improved data alignment and processing. |
🐰✨
In the realm of data, both wide and tall,
A rabbit hopped, making sense of it all.
From vertical to diagonal, a magical switch,
Aligning the columns, without a hitch.
Through sports and seasons, the changes unfurl,
A leap towards consistency, in the data world.
🌟📊
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
when doing broad sweeps, pl.concat can sometimes fail due to mismatched columns between different years' tables. Changing 'vertical' to 'diagonal' fixes that; it causes column name matching, and creation of new columns (with backfilled nans for previous concat entries) when needed.
NB: when running pytest locally, am getting a lot of errors in test_dl_utils. I suspect some changes to urllib/requests in a later version of python may cause issues with how the exception block is being handled.
in any event, the exception handling logic for
download
likely needs rewritten. For example, the logger expectsresponse
to exist, when in reality, an exception raising inside session.get will cause response to never be written. A mock response object thus has to be instantiated prior to logging the status codes and so on.also of note: consider refactoring the manual retry handling using adapters, eg here
Summary by CodeRabbit