Skip to content

Commit

Permalink
Revert "Merge pull request #429 from HSLdevcom/fix-otp-data-tools-ima…
Browse files Browse the repository at this point in the history
…ge-and-add-kela-rule"

This reverts commit dd90fa8, reversing
changes made to 8b26266.
  • Loading branch information
vesameskanen committed Dec 23, 2024
1 parent dd90fa8 commit 0a9b4a2
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ Keeps 10 latest versions of the data in storage and removes the rest.

### otp-data-tools

Contains tools, such as the OneBusAway gtfs filter, for gtfs manipulation.
It uses the [opentransitsoftwarefoundation/onebusaway-gtfs-transformer-cli](https://registry.hub.docker.com/r/opentransitsoftwarefoundation/onebusaway-gtfs-transformer-cli) as the base image.
These tools are packaged inside a docker container and are used during the data build process.
Contains tools for gtfs manipulation, such as One Bus Away gtfs filter. OBA filter tool version 1.3.9 is embedded into this repository.
It should be replaced with a newer version if such one appears e.g. into https://mvnrepository.com/.

These tools are packaged inside docker container and are used during the data build process.
2 changes: 0 additions & 2 deletions kela/gtfs-rules/remove-matching-route.rule

This file was deleted.

13 changes: 5 additions & 8 deletions otp-data-tools/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
FROM opentransitsoftwarefoundation/onebusaway-gtfs-transformer-cli:4.4.0
FROM eclipse-temurin:21-jre
LABEL maintainer="Digitransit (digitransit.fi)" \
version="1.1" \
version="1.0" \
repo="https://github.com/HSLdevcom/OpenTripPlanner-data-container"

RUN apt-get update && apt-get -y install git python3 python3-pip python3-venv
RUN rm -rf /var/lib/apt/lists/*
RUN python3 -m venv python-venv && python-venv/bin/pip install future grequests numpy
RUN git clone -b v3 --single-branch https://github.com/HSLdevcom/OTPQA.git

RUN mkdir /data
ADD onebusaway-gtfs-transformer-cli.jar /
ADD build-otp-data-tools.sh ${WORK}
VOLUME /data
RUN ./build-otp-data-tools.sh && rm build-otp-data-tools.sh
9 changes: 3 additions & 6 deletions otp-data-tools/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# OpenTripPlanner-data-tools
[![Build](https://github.com/hsldevcom/OpenTripPlanner-data-container/workflows/Process%20master%20push%20or%20pr/badge.svg?branch=master)](https://github.com/HSLdevcom/OpenTripPlanner-data-container/actions)

## About:
- This docker container includes all the needed tools for preparing gtfs data ready for consumption.
- It uses opentransitsoftwarefoundation/onebusaway-gtfs-transformer-cli as the base image.
- Useful links:
- https://github.com/OneBusAway/onebusaway-gtfs-modules
- Documentation can be found in the `docs` folder
- https://registry.hub.docker.com/r/opentransitsoftwarefoundation/onebusaway-gtfs-transformer-cli
1. This docker container includes all the needed tools for preparing gtfs data
ready for consumption.
7 changes: 7 additions & 0 deletions otp-data-tools/build-otp-data-tools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -e

apt-get update && apt-get -y install git python3 python3-pip python3-venv
rm -rf /var/lib/apt/lists/*
python3 -m venv python-venv && python-venv/bin/pip install future grequests numpy
git clone -b v3 --single-branch https://github.com/HSLdevcom/OTPQA.git
Binary file not shown.
2 changes: 1 addition & 1 deletion task/OBAFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const { postSlackMessage, parseId } = require('../util')
function OBAFilter (src, dst, rule) {
process.stdout.write(`filtering ${src} with ${rule}...\n`)

const cmd = `docker run -v ${dataDir}:/data --rm ${dataToolImage} --transform=/data/${rule} /data/${src} /data/${dst}`
const cmd = `docker pull ${dataToolImage}; docker run -v ${dataDir}:/data --rm ${dataToolImage} java -Xmx6g -jar onebusaway-gtfs-transformer-cli.jar --transform=/data/${rule} /data/${src} /data/${dst}`

try {
execSync(cmd, { stdio: [0, 1, 2] })
Expand Down

0 comments on commit 0a9b4a2

Please sign in to comment.