Create models #89

Merged
hansegucker merged 24 commits from models into master 2023-07-31 12:57:40 +02:00
Owner
No description provided.
Author
Owner

assigned to @nik

assigned to @nik
Author
Owner

@yuha @nik Please give some feedback.

@yuha @nik Please give some feedback.
Author
Owner

mentioned in issue AlekSIS/official/AlekSIS#58

mentioned in issue AlekSIS/official/AlekSIS#58
Author
Owner

added 1 commit

Compare with previous version

added 1 commit <ul><li>31630982 - Fix several things in models</li></ul> [Compare with previous version](/AlekSIS/onboarding/AlekSIS-App-Lesrooster/-/merge_requests/1/diffs?diff_id=29574&start_sha=5566aee59b26cddcde40f841e47a4154854924ee)
Author
Owner

added 3 commits

  • a127e1ef - Add basic sync to LessonEvent for Lesson objects
  • 5828cc94 - Make all datetimes timezone-aware
  • 8afb58b7 - Add basic sync for supervisions to SupervisionEvent objects

Compare with previous version

added 3 commits <ul><li>a127e1ef - Add basic sync to LessonEvent for Lesson objects</li><li>5828cc94 - Make all datetimes timezone-aware</li><li>8afb58b7 - Add basic sync for supervisions to SupervisionEvent objects</li></ul> [Compare with previous version](/AlekSIS/onboarding/AlekSIS-App-Lesrooster/-/merge_requests/1/diffs?diff_id=30229&start_sha=31630982cbfedfb7c24cb0b3c981a3981f06d6ca)
Author
Owner

added 3 commits

  • 73f20cef - Use make_aware to get timezone-compatible datetimes
  • 41bb23ca - Add direct one-to-one link to lesson events
  • 069ea046 - Fix migration history

Compare with previous version

added 3 commits <ul><li>73f20cef - Use make_aware to get timezone-compatible datetimes</li><li>41bb23ca - Add direct one-to-one link to lesson events</li><li>069ea046 - Fix migration history</li></ul> [Compare with previous version](/AlekSIS/onboarding/AlekSIS-App-Lesrooster/-/merge_requests/1/diffs?diff_id=30350&start_sha=8afb58b7d8d9c8b0674bef9320e853ce7170b0f5)
Author
Owner

added 1 commit

  • c2f9019b - Exclude holidays from regular timetable

Compare with previous version

added 1 commit <ul><li>c2f9019b - Exclude holidays from regular timetable</li></ul> [Compare with previous version](/AlekSIS/onboarding/AlekSIS-App-Lesrooster/-/merge_requests/1/diffs?diff_id=30526&start_sha=069ea0464601deb011af03f645f8d8e3496dca55)
Author
Owner

added 1 commit

  • 65371f1d - Add model for supervision substitutions

Compare with previous version

added 1 commit <ul><li>65371f1d - Add model for supervision substitutions</li></ul> [Compare with previous version](/AlekSIS/onboarding/AlekSIS-App-Lesrooster/-/merge_requests/1/diffs?diff_id=30589&start_sha=c2f9019ba64a8427bc5ca3888cdb4cb41af7a191)
Author
Owner

added 1 commit

  • 21a0e343 - Allow supervisions also to be cancelled

Compare with previous version

added 1 commit <ul><li>21a0e343 - Allow supervisions also to be cancelled</li></ul> [Compare with previous version](/AlekSIS/onboarding/AlekSIS-App-Lesrooster/-/merge_requests/1/diffs?diff_id=30593&start_sha=65371f1d6c222493165c75c2d5793809ddef3f5d)
Author
Owner

added 1 commit

  • 19193ada - Add period_after field to Slot model

Compare with previous version

added 1 commit <ul><li>19193ada - Add period_after field to Slot model</li></ul> [Compare with previous version](/AlekSIS/onboarding/AlekSIS-App-Lesrooster/-/merge_requests/1/diffs?diff_id=31367&start_sha=21a0e3434b8844433e46923698adaf10e5978dbc)
Author
Owner

mentioned in issue #3

mentioned in issue #3
Member

Migrations (re-) created in !90

Migrations (re-) created in !90
Member

mentioned in merge request !92

mentioned in merge request !92
Author
Owner

added 1 commit

  • c601d052 - Clean up and add commonly used properties

Compare with previous version

added 1 commit <ul><li>c601d052 - Clean up and add commonly used properties</li></ul> [Compare with previous version](/AlekSIS/onboarding/AlekSIS-App-Lesrooster/-/merge_requests/1/diffs?diff_id=31958&start_sha=19193ada22e9f2bf621c3a2404ddf3e159b5485d)
Owner

marked this merge request as ready

marked this merge request as **ready**
Author
Owner

added 9 commits

  • c601d052...14b3b545 - 8 commits from branch master
  • 6304c89e - Merge branch 'master' into models

Compare with previous version

added 9 commits <ul><li>c601d052...14b3b545 - 8 commits from branch <code>master</code></li><li>6304c89e - Merge branch &#39;master&#39; into models</li></ul> [Compare with previous version](/AlekSIS/onboarding/AlekSIS-App-Lesrooster/-/merge_requests/1/diffs?diff_id=32640&start_sha=c601d05286019705a98e4eee9ed609d0a218a77c)
Author
Owner

added 4 commits

  • d0312fb2 - Fix migration history
  • 7a7bb327 - Add automatic sync to Chronos after model changes
  • 18a2b0b9 - Use time_format for times instead of date_format
  • b76e47ce - Reformat

Compare with previous version

added 4 commits <ul><li>d0312fb2 - Fix migration history</li><li>7a7bb327 - Add automatic sync to Chronos after model changes</li><li>18a2b0b9 - Use time_format for times instead of date_format</li><li>b76e47ce - Reformat</li></ul> [Compare with previous version](/AlekSIS/onboarding/AlekSIS-App-Lesrooster/-/merge_requests/1/diffs?diff_id=32705&start_sha=6304c89eb054b3690b6001c22a810d1cf9214960)
Owner

Should be AlekSISBaseManager.

Even better, construct this in managers.py as a manager class inheriting from AlekSISBaseManager.from_queryset(...).

Should be `AlekSISBaseManager`. Even better, construct this in `managers.py` as a manager class inheriting from `AlekSISBaseManager.from_queryset(...)`.
Owner

A validity range should have a state indicating whether it is ready for use or not, i.e. the plan is published or not.

I am not sure yet how to do it – just a boolean making it public or not? Or a multi-state field/Enum for things like "planning", "published", "obsolete",…?

A validity range should have a state indicating whether it is ready for use or not, i.e. the plan is published or not. I am not sure yet how to do it – just a boolean making it public or not? Or a multi-state field/Enum for things like "planning", "published", "obsolete",…?
Owner

Missing doc string

Missing doc string
Owner

This looks like Untis/Chronos legacy… does this fit our new, mdoern model?

This looks like Untis/Chronos legacy… does this fit our new, mdoern model?
Owner

The field is named slot, but refers to a Break.

Please align the names, and also reconsider what types of events can be supervised…

The field is named `slot`, but refers to a `Break`. Please align the names, and also reconsider what types of events can be supervised…
Owner

Missing doc string

Missing doc string
Owner

Missing doc string

Missing doc string
Owner

Please depend on the 4.x series

Please depend on the 4.x series
Author
Owner

Yeah, it does. This is just a small bit of annotation to give breaks a position in the timetable grid.

Yeah, it does. This is just a small bit of annotation to give breaks a position in the timetable grid.
Author
Owner

break isn't the best name for an attribute as it's a built-in. Additionally, each Break instance is also a Slot instance, but provides a little bit more API (period_after).

`break` isn't the best name for an attribute as it's a built-in. Additionally, each `Break` instance is also a `Slot` instance, but provides a little bit more API (`period_after`).
Member

I think an enum would be more future-proof, in case we add more states later

I think an enum would be more future-proof, in case we add more states later
Member
        lesson_event.recurrences = deepcopy(self.recurrence) if self.recurrence is not None else Recurrence()

(or something similar, as recurrences can be empty)

```suggestion:-0+0 lesson_event.recurrences = deepcopy(self.recurrence) if self.recurrence is not None else Recurrence() ``` (or something similar, as recurrences _can_ be empty)
Member

Nevermind, the suggested line wouldn't work, maybe simply skip the whole recurring stuff if the field is empty?

Nevermind, the suggested line wouldn't work, maybe simply skip the whole recurring stuff if the field is empty?
Author
Owner

added 2 commits

  • dbba2166 - Add missing docstrings
  • 38cf45c6 - Add status field to ValidityRange model

Compare with previous version

added 2 commits <ul><li>dbba2166 - Add missing docstrings</li><li>38cf45c6 - Add status field to ValidityRange model</li></ul> [Compare with previous version](/AlekSIS/onboarding/AlekSIS-App-Lesrooster/-/merge_requests/1/diffs?diff_id=33130&start_sha=b76e47cebd6a2da5f0ead8dbebbeca232d6fb424)
Author
Owner

changed this line in version 13 of the diff

changed this line in [version 13 of the diff](/AlekSIS/onboarding/AlekSIS-App-Lesrooster/-/merge_requests/1/diffs?diff_id=33133&start_sha=38cf45c6ac354abb35e5326ac91c1580e64482de#e73058ec85f5bdb2ef5d7d98839fc5a47a5aee0b_37_36)
Author
Owner

changed this line in version 13 of the diff

changed this line in [version 13 of the diff](/AlekSIS/onboarding/AlekSIS-App-Lesrooster/-/merge_requests/1/diffs?diff_id=33133&start_sha=38cf45c6ac354abb35e5326ac91c1580e64482de#e73058ec85f5bdb2ef5d7d98839fc5a47a5aee0b_272_271)
Author
Owner

added 2 commits

Compare with previous version

added 2 commits <ul><li>a6c69da1 - Fix managers</li><li>84ad45ed - Skip recurrences if there are no recurrences</li></ul> [Compare with previous version](/AlekSIS/onboarding/AlekSIS-App-Lesrooster/-/merge_requests/1/diffs?diff_id=33133&start_sha=38cf45c6ac354abb35e5326ac91c1580e64482de)
Owner

All of that is a clear indication that it should be named BreakSlot and break_slot.

All of that is a clear indication that it should be named `BreakSlot` and `break_slot`.
Author
Owner

changed this line in version 14 of the diff

changed this line in [version 14 of the diff](/AlekSIS/onboarding/AlekSIS-App-Lesrooster/-/merge_requests/1/diffs?diff_id=33161&start_sha=84ad45ed51334677a84a677c310fc5341265ceb2#5d07e7d72637aa0d59c89d381fe6dc4cf46e2491_37_37)
Author
Owner

added 1 commit

  • dcf4f581 - Fix version in pyproject.toml

Compare with previous version

added 1 commit <ul><li>dcf4f581 - Fix version in pyproject.toml</li></ul> [Compare with previous version](/AlekSIS/onboarding/AlekSIS-App-Lesrooster/-/merge_requests/1/diffs?diff_id=33161&start_sha=84ad45ed51334677a84a677c310fc5341265ceb2)
Author
Owner

changed this line in version 15 of the diff

changed this line in [version 15 of the diff](/AlekSIS/onboarding/AlekSIS-App-Lesrooster/-/merge_requests/1/diffs?diff_id=33178&start_sha=dcf4f58102bab551cd09e3e7efe1e0a4f6fac819#e73058ec85f5bdb2ef5d7d98839fc5a47a5aee0b_299_299)
Author
Owner

changed this line in version 15 of the diff

changed this line in [version 15 of the diff](/AlekSIS/onboarding/AlekSIS-App-Lesrooster/-/merge_requests/1/diffs?diff_id=33178&start_sha=dcf4f58102bab551cd09e3e7efe1e0a4f6fac819#e73058ec85f5bdb2ef5d7d98839fc5a47a5aee0b_340_339)
Author
Owner

added 1 commit

Compare with previous version

added 1 commit <ul><li>51659d20 - Rename Break to BreakSlot</li></ul> [Compare with previous version](/AlekSIS/onboarding/AlekSIS-App-Lesrooster/-/merge_requests/1/diffs?diff_id=33178&start_sha=dcf4f58102bab551cd09e3e7efe1e0a4f6fac819)
Author
Owner

resolved all threads

resolved all threads
Author
Owner

mentioned in commit f3c962e08f

mentioned in commit f3c962e08f01bd4e7a8955b8f035b16975230105
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
aleksis/AlekSIS-App-Lesrooster!89
No description provided.