Amsterdam-Music-Lab / MUSCLE

An application to easily set up and run online listening experiments for music research.
https://www.amsterdammusiclab.nl/
MIT License
4 stars 1 forks source link

Refactor ExperimentCollection(Group) #928

Closed BeritJanssen closed 1 week ago

BeritJanssen commented 5 months ago

After discussion today, it seems that renaming some of the classes, and refactoring endpoints would be helpful.

class Experiment(models.Model) # aka ExperimentCollection
- name
- slug
- theme # FK
- about # TextField (markdown)
- consent # TextField (markdown)

class Phase(models.Model) # aka ExperimentCollectionGroup
- experiment # FK
- order
- dashboard # boolean
- randomize # boolean

class Rule(models.Model) # aka Experiment
- order
- name
- slug
- questions # may also be FK from dedicated Question model
- rule # ChoiceField

This means researchers/maintainers would always have to encapsulate a Rule within a Phase and Experiment, but it also feels more logical in that we're now moving towards adding Consent and Theme to both Experiment and ExperimentColection (in our current nomenclature).

BeritJanssen commented 4 months ago

NB: Let's not work on this until after the Snaartjes festival on June 15.

drikusroor commented 1 week ago

@BeritJanssen I believe we can close this as everything has been renamed, right?