Skip to content

Handle NeTEx any version - #5983

Merged
leonardehrenfried merged 3 commits into
opentripplanner:dev-2.xfrom
leonardehrenfried:italian-profile
Jul 26, 2024
Merged

leonardehrenfried merged 3 commits into
opentripplanner:dev-2.xfrom
leonardehrenfried:italian-profile

Conversation

@leonardehrenfried

Copy link
Copy Markdown
Member

Summary

NeTEx allows the version of an entity to use the special string any which is defined as follows:

Use "any" if the VERSION is unknown (note that this will trigger NeTEx's XML automatic consistency check).

@vpaturet has said that in they Entur pipeline an any value is converted to 0 before it reaches OTP.

For this reason, I am adding some special logic to the version parser that uses a fallback for this case. The fallback value existed previously and communicates the fact that the version is unknown.

Issue

noi-techpark/opendatahub-mentor-otp#191

Relates to #3640

Unit tests

Added.

Documentation

Javadoc.

@leonardehrenfried leonardehrenfried added the +NeTEx This issue is related to the Netex model/import. label Jul 24, 2024
@leonardehrenfried
leonardehrenfried marked this pull request as ready for review July 24, 2024 09:20
@leonardehrenfried
leonardehrenfried requested a review from a team as a code owner July 24, 2024 09:20
@codecov

codecov Bot commented Jul 24, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.66%. Comparing base (fa60b78) to head (d71fcc1).

Additional details and impacted files
@@            Coverage Diff             @@
##             dev-2.x    #5983   +/-   ##
==========================================
  Coverage      69.66%   69.66%           
- Complexity     17163    17166    +3     
==========================================
  Files           1942     1942           
  Lines          73784    73786    +2     
  Branches        7550     7550           
==========================================
+ Hits           51401    51404    +3     
  Misses         19753    19753           
+ Partials        2630     2629    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@t2gran t2gran added this to the 2.6 (next release) milestone Jul 25, 2024
@leonardehrenfried
leonardehrenfried merged commit 3c2dd45 into opentripplanner:dev-2.x Jul 26, 2024
t2gran pushed a commit that referenced this pull request Jul 26, 2024
@leonardehrenfried
leonardehrenfried deleted the italian-profile branch July 26, 2024 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

+NeTEx This issue is related to the Netex model/import.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants