Skip to content

Commit 3e51751

Browse files
Merge branch 'dev' into dev-flex-2024
# Conflicts: # gtfs.yml # i18n/english.yml # i18n/polish.yml # lib/common/actions/index.js # lib/editor/actions/map/stopStrategies.js # lib/editor/actions/tripPattern.js # lib/editor/components/EditorInput.js # lib/editor/components/HourMinuteInput.js # lib/editor/components/pattern/NormalizeStopTimesModal.js # lib/editor/components/pattern/PatternStopCard.js # lib/editor/components/pattern/PatternStopContainer.js # lib/editor/components/pattern/PatternStopsPanel.js # lib/editor/components/timetable/TimetableEditor.js # lib/editor/components/timetable/TimetableGrid.js # lib/editor/components/timetable/TimetableHeader.js # lib/editor/components/timetable/TripSeriesModal.js # lib/editor/util/map.js # lib/editor/util/validation/validation.js # lib/gtfs/util/index.js # lib/manager/components/transform/FeedTransformation.js # lib/types/index.js
2 parents 9c034ee + d457b45 commit 3e51751

File tree

179 files changed

+6550
-1257
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+6550
-1257
lines changed

.github/CODEOWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# See https://help.github.com/articles/about-codeowners/
22

3-
# An IBI Group OTP/Data Tools member is required to approve PR merges
3+
# An Arcadis OTP/TRANSIT-data-tools member is required to approve PR merges
44
* @ibi-group/otp-data-tools

.github/issue_template.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
_**NOTE:** This issue system is intended for reporting bugs and tracking progress in software development. Although this software is licensed with an open-source license, any issue opened here may not be dealt with in a timely manner. [IBI Group](https://www.ibigroup.com/) is able to provide technical support for custom deployments of this software. Please contact [Ritesh Warade](mailto:ritesh.warade@ibigroup.com?subject=Data%20Tools%20inquiry%20via%20GitHub&body=Name:%20%0D%0AAgency/Company:%20%0D%0ABest%20date/time%20for%20a%20demo/discussion:%20%0D%0ADescription%20of%20needs:%20) if your company or organization is interested in opening a support contract with us. Please remove this note when creating the issue._
1+
_**NOTE:** This issue system is intended for reporting bugs and tracking progress in software development. Although this software is licensed with an open-source license, any issue opened here may not be dealt with in a timely manner. [Arcadis IBI Group](https://www.ibigroup.com/) is able to provide technical support for custom deployments of this software. Please contact [Jon Campbell](mailto:jon.campbell@ibigroup.com?subject=Data%20Tools%20inquiry%20via%20GitHub&body=Name:%20%0D%0AAgency/Company:%20%0D%0ABest%20date/time%20for%20a%20demo/discussion:%20%0D%0ADescription%20of%20needs:%20) if your company or organization is interested in opening a support contract with us. Please remove this note when creating the issue._
22

33
## Observed behavior (please include a screenshot if possible)
44

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ tmp/
88
.tags
99
*.pid
1010

11+
# Ignore mobility data jar for building rules
12+
*.jar
13+
1114
# Optional npm cache directory
1215
.npm
1316

@@ -27,6 +30,7 @@ env.yml
2730
env.yml-original
2831
.env
2932
!configurations/test/env.yml
33+
!docker/server/env.yml
3034
scripts/*client.json
3135
*.pem
3236

.readthedocs.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Read the Docs configuration file for MkDocs projects
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
5+
version: 2
6+
7+
# Set the version of Python and other tools you might need
8+
build:
9+
os: ubuntu-22.04
10+
tools:
11+
python: "3.11"
12+
13+
mkdocs:
14+
configuration: mkdocs.yml

README.md

+21-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
# datatools-ui
22

3-
The core application for IBI Group's transit Data Tools suite. This application provides GTFS editing, management, validation, and deployment to OpenTripPlanner.
3+
[![Join the chat at https://matrix.to/#/#transit-data-tools:gitter.im](https://badges.gitter.im/repo.png)](https://matrix.to/#/#transit-data-tools:gitter.im)
4+
5+
The core application for IBI Group's TRANSIT-Data-Tools suite. This application provides GTFS editing, management, validation, and deployment to OpenTripPlanner.
6+
7+
## Quick Start
8+
9+
A pre-configured datatools instance can be lauched via Docker by running
10+
11+
```bash
12+
cd docker
13+
cp ../configurations/default/env.yml.tmp ../configurations/default/env.yml
14+
docker-compose up
15+
```
16+
17+
from the datatools-ui directory. Datatools will then be running on port `9966`.
18+
19+
Deployment functionality will not work, and persistence may only work in certain cases (look into Docker volumes for more info).
420

521
## Configuration
622

@@ -12,6 +28,10 @@ View the [latest release documentation](http://data-tools-docs.ibi-transit.com/e
1228

1329
Note: `dev` branch docs (which refer to the default `branch` and are more up-to-date and accurate for most users) can be found [here](http://data-tools-docs.ibi-transit.com/en/dev/).
1430

31+
## Getting in touch
32+
33+
We have a Gitter [space](https://matrix.to/#/#transit-data-tools:gitter.im) for the full TRANSIT-Data-Tools project where you can post questions and comments.
34+
1535
## Shoutouts 🙏
1636

1737
<img src="browserstack-logo-600x315.png" height="80" title="BrowserStack Logo" alt="BrowserStack Logo" />

__tests__/e2e/server/Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# syntax=docker/dockerfile:1
2-
FROM maven:3.8.6-openjdk-8
2+
FROM maven:3.8.7-openjdk-18
3+
34
WORKDIR /datatools
45

56
ARG E2E_AUTH0_USERNAME
@@ -32,6 +33,7 @@ ARG AWS_SECRET_ACCESS_KEY
3233

3334
# Grab latest dev build of Datatools Server
3435
RUN git clone https://github.com/ibi-group/datatools-server.git
36+
RUN microdnf install wget
3537
WORKDIR /datatools/datatools-server
3638
# TODO: Remove once dev-flex is merged into dev!
3739
RUN git checkout dev-flex

__tests__/end-to-end.js

+4
Original file line numberDiff line numberDiff line change
@@ -2779,6 +2779,10 @@ describe('end-to-end', () => {
27792779

27802780
// wait for snapshots tab to load and publish snapshot
27812781
await waitForAndClick('[data-test-id="publish-snapshot-button"]')
2782+
2783+
// wait for snapshot export modal and click "no" to proprietary file export
2784+
await waitForAndClick('[data-test-id="export-patterns-modal-no"]')
2785+
27822786
// wait for version to get created
27832787
await waitAndClearCompletedJobs()
27842788

__tests__/test-utils/mock-data/manager.js

+37-4
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export function makeMockDeployment (
7171
peliasCsvFiles: [],
7272
peliasResetDb: null,
7373
peliasUpdate: null,
74+
peliasSynonymsBase64: null,
7475
pinnedfeedVersionIds: [],
7576
projectBounds: {east: 0, west: 0, north: 0, south: 0},
7677
projectId: project.id,
@@ -109,13 +110,14 @@ export const mockProject = {
109110
pinnedDeploymentId: null,
110111
peliasWebhookUrl: null,
111112
routerConfig: {
112-
carDropoffTime: null,
113-
numItineraries: null,
113+
driveDistanceReluctance: null,
114+
itineraryFilters: {nonTransitGeneralizedCostLimit: null},
114115
requestLogFile: null,
115116
stairsReluctance: null,
116117
updaters: null,
117118
walkSpeed: null
118119
},
120+
sharedStopsConfig: null,
119121
useCustomOsmBounds: false,
120122
user: null
121123
}
@@ -128,7 +130,6 @@ export const mockFeedWithVersion = {
128130
externalProperties: {},
129131
id: 'mock-feed-with-version-id',
130132
isPublic: false,
131-
lastFetched: 1543389038810,
132133
lastUpdated: 1543389038810,
133134
latestValidation: {
134135
agencies: null,
@@ -167,6 +168,38 @@ export const mockFeedWithVersion = {
167168
versionCount: 1
168169
}
169170

171+
// a mock feed source summary
172+
export const mockFeedSourceSummaryWithVersion = {
173+
deployable: false,
174+
id: 'mock-feed-with-version-id',
175+
isPublic: false,
176+
lastUpdated: 1543389038810,
177+
latestValidation: {
178+
agencies: null,
179+
agencyCount: 1,
180+
avgDailyRevenueTime: 0,
181+
bounds: {
182+
north: 39.0486949672717,
183+
south: 38.92884,
184+
east: -76.481211,
185+
west: -76.5673055566884
186+
},
187+
endDate: '20190801',
188+
errorCount: 78,
189+
feedVersionId: 'mock-feed-version-id',
190+
loadFailureReason: null,
191+
loadStatus: 'SUCCESS',
192+
routeCount: 10,
193+
startDate: '20180801',
194+
stopCount: 237,
195+
stopTimesCount: 11170,
196+
tripCount: 415
197+
},
198+
labelIds: [],
199+
name: 'test feed with a version',
200+
projectId: mockProject.id
201+
}
202+
170203
// a mock feed with no versions
171204
export const mockFeedWithoutVersion = {
172205
dateCreated: 1544831411569,
@@ -175,7 +208,6 @@ export const mockFeedWithoutVersion = {
175208
externalProperties: {},
176209
id: 'mock-feed-without-version-id',
177210
isPublic: false,
178-
lastFetched: null,
179211
name: 'test feed with no version',
180212
labelIds: [],
181213
noteCount: 0,
@@ -340,6 +372,7 @@ export const mockFeedVersion = {
340372
feedVersionId: 'mock-feed-version-id',
341373
loadFailureReason: null,
342374
loadStatus: 'SUCCESS',
375+
mobilityDataResult: {},
343376
routeCount: 10,
344377
startDate: '20180801',
345378
stopCount: 237,

configurations/default/env.yml.tmp

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ AUTH0_CLIENT_ID: your-auth0-client-id
22
AUTH0_CONNECTION_NAME: your-auth0-connection-name
33
AUTH0_DOMAIN: your-auth0-domain
44
BUGSNAG_KEY: optional-bugsnag-key
5+
MAP_BASE_URL: optional-map-tile-url
56
MAPBOX_ACCESS_TOKEN: your-mapbox-access-token
67
MAPBOX_MAP_ID: mapbox/outdoors-v11
78
MAPBOX_ATTRIBUTION: <a href="https://www.mapbox.com/about/maps/" target="_blank">&copy; Mapbox &copy; OpenStreetMap</a> <a href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a>
@@ -22,3 +23,4 @@ GRAPH_HOPPER_KEY: your-graph-hopper-key
2223
# - 83
2324
GOOGLE_ANALYTICS_TRACKING_ID: optional-ga-key
2425
# GRAPH_HOPPER_POINT_LIMIT: 10 # Defaults to 30
26+
DISABLE_AUTH: true

docker/docker-compose.yml

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
version: "3.8"
2+
3+
x-common-variables: &common-variables
4+
- BUGSNAG_KEY=${BUGSNAG_KEY}
5+
- S3_BUCKET=${S3_BUCKET}
6+
- LOGS_S3_BUCKET=${LOGS_S3_BUCKET}
7+
- MS_TEAMS_WEBHOOK_URL=${MS_TEAMS_WEBHOOK_URL}
8+
- MAPBOX_ACCESS_TOKEN=${MAPBOX_ACCESS_TOKEN}
9+
- GITHUB_SHA=${GITHUB_SHA}
10+
- GITHUB_REF_SLUG=${GITHUB_REF_SLUG}
11+
- TRANSITFEEDS_KEY=${TRANSITFEEDS_KEY}
12+
- GITHUB_REPOSITORY=${GITHUB_REPOSITORY}
13+
- GITHUB_WORKSPACE=${GITHUB_WORKSPACE}
14+
- GITHUB_RUN_ID=${GITHUB_RUN_ID}
15+
- AUTH0_CLIENT_ID=${AUTH0_CLIENT_ID}
16+
- AUTH0_PUBLIC_KEY=${AUTH0_PUBLIC_KEY}
17+
- AUTH0_CONNECTION_NAME=${AUTH0_CONNECTION_NAME}
18+
- AUTH0_DOMAIN=${AUTH0_DOMAIN}
19+
- AUTH0_API_CLIENT=${AUTH0_API_CLIENT}
20+
- AUTH0_API_SECRET=${AUTH0_API_SECRET}
21+
- OSM_VEX=${OSM_VEX}
22+
- SPARKPOST_KEY=${SPARKPOST_KEY}
23+
- SPARKPOST_EMAIL=${SPARKPOST_EMAIL}
24+
- GTFS_DATABASE_URL=jdbc:postgresql://postgres/dmtest
25+
- GTFS_DATABASE_USER=root
26+
- GTFS_DATABASE_PASSWORD=e2e
27+
- MONGO_DB_NAME=data_manager
28+
- MONGO_HOST=mongo:27017
29+
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
30+
- AWS_REGION=${AWS_REGION}
31+
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
32+
- DISABLE_AUTH=true
33+
34+
services:
35+
datatools-server:
36+
image: ghcr.io/ibi-group/datatools-server:dev
37+
restart: always
38+
environment: *common-variables
39+
volumes:
40+
- type: bind
41+
source: ./server/
42+
target: /config
43+
ports:
44+
- "4000:4000"
45+
datatools-ui:
46+
build:
47+
context: ../
48+
dockerfile: ./docker/ui/Dockerfile
49+
args: *common-variables
50+
restart: always
51+
environment: *common-variables
52+
ports:
53+
- "9966:9966"
54+
mongo:
55+
image: mongo
56+
restart: always
57+
volumes:
58+
- dt-mongo:/data/db
59+
postgres:
60+
environment:
61+
POSTGRES_HOST_AUTH_METHOD: trust
62+
POSTGRES_USER: root
63+
POSTGRES_PASS: e2e
64+
POSTGRES_DB: dmtest
65+
image: postgres
66+
restart: always
67+
volumes:
68+
- dt-postgres:/var/lib/postgresql/data
69+
volumes:
70+
dt-postgres:
71+
dt-mongo:

docker/server/env.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
DISABLE_AUTH: TRUE
2+
GTFS_DATABASE_URL: jdbc:postgresql://postgres/dmtest
3+
MONGO_DB_NAME: data_manager
4+
MONGO_HOST: mongo
5+
AUTH0_CLIENT_ID: disable_auth

docker/server/server.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
application:
2+
title: Data Tools
3+
logo: https://d2tyb7byn1fef9.cloudfront.net/ibi_group-128x128.png
4+
logo_large: https://d2tyb7byn1fef9.cloudfront.net/ibi_group_black-512x512.png
5+
client_assets_url: https://example.com
6+
shortcut_icon_url: https://d2tyb7byn1fef9.cloudfront.net/ibi-logo-original%402x.png
7+
public_url: http://localhost:9966
8+
notifications_enabled: false
9+
docs_url: http://conveyal-data-tools.readthedocs.org
10+
support_email: [email protected]
11+
port: 4000
12+
data:
13+
gtfs: /tmp
14+
use_s3_storage: false
15+
s3_region: us-east-1
16+
gtfs_s3_bucket: bucket-name
17+
modules:
18+
enterprise:
19+
enabled: false
20+
editor:
21+
enabled: true
22+
deployment:
23+
enabled: true
24+
ec2:
25+
enabled: false
26+
default_ami: ami-your-ami-id
27+
tag_key: a-tag-key-to-add-to-all-instances
28+
tag_value: a-tag-value-to-add-to-all-instances
29+
# Note: using a cloudfront URL for these download URLs will greatly
30+
# increase download/deploy speed.
31+
otp_download_url: https://optional-otp-repo.com
32+
user_admin:
33+
enabled: false
34+
gtfsapi:
35+
enabled: true
36+
load_on_fetch: false
37+
# use_extension: mtc
38+
# update_frequency: 30 # in seconds
39+
manager:
40+
normalizeFieldTransformation:
41+
# Enter capitalization exceptions (e.g. acronyms), in the desired case, and separated by commas.
42+
defaultCapitalizationExceptions:
43+
- ACE
44+
- BART
45+
# Enter substitutions (e.g. substitute '@' with 'at'), one dashed entry for each substitution, with:
46+
# - pattern: the regex string pattern that will be replaced,
47+
# - replacement: the replacement string for that pattern,
48+
# - normalizeSpace: if true, the resulting field value will include one space before and after the replacement string.
49+
# Note: if the replacement must be blank, then normalizeSpace should be set to false
50+
# and whitespace management should be handled in pattern instead.
51+
# Substitutions are executed in order they appear in the list.
52+
defaultSubstitutions:
53+
- description: "Replace '@' with 'at', and normalize space."
54+
pattern: "@"
55+
replacement: at
56+
normalizeSpace: true
57+
- description: "Replace '+' (\\+ in regex) and '&' with 'and', and normalize space."
58+
pattern: "[\\+&]"
59+
replacement: and
60+
normalizeSpace: true
61+
extensions:
62+
transitland:
63+
enabled: true
64+
api: https://transit.land/api/v1/feeds
65+
transitfeeds:
66+
enabled: true
67+
api: http://api.transitfeeds.com/v1/getFeeds

docker/ui/Dockerfile

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM node:14
2+
WORKDIR /datatools-build
3+
4+
ARG BUGSNAG_KEY
5+
6+
RUN cd /datatools-build
7+
COPY package.json yarn.lock patches /datatools-build/
8+
RUN yarn
9+
COPY . /datatools-build/
10+
COPY configurations/default /datatools-config/
11+
12+
13+
# Copy the tmp file to the env.yml if no env.yml is present
14+
RUN cp -R -u -p /datatools-config/env.yml.tmp /datatools-config/env.yml
15+
16+
CMD yarn run mastarm build --env dev --serve --proxy http://datatools-server:4000/api #

docs/dev/api_interaction.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# API Interaction Transcript
1+
# API Interaction
22
The following is a set of instructions on API calls needed to upload and validate
33
a feed, wait for the tasks' completion, and then browse its contents. All of the
44
endpoints needed to load and process a GTFS file are REST-based. The endpoints

0 commit comments

Comments
 (0)