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 Playlist validation to rules files #978

Open
4 tasks
BeritJanssen opened this issue Apr 30, 2024 · 0 comments · May be fixed by #995
Open
4 tasks

Add Playlist validation to rules files #978

BeritJanssen opened this issue Apr 30, 2024 · 0 comments · May be fixed by #995
Assignees

Comments

@BeritJanssen
Copy link
Collaborator

BeritJanssen commented Apr 30, 2024

Most rules files have very specific requirements for the playlist that should accompany them. Playlists in another format will run into errors. Ideally, early on, though not infrequently the errors occur midway and (due to randomized order) in a hard to reproduce pattern.

We should add validation to each rules file (see for an example congosamediff) which makes the (now implicit) assumptions explicit.

Ideally, we would display such validation errors in the admin interface: i.e., a user creates an experiment with a given rules file, and then, when they tie a specific playlist to it, the admin interface issues warnings about incompatibility of the playlist and rules.

Technical implementation

  • Update rule base class with an (empty) validations array property
  • Update rule base class with a validate function
  • Add validation endpoint that uses the validation rules of an experiment's rules for its playlist
  • Use validation endpoint in experiment form and show warnings & errors in the admin interface
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 a pull request may close this issue.

2 participants