Use KaptenAllocData class, move non-UI logic out of main#25
Open
eflisback wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
Since this PR is kinda big, I'd understand if a full code review isn't viable. Since a lot of things have been touched or moved, I'd appreciate it if @bjornregnell were to check if all functionality is in tact. I've done my best myself, but don't know the app as well as Björn does. The intention with this PR is not to change any behaviour or functionality! |
Contributor
Author
|
Small side note - Since the UI table is a little less coupled with the raw string data, I could change the table column header for supervisors from |
Owner
|
@JuliusNicklas Would you like to assign yourself as reviewer? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is a pretty big refactor which makes issue #1 significantly easier. This is what is being changed:
KaptenAllocDataclass - Prior to this PR, this class was barely in use, and kapten alloc entries were sometimes represented as raw strings, or an array of its substrings. Now, the generated large string data (data-GENERATED.scala) is immediately parsed toKaptenAllocDatainstances. This makes filtering and other related functionality cleaner, and also sets it as the standard representation for entries within the source code. TheTimeEdit.scalamodule has been updated to also parse the TimeEdit CSV data intoKaptenAllocDatainstances. This is why Add lecture rows in schedule #1 will be easy to implement, as the data is represented by the same data structures.String-based kapten alloc entries. Since they now operate on aSeq[KaptenAllocData]instead, they have been moved toKaptenAllocData.scalainstead.getDayOfWeekandgetWeekNumberhave been moved to their own modules within theutilssubdirectory together with the procedure functiondownloadIcs. This reduces the clutter inmain.scala, which now only contains the@mainstartup procedure and UI-related functions.