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

Scrimmaging record API refactor #888

Merged
merged 3 commits into from
Jan 9, 2025
Merged

Scrimmaging record API refactor #888

merged 3 commits into from
Jan 9, 2025

Conversation

beshrislambouli
Copy link
Contributor

solves #848

@lowtorola lowtorola linked an issue Jan 8, 2025 that may be closed by this pull request
11 tasks
Copy link
Contributor

@lowtorola lowtorola left a comment

Choose a reason for hiding this comment

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

Left some thoughts! Great work overall. I noticed that it ran a bit slowly on my local, so I on a whim threw it into Perplexity and had it transform the logic to run using Django ORM and it is super speedy now (funny, I love AI). Pls address review comments and then re request review. Again, great work on this 😎

wins = serializers.IntegerField()
losses = serializers.IntegerField()
ties = serializers.IntegerField()
Ranked = ScrimmageRecordSerializerHelper()
Copy link
Contributor

Choose a reason for hiding this comment

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

yknow I think i made this name and it was kinda lazy of me... what if renamed to ScrimmageRecordVariantSerializer or similar?

// scrimmageType={
// CompeteMatchScrimmagingRecordRetrieveScrimmageTypeEnum.All
// }
scrimmageType="All"
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm i think it could be good to refactor these string constants to a typed constant! is there anywhere in autogen that provides such an enum? if not, make one and put it in /api/apiTypes.ts 😄

interface WinLossTieProps {
scrimmageType: CompeteMatchScrimmagingRecordRetrieveScrimmageTypeEnum;
scrimmageType: "All" | "Ranked" | "Unranked"; // Adjust to match the new schema
Copy link
Contributor

Choose a reason for hiding this comment

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

good comment for me the reviewer to understand but future onlookers would have no idea what schema it refers to haha. probably best to remove comment (and make this field refer to your new typed constant)

@lowtorola
Copy link
Contributor

oh btw @beshrislambouli before committing run npm run format in frontend folder to ensure that your code is formatted properly that was probably why it failed the linter ci check

Copy link
Contributor

@lowtorola lowtorola left a comment

Choose a reason for hiding this comment

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

LGTM! will merge :shipit: great work

@lowtorola lowtorola merged commit 79f2ab0 into main Jan 9, 2025
3 checks passed
@lowtorola lowtorola deleted the beshr/scri_api branch January 9, 2025 14:26
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.

Scrimmaging Record API Improvements
2 participants