battlecode / galaxy

MIT License
10 stars 3 forks source link

Rating History API #780

Closed lowtorola closed 2 months ago

lowtorola commented 2 months ago

Adds a rating history API for multiple teams at once! Also, connects the home page chart to said api.

Closes #788 :rocket:

lowtorola commented 2 months ago

@Desperationis The home page chart looks a little odd (you can see if you pull this branch down). Also, I think we should implement a "loading" state for the chart component! Think you could take those tasks on? 😎

Desperationis commented 2 months ago

I added a loading status for the chart. It's not the spiny thing you wanted, but you can customize the text and style to whatever you want. Also, the reason the chart looks weird on the home page is because, by the looks of it, there is no data being returned for that episode. If you change the episode to a different year (2023 / 2022) it works just fine. I added a "No data available" status for this

Desperationis commented 2 months ago

Also, there is a really weird error and I have absolutely no clue where it is coming from. It doesn't stop the program from running, but there's a type error in console

lowtorola commented 2 months ago

Also, there is a really weird error and I have absolutely no clue where it is coming from. It doesn't stop the program from running, but there's a type error in console

Couldn't figure this out... just squashed it with a try catch haha 😆

acrantel commented 2 months ago

How are we testing this? There seems to be ranking data in the staging database for Battlecode 2022 but it is not showing up in the chart.

lowtorola commented 2 months ago

How are we testing this? There seems to be ranking data in the staging database for Battlecode 2022 but it is not showing up in the chart.

@acrantel I see this in my staging... did you mean that there is more data that doesn't show up? Or like is there just none for you?

Screenshot 2024-05-01 at 11 19 23 PM
acrantel commented 2 months ago

How are we testing this? There seems to be ranking data in the staging database for Battlecode 2022 but it is not showing up in the chart.

@acrantel I see this in my staging... did you mean that there is more data that doesn't show up? Or like is there just none for you?

I see "No data found to display". This happens both when I'm logged in and not logged in. The call to http://api.staging.battlecode.org//api/compete/bc22/match/historical_rating/?team_ids=45&team_ids=46&team_ids=44&team_ids=43&team_ids=49&team_ids=93&team_ids=50&team_ids=38&team_ids=39 returns []

lowtorola commented 2 months ago

Wacky... ideas for testing?? Do we have django tests?

acrantel commented 2 months ago

NVM disregard what I was saying about no data, I was testing it on staging backend when I should have been testing with local backend 💀 It appears for me now!