Description
To me this is mixing too many concerns:
- Representation of individual submissions
- Temporal relationship between submissions
I would prefer to store the relationships (parallel, before, after, next, previous) in a separate data structure which references these
PretalxSubmission
objects.
Then we wouldn't have this situation where creating a "complete"PretalxSubmission
object requires to steps:
submission = PretalxSubmission(...) # call `__init__`, which only initialized a part of the object
submission.set_talks_in_parallel(...) # initialize another part of the object
submission.set_talks_after(...) # initialize yet another part of the object
[...]
Field like
talks_in_parallel: list[str] | None = None
can easily cause to accidents:my_submission.talks_in_parallel
sometimes contains the "talks in parallel to my submission", depending on when I access the field.
That would be a non-trivial change, and the current implementation seems to work, so I'm fine with merging it as it is. But let's try to not walk this path much further, else it might get messy 🙂
Originally posted by @NMertsch in #6 (comment)