-
Notifications
You must be signed in to change notification settings - Fork 64
front: heavily refactor graou open data import #14517
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
Open
Synar
wants to merge
15
commits into
dev
Choose a base branch
from
ali/fix-refactor-graou-import
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
Signed-off-by: Alice K. <alice.khoudli@gmail.com>
Signed-off-by: Alice K. <alice.khoudli@gmail.com>
Signed-off-by: Alice K. <alice.khoudli@gmail.com>
Signed-off-by: Alice K. <alice.khoudli@gmail.com>
Signed-off-by: Alice K. <alice.khoudli@gmail.com>
Signed-off-by: Alice K. <alice.khoudli@gmail.com>
Signed-off-by: Alice K. <alice.khoudli@gmail.com>
Signed-off-by: Alice K. <alice.khoudli@gmail.com>
Signed-off-by: Alice K. <alice.khoudli@gmail.com>
Signed-off-by: Alice K. <alice.khoudli@gmail.com>
Signed-off-by: Alice K. <alice.khoudli@gmail.com>
Signed-off-by: Alice K. <alice.khoudli@gmail.com>
Signed-off-by: Alice K. <alice.khoudli@gmail.com>
Signed-off-by: Alice K. <alice.khoudli@gmail.com>
b3ac4b4 to
de39021
Compare
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.
Graou train schedules parsing logic was spread amongst 5 different files, with functions called at various points of the importing process, without any unifying convention.
In particular, this meant we had to carry a TrainLists parameter on top of the TrainFromJson one in ImportTimetableItemList just for the purpose of storing half-formatted graou train schedules.
Instead :
I'm not 100% sure about where the validation logic should live, and how strict we want to be with it. For example, should we really reject all train schedules because one uic was missing?
Also close #10159 by querying all chs for each step, as is done in many other places in the front. The fixup commit at the end is an alternative version of the code (which I favor, but does require a new type). Both commits can be extracted to another pr if you wish.
For reviewing, I suggest taking a look at the overall new code flow in ImportTimetableItemConfig as well as parseGraouTrains, and then go commit by commit. I tried to be as atomic as possible (perhaps too much?). Each commit compiles and runs.
Next step could be to write a couple unit tests, at least for the overall Graou import.