Skip to content
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

Fixture for HelloGo fares and NTFS fares v2 #262

Merged
merged 1 commit into from
Jun 17, 2019

Conversation

woshilapin
Copy link
Contributor

@woshilapin woshilapin commented Jun 6, 2019

This is a first version of a fixture from HelloGo fares to NTFS fares v2. A few edge cases will be added in the future like:

  • What if the line is not defined for a ticket? A few possible errors can happen:
    • line_id doesn't exist in NTFS
    • contentValidityCondition doesn't exist
    • TriggerObjectRef{ref} doesn't exist in ServiceFrame/Network
  • What if the input NTFS is prefixed?

@woshilapin woshilapin requested a review from papailio June 6, 2019 16:25
@datanel datanel changed the title ND-163 - Fixture for HelloGo fares and NTFS fares v2 Fixture for HelloGo fares and NTFS fares v2 Jun 7, 2019
Copy link
Contributor

@papailio papailio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've already discussed about the fixtures, but I'm sharing my feedback here anyway :)
In the input xml files:

  • each DistanceMatrix should be associated with a different line (so that, in the output, the same origin-destination tickets specified over different lines are distinguishable)
  • the lines referenced in the DistanceMatrix should be defined in the ServiceFrame (after the Network)
  • I think that two ScheduledPoints should have different associated ProjectedPoints (even though technically this might be correct).

As for the advanced future test cases that you suggest, if the line for a ticket is not defined, then no ticket (with no associated ticket use) is created.
The NTFS is supposed to be prefixed, in which case the object ids should be considered without the prefix. Otherwise (if no prefix is present), the object ids are considered as is.

@woshilapin
Copy link
Contributor Author

I've updated a few things:

  • Add the <lines> section in the <ServiceFrame> so the <Network> section can do references to <Line> objects.
  • Add another <Line> named T42 (both in NTFS and in Netex files) so each DistanceMatrix can refer to a different one
  • Change all <ScheduledStopPoint> to make them represent one and only one Stop Area (I did one exception with syn:sp:different:stop:area in the file2.xml.zip to test when multiple ProjectedPointRef match multiple Stop Area)
  • One consequence of the above changes is the apparition of one OD on 2 different lines (mat:16 on B42 and mat:21 on T42)

@woshilapin woshilapin force-pushed the ND-163-fixture branch 3 times, most recently from cf4a460 to 1a5927a Compare June 10, 2019 15:40
@ArnaudOggy ArnaudOggy closed this Jun 14, 2019
@ArnaudOggy ArnaudOggy reopened this Jun 14, 2019
@datanel datanel merged commit 365e104 into hove-io:fare-v2 Jun 17, 2019
@woshilapin woshilapin deleted the ND-163-fixture branch June 17, 2019 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants