Sprint 123
All our SaaS products are about to be updated with the releases associated to this Sprint 123.
Chouette
Associate a Flexible Line to a Booking Arrangement
The user can edit a Line and define:
a Flexible Line Type in Corridor Service, Main Route With Flexible Ends, Flexible Areas Only, Hail And Ride Sections, Fixed Stop Area Wide, Free Area Wide, Mixed Flexible, Mixed Flexible And Fixed, Fixed, Other
a Booking Arrangement in Booking Arrangements defined in the Workgroup
These two attributes are optional.
Import GTFS pickup/drop off not available as Route Stop Point alighting/boarding forbidden
When GTFS Stop Times are defined with pickup_type
or/and drop_off_type
equals to 1, it will create a Route with For Boarding / For Alighting at false
on Stop Point.
Control travel time
The user can control that a Dataset allows daily one journey respecting these criteria :
a Stop Area departure
a Stop Area destination
a departure time (ex: 17:00)
a maximum travel duration
Chouette launches an itinerary research algorithm with selected criteria to analyze every day of the Dataset validity period.
A message is reported if no solution is found for a given day:
The Chouette itinerary research algorithm can use :
Vehicle Journeys inside the Dataset (and their associated timetables)
a Walking between 2 Stop Areas
Ara
Edit Situation with translations
The user can edit a Situation and specify language associated to translated attributes (like Summary and Description). By default, the Situation and Description have no associated language.
The user can associate a text without language or with one of 4 languages ( , , and ):
The Situation can’t be defined with twice the same language for a given attribute.
Improve Situations & General Messages broadcast period
When a SIRI Situation Exchange or General Message request is processed by Ara, the Situations are scoped with a new mechanism.
For each Situation, a Broadcast Period is defined by covering all Validity Periods or Publication Windows:
When a request is processed, a Time Scope is associated:
By default, Ara uses a Time Scope from an hour before the request (or a duration defined by
broadcast.situations.time_to_live
) to infiniteWhen the SIRI request uses
PreviewInterval
&StartInterval
attributes, these attributes are used to define this Time Scope
All Situations which have their Broadcast Period which intercepts the Request Time Scope are scoped to build the request response:
Chouette Valid
This Sprint is the first release covering our https://enroute.atlassian.net/wiki/spaces/PUBLIC/pages/2583789569
Define a Ruleset by JSON
The user can define the Rules and their Rule Contexts via a JSON file:
[
{
"rule_context": "resource/kind_of",
"classes": ["Quay", "StopPlace"],
"rules": [
{
"rule": "attribute/mandatory",
"name": "latitude",
"criticity": "error",
"code": "latitude-mandatory",
"message": "Una parada debe estar ubicada geográficamente. Indicar una latitud"
},
{
"rule": "attribute/mandatory",
"name": "longitude",
"criticity": "error",
"code": "longitude-mandatory",
"message": "Una parada debe estar ubicada geográficamente Indicar una longitud"
}
]
},
{
"rule": "reference/exists",
"referenced_classes": ["Quay", "StopPlace", ..., "OperationPeriod"],
"criticity": "warning",
"code": "unknown-reference"
}
]
Available Rule Contexts
resource/kind_of
: only validate NeTEx Resources of the given classesattribute/match
: only validate NeTEx Resources where the given attribute value matches the given expressionreduce/element
NEW: only validate an element of NeTEx Resourcesreduce/collection
NEW : only validate elements present in a collection of NeTEx Resources
Available Rules
attribute/mandatory
: NeTEx resource must have a value for the given attributeattribute/blank
NEW : NeTEx resource must have a value for the given attributeattribute/value
: NeTEx resource must have the given value for the given attributeattribute/match
: NeTEx resource must have a value for the given attribute which matches the given expressionresource/mandatory
: At least a selected NeTEx Resource must be presentresource/class
: the NeTEx resource must have the given class (ex:ServiceJourneyPattern
)collection/count
: the NeTEx resource must have a compatible element count in the given collectionreference/exists
: the NeTEx reference of the given class must match an existing resourcereference/version
: the NeTEx reference must have a version which matches the given value (ex:any
)tag/match
: the NeTEx resource has a tag which matches the given expression
Manage rulesets by API
The user can manage his own Rulesets by using the Chouette Valid API.
A Ruleset is defined by:
a name
a slug
a (JSON) definition
curl -X POST https://chouette-valid.enroute.mobi/api/v1/rulesets -d@-
{
"ruleset": {
"name":"Test Ruleset",
"slug":"test",
"definition":"[{\"rule\": \"attribute/mandatory\",...}]"
}
}
Manage rulesets with CLI
The user can create a Ruleset via the secretary-client command line:
➜ secretary-client create ruleset --name=Test --slug=test sample.json
Ruleset created for sample.json
The user can update a Ruleset:
➜ secretary-client patch ruleset test --name="Updated ruleset" --definition=sample.json
Ruleset test updated
The user can delete a Ruleset:
➜ secretary-client delete ruleset test
Ruleset test deleted
Provide a NeTEx Starter Kit ruleset
The user can use a Ruleset enroute:starter-kit to valide NeTEx files with these common rules:
A StopPlace, Line, Operator, Network, GroupOfLines has a Name
A ShortName have 12 or less than characters
A PublicCode have 12 or less than characters
A StopPlace or StopPlaceEntrance have a Location (Longitude & Latitude)
A Line has a TransportMode attribute
A Line has a Presentation and a Presentation color (warning)
A Line doesn’t define its own routes
A Route has a LineRef
A (Service)JourneyPattern has a RouteRef
A ServiceJourney has a JourneyPatternRef
A (Service)JourneyPattern has two or more pointsInSequence
A ServiceJourney has one or more dayTypes
A ServiceJourney has two or more passingTimes
A Destination Display have a FrontText attribute
A PassengerStopAssignment has a ScheduledStopPointRef
Any NeTEx ID uses less than 256 characters (warning)
TimedPassingTimes are with chronological passing times
Referenced Resources are present for ScheduledStopPoint, Operator, DayType, Route, JourneyPattern, DestinationDisplay, Direction and RoutePoint
➜ secretary-client create validation --wait --ruleset=enroute:starter-kit --include-schema=false sample.zip
Validation 2ff56368-89f9-4ae2-a92c-6d8255273955 created for sample.zip
Wait .
Id: 2ff56368-89f9-4ae2-a92c-6d8255273955
User Status: failed
Ruleset: enroute:starter-kit
Include Schema: false
Schema Version: master
Created at: 2025-02-26 08:48:15.774 +0100 CET
Started at: 2025-02-26 08:48:19.121 +0100 CET
Ended at: 2025-02-26 08:48:19.195 +0100 CET
Messages:
Code: name-mandatory
Criticity: error
Message: A StopPlace, Line, Operator, Network, GroupOfLines has a Name
Resource: sample.xml:8:9
1 Messages
Retrieve Validation status and messages with CLI
The user can retrieve the validation status:
➜ secretary-client get validation d447ef92-4e58-4ec7-8e40-7db37df83585
Id: d447ef92-4e58-4ec7-8e40-7db37df83585
User Status: pending
Ruleset: test
Include Schema: true
Schema Version: master
Created at: 2025-02-26 08:42:20.997 +0100 CET
Started at: 2025-02-26 08:42:26.787 +0100 CET
➜ secretary-client get validation d447ef92-4e58-4ec7-8e40-7db37df83585
Id: d447ef92-4e58-4ec7-8e40-7db37df83585
User Status: failed
Ruleset: test
Include Schema: true
Schema Version: master
Created at: 2025-02-26 08:42:20.997 +0100 CET
Started at: 2025-02-26 08:42:26.787 +0100 CET
Ended at: 2025-02-26 08:42:37.983 +0100 CET
The user can retrieve the validation messages:
➜ secretary-client messages validation d447ef92-4e58-4ec7-8e40-7db37df83585
Code: xsd-1845
Criticity: error
Message: Element 'sample': No matching global declaration available for the validation root.
Resource: /tmp/ActiveStorage-5b3cfff1-1468-47d0-91bf-fed93c56a257-20250226-928304-3ynshn.xml:2:0
Code: longitude-mandatory
Criticity: error
Message: Una parada debe estar ubicada geográficamente Indicar una longitud
Resource: :11:3
Code: latitude-mandatory
Criticity: warning
Message: Una parada debe estar ubicada geográficamente Indicar una latitud
Resource: :11:3
The user can create and wait the Validation result:
➜ secretary-client create validation --wait --ruleset=enroute:starter-kit --include-schema=false sample.zip
Validation 2ff56368-89f9-4ae2-a92c-6d8255273955 created for sample.zip
Wait .
Id: 2ff56368-89f9-4ae2-a92c-6d8255273955
User Status: failed
Ruleset: enroute:starter-kit
Include Schema: false
Schema Version: master
Created at: 2025-02-26 08:48:15.774 +0100 CET
Started at: 2025-02-26 08:48:19.121 +0100 CET
Ended at: 2025-02-26 08:48:19.195 +0100 CET
Messages:
Code: name-mandatory
Criticity: error
Message: A StopPlace, Line, Operator, Network, GroupOfLines has a Name
Resource: sample.xml:8:9
1 Messages
Documentation
The Chouette documentation has been improved with many updates in the English version: