Trenitalia: Add fix for creating TrainNumbers from ServiceJourney/Name#119
Trenitalia: Add fix for creating TrainNumbers from ServiceJourney/Name#119flaktack wants to merge 8 commits into
Conversation
+ fix typings to parse + return None when retreiving unknown entities with version
This allows writing tests that test the XML input-output of transformations.
|
The way you are doing it here, is not following the architecture that is currently existing. Hence ask questions, or wait for the meeting... |
|
Are you referring to the discussions here? #114 (comment) Is the referenced architecture that a db-to-db transform should be used instead of inline fix? If that is the way, I'll rewrite this and #116 to follow that approach. If not, could you clarify? |
|
In this case, the inline fix wil work. But the general idea would be to do all the fixes at the same time, and then write it into a new file that then can be exported into the XML serialisation. Hence I would want to prevent "bad practise". Why would it be bad or good? It is my assumption that the source may be converted in different output formats, by tainting the source for example by destructive changes reimports (costly) would be required. Writing to a new database only sacrifices diskspace. |
(Builds on and includes commits from #116)
The Trenitalia feed stores the train's number in
ServiceJourney/Name. This fix (e86ef40) creates deduplicatedTrainNumbers and references them fromServiceJourney/trainNumbers. This will allow combing with the Austrian and Swiss feeds which already useTrainNumbers.