National Routeing Guide
The project provides an implementation of the National Routeing Guide rules in TypeScript.
Install
This project relies on git submodules to pull in the Open Track National Routeing Guide tests so it is best checked out with the --recursive
option:
git clone --recursive git@github.com:assertis/routeing-guide.git
cd routeing-guide/
npm install
Test
npm test
Alternately you can test the BDD scenarios with real data:
npm run test-bdd-real
Documentation
The documentation folder contains a number of useful specifications and logical flow chart in mermaid format.
The National Routeing Guide takes a journey and returns 0...n route codes the journey is valid on.
The rules exist for a number reasons:
- they determine what is a valid route for the fares. For example, if you have a ticket from Brighton to London, it is not permitted to go via Edinburgh.
- they preserve (protect) what routes were valid at the time of privatization