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

TH4 Playlist validation (groups & tags) #1090

Merged
merged 6 commits into from
Jun 11, 2024
Merged

Conversation

drikusroor
Copy link
Contributor

@drikusroor drikusroor commented Jun 10, 2024

This pull request adds Toontje Hoger 4 Absolute playlist group validation.

It checks if the group values in the sections are sequential and have the same length as the amount of sections. So let's say we have 6 sections, the (unique) group values should then be 1, 2, 3, 4, 5, 6. - Question to the reviewer: is that how the group values are supposed to be?

It also checks if the tags don't have values other than "a", "b" or "c".

Additionally, it moves the matching pairs test to the tests folder.

Resolves #1075 and #1091

@drikusroor drikusroor changed the title "Move matching pairs test to tests folder" TH4 Playlist validation (groups & tags) Jun 10, 2024
@drikusroor drikusroor requested a review from BeritJanssen June 10, 2024 13:36
@drikusroor drikusroor self-assigned this Jun 10, 2024
@drikusroor drikusroor added this to the ToontjeHogerKids milestone Jun 10, 2024
@drikusroor drikusroor force-pushed the feat/1075-validate-TH4 branch from 8b0f924 to 5df5175 Compare June 10, 2024 13:36
Copy link
Collaborator

@BeritJanssen BeritJanssen left a comment

Choose a reason for hiding this comment

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

The test includes irrelevant setUpTestData code, and does not test a scenario with valid tags.

The validation code itself seems problematic - for the groups, because they are strings, and will be listed in alphabetic order, for the tags, because distinct() will not deduplicate this way.

@drikusroor drikusroor requested a review from BeritJanssen June 11, 2024 07:59
@drikusroor drikusroor force-pushed the feat/1075-validate-TH4 branch from 3568a98 to 91509bf Compare June 11, 2024 09:07
@drikusroor drikusroor merged commit 6a1fdaa into develop Jun 11, 2024
10 checks passed
@drikusroor drikusroor deleted the feat/1075-validate-TH4 branch June 11, 2024 09:15
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.

TH4 - Sections need to have a group value of a number from 1 to PLAYLIST_ITEMS
2 participants