Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add alliance details to team detail page #5937

Open
wants to merge 5 commits into
base: py3
Choose a base branch
from

Conversation

devyntk
Copy link
Contributor

@devyntk devyntk commented May 15, 2024

This PR provides details about Alliance Selection and that Alliance's progression.

Motivation and Context

I often find myself switching back and forth between event pages and alliance pages to determine an team's alliance, and find that the data should just be presented inline.

How Has This Been Tested?

There seem to be no automated tests for the team renderer, so no automated tests were done. Manual tests were done with:

  • District teams
  • Regional teams
  • Teams that were listed as backups, both in the backup field as well as a fake third pick
  • Events that have specialized alliance names

Screenshots (if appropriate):

image
image
image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change API specifications or require data migrations)

Copy link

codecov bot commented May 15, 2024

Codecov Report

Attention: Patch coverage is 95.50562% with 8 lines in your changes missing coverage. Please review.

Project coverage is 92.88%. Comparing base (24652da) to head (a14c788).
Report is 203 commits behind head on py3.

Files Patch % Lines
src/backend/common/helpers/alliance_helper.py 92.13% 7 Missing ⚠️
src/backend/web/renderers/team_renderer.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              py3    #5937      +/-   ##
==========================================
- Coverage   93.10%   92.88%   -0.22%     
==========================================
  Files         658      659       +1     
  Lines       42145    42670     +525     
  Branches       60       60              
==========================================
+ Hits        39241    39636     +395     
- Misses       2896     3026     +130     
  Partials        8        8              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/backend/common/models/alliance.py Outdated Show resolved Hide resolved
src/backend/web/renderers/team_renderer.py Outdated Show resolved Hide resolved
github-actions bot added a commit that referenced this pull request Jun 4, 2024
Copy link

github-actions bot commented Jun 4, 2024

Screenshots

Homepage

Homepage

GameDay

GameDay

github-actions bot added a commit that referenced this pull request Jun 4, 2024
@devyntk devyntk requested a review from fangeugene June 4, 2024 02:34
Copy link
Member

@fangeugene fangeugene left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome. The new typing renaming and organization make a whole lot of sense. A few questions/comments

@@ -188,7 +235,7 @@ <h4>District Points Earned</h4>
<p class="muted">No matches played.</p>
{% else %}
<p class="muted">No matches yet. Check back after {{ comp.event.start_date|strftime("%B %d, %Y") }}.</p>
{% endif %}
{% endif %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stray space?

event.event_type_enum, event.year
)

alliance, alliance_pick = AllianceHelper.get_alliance_details_and_pick_name(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_known_alliance_size is called within this helper. Would it make sense to remove the redundant call above and have get_alliance_details_and_pick_name also return alliance_size?


alliance_size = cls.get_known_alliance_size(event.event_type_enum, event.year)

for alliance_check in none_throws(event.alliance_selections):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if either of the if statements below match, we should be able to break out of the for loop right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants