Skip to content

Commit

Permalink
Merge branch 'master' into fix/calendar_out_of_range
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Tsang committed Nov 23, 2023
2 parents a3da83e + 20775f2 commit 35eb90c
Show file tree
Hide file tree
Showing 11 changed files with 294 additions and 1,507 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test

on:
pull_request:
branches:
- master
push:
branches:
- master

jobs:
unit:
runs-on: ubuntu-latest
strategy:
matrix:
version: ['14', '16', '18', '20']
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.version }}
cache: npm
- run: npm install
- run: npm test

6 changes: 0 additions & 6 deletions .travis.yml

This file was deleted.

5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@

[![Travis](https://img.shields.io/travis/planarnetwork/dtd2mysql.svg?style=flat-square)](https://travis-ci.org/planarnetwork/dtd2mysql) ![npm](https://img.shields.io/npm/v/dtd2mysql.svg?style=flat-square) ![npm](https://img.shields.io/npm/dw/dtd2mysql.svg?style=flat-square)
![David](https://img.shields.io/david/planarnetwork/dtd2mysql.svg?style=flat-square)


![npm](https://img.shields.io/npm/v/dtd2mysql.svg?style=flat-square) ![npm](https://img.shields.io/npm/dw/dtd2mysql.svg?style=flat-square)


An import tool for the British rail fares, routeing and timetable feeds into a database.
Expand Down
14 changes: 13 additions & 1 deletion config/timetable/file/ZTR.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import {RecordWithManualIdentifier} from "../../../src/feed/record/FixedWidthRecord";
import {FixedWidthRecord, RecordWithManualIdentifier} from "../../../src/feed/record/FixedWidthRecord";
import {TextField, VariableLengthText} from "../../../src/feed/field/TextField";
import {MultiRecordFile} from "../../../src/feed/file/MultiRecordFile";
import {BooleanField} from "../../../src/feed/field/BooleanField";
Expand Down Expand Up @@ -45,6 +45,17 @@ const schedule = new RecordWithManualIdentifier(
["runs_from"]
);

export const extraDetails = new FixedWidthRecord(
"z_schedule_extra",
[], {
"schedule": new ForeignKeyField(schedule),
"atoc_code": new TextField(11, 2, true),
},
["schedule"]
);



const stopRecordTypes = {
"LO": {
"z_schedule": new ForeignKeyField(schedule),
Expand Down Expand Up @@ -110,6 +121,7 @@ const stop = new MultiFormatRecord(

const ZTR = new MultiRecordFile({
"BS": schedule,
"BX": extraDetails,
"LO": stop,
"LI": stop,
"LT": stop
Expand Down

0 comments on commit 35eb90c

Please sign in to comment.