Skip to content

Commit f28b44e

Browse files
author
Landon Reed
authored
Merge pull request #46 from conveyal/dev
UI refactor and semantic versioning
2 parents fe29528 + 0332cde commit f28b44e

File tree

518 files changed

+29755
-39949
lines changed

Some content is hidden

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

518 files changed

+29755
-39949
lines changed

.babelrc

Lines changed: 0 additions & 18 deletions
This file was deleted.

.gitignore

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@ node_modules/
33
dist
44
*.log
55
coverage
6-
.idea
7-
server_config.js
8-
src/main/client/config.js
9-
src/main/resources/public
10-
application.conf
116
target/
12-
.java-version
13-
datatools.iml
147
src/main/client/config.js
158
datatools-manager.iml
169
config.yml
1710
config_server.yml
11+
configurations/*
12+
!configurations/default
13+
tmp/

.travis.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
language: node_js
2+
notifications:
3+
email: false
4+
node_js:
5+
- '6'
6+
cache:
7+
yarn: true
8+
before_install:
9+
- npm i -g codecov
10+
script:
11+
- yarn run lint
12+
- yarn run cover-client
13+
- codecov
14+
- yarn run build
15+
16+
# If sudo is disabled, CI runs on container based infrastructure (allows caching &c.)
17+
sudo: false
18+
19+
# Notify us of the build status on the Slack channel
20+
notifications:
21+
slack: conveyal:WQxmWiu8PdmujwLw4ziW72Gc
22+
23+
# Push results to codecov.io
24+
after_success:
25+
- bash <(curl -s https://codecov.io/bash)
26+
- yarn run semantic-release

config.yml.template

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ application:
88
gtfs_s3_bucket: bucket-name
99
port: 4000
1010
title: Data Manager
11+
assets_bucket: bucket-name
1112
logo: http://gtfs-assets-dev.conveyal.com/data_manager.png # defaults to src/main/client/assets/application_logo.png
1213
active_project: project-id
1314
notifications_enabled: false
@@ -16,6 +17,7 @@ application:
1617
changelog_url: https://changelog.example.com
1718
support_email: [email protected]
1819
osm_vex: http://localhost:1000
20+
r5: http://localhost:8080
1921
date_format: MMM Do YYYY
2022

2123
auth0:

config_server.yml.template

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
entries:
2+
- lib/main.js:dist/index.js
3+
- lib/index.css:dist/index.css
4+
application:
5+
data:
6+
mapdb: /path/to/mapdb
7+
gtfs: /path/to/gtfs
8+
editor_mapdb: /path/to/editor
9+
regions: /path/to/regions/geojson
10+
use_s3_storage: false
11+
gtfs_s3_bucket: bucket-name
12+
port: 4000
13+
title: Data Manager
14+
assets_bucket: bucket-name
15+
logo: http://gtfs-assets-dev.conveyal.com/data_manager.png # defaults to src/main/client/assets/application_logo.png
16+
active_project: project-id
17+
notifications_enabled: false
18+
public_url: http://localhost:9000
19+
docs_url: http://docs.example.com
20+
changelog_url: https://changelog.example.com
21+
support_email: [email protected]
22+
osm_vex: http://localhost:1000
23+
r5: http://localhost:8080
24+
date_format: MMM Do YYYY
25+
26+
auth0:
27+
domain: your-auth0-domain
28+
client_id: your-auth0-client-id
29+
MAPZEN_TURN_BY_TURN_KEY: API_KEY
30+
mapbox:
31+
access_token: MAPBOX_ACCESS_TOKEN
32+
map_id: conveyal.ie3o67m0
33+
modules:
34+
enterprise:
35+
enabled: false
36+
editor:
37+
enabled: true
38+
legacy_editor:
39+
enabled: false
40+
url: http://localhost:9001
41+
alerts:
42+
enabled: false
43+
use_extension: mtc
44+
sign_config:
45+
enabled: false
46+
user_admin:
47+
enabled: true
48+
validator:
49+
enabled: true
50+
deployment:
51+
enabled: false
52+
gtfsapi:
53+
enabled: false
54+
load_on_fetch: false
55+
load_on_startup: false
56+
use_extension: mtc
57+
update_frequency: 3600 # in seconds
58+
59+
extensions:
60+
transitland:
61+
enabled: true
62+
api: https://transit.land/api/v1/feeds
63+
transitfeeds:
64+
enabled: true
65+
api: http://api.transitfeeds.com/v1/getFeeds
66+
key: your-api-key

docs/dev/deployment.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Prerequisites
44

5-
The application features a Spark-powered Java backend and a Javascript frontend written with React and Redux. To install and deploy the application, you will need Java 8, Maven, Node/npm, and Webpack.
5+
The application features a Spark-powered Java backend and a Javascript frontend written with React and Redux. To install and deploy the application, you will need Java 8, Maven, Node/npm, yarn, and [mastarm](https://github.com/conveyal/mastarm).
66

77
User athentication is done via [Auth0](http://auth0.com). You will need an Auth0 account and application to use the Data Manager.
88

@@ -95,16 +95,17 @@ To allow for the creation, deletion and editing of users you must generate a tok
9595

9696
## Building and Running the Application
9797

98-
Install the Javascript dependencies using npm:
98+
Install the Javascript dependencies using yarn:
9999

100100
```bash
101-
$ npm install
101+
$ yarn
102102
```
103103

104-
Build the frontend using webpack:
104+
Build and deploy the frontend to s3 using npm script (which calls [mastarm](https://github.com/conveyal/mastarm)):
105105

106106
```bash
107-
$ webpack
107+
$ npm run deploy -- s3://$S3_BUCKET_NAME/dist
108+
>>>>>>> Stashed changes
108109
```
109110

110111
Package the application using Maven:
@@ -119,7 +120,9 @@ Deploy the application with Java:
119120
$ java -jar target/datatools.jar
120121
```
121122

122-
The application should now be accessible at `http://localhost:9000` (or whatever port you specified in `config.yml`).
123+
124+
The application back-end should now be running at `http://localhost:9000` (or whatever port you specified in `config.yml`).
125+
The front-end assets are pointed to by the back end at whatever s3 bucket name is specified in `config.yml` at `application.assets_bucket`.
123126

124127
## Configuring Modules
125128

docs/dev/development.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# Development
22

3-
## Using `combine-serve`
3+
## mastarm
44

5-
Spark does not hot-reload static web files, i.e. the application frontend. To make life easier when doing frontend development, we recommend using [combine-serve](https://github.com/conveyal/combine-serve) to serve both the backend and frontend as a unified service. Used in conjunction with `webpack --watch`, this will eliminate the need to constantly rebuild/reload the frontend for testing.
5+
We use Conveyal's front-end JS tool-belt [`mastarm`](https://github.com/conveyal/mastarm) to build, run, and lint while developing.
66

7-
For example, if running the Java backend on port 9000 (typically via an IDE such as IntelliJ), and you want to serve the combined application on port 9001 for development purposes, use:
7+
To kick off a development server at [http://localhost:9966](http://localhost:9966):
88

99
```
10-
combine-serve --serve / src/main/resources/public/ --proxy / http://localhost:9000 --port 9001
10+
npm start
1111
```
12+
13+
This will use `mastarm` to run a browserify server at the above port along with a proxy for the back-end API, which is assumed to be running on http://localhost:4000.

gtfs.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
fields:
8686
- name: "agency_id"
8787
required: false
88-
inputType: ID
88+
inputType: GTFS_ID
8989
columnWidth: 12
9090
helpContent: "The agency_id field is an ID that uniquely identifies a transit agency. A transit feed may represent data from more than one agency. The agency_id is dataset unique. This field is optional for transit feeds that only contain data for a single agency."
9191
- name: "agency_name"
@@ -126,10 +126,10 @@
126126
placeholder: [email protected]
127127
columnWidth: 12
128128
helpContent: "The agency_email field contains a single valid email address actively monitored by the agency’s customer service department. This email address will be considered a direct contact point where transit riders can reach a customer service representative at the agency."
129-
- name: agencyBrandingUrl
129+
- name: agency_branding_url
130130
required: false
131131
displayName: Agency branding URL
132-
datatools: true
132+
datatools: false
133133
placeholder: https://agency.org/assets/agency/XYZ
134134
inputType: URL
135135
columnWidth: 12
@@ -141,12 +141,12 @@
141141
fields:
142142
- name: "stop_id"
143143
required: true
144-
inputType: ID
144+
inputType: GTFS_ID
145145
columnWidth: 6
146146
helpContent: "The stop_id field contains an ID that uniquely identifies a stop or station. Multiple routes may use the same stop. The stop_id is dataset unique."
147147
- name: "stop_code"
148148
required: false
149-
inputType: ID
149+
inputType: GTFS_ID
150150
columnWidth: 6
151151
helpContent: "The stop_code field contains short text or a number that uniquely identifies the stop for passengers. Stop codes are often used in phone-based transit information systems or printed on stop signage to make it easier for riders to get a stop schedule or real-time arrival information for a particular stop."
152152
- name: "stop_name"
@@ -233,16 +233,16 @@
233233
required: true
234234
inputType: DROPDOWN
235235
options:
236-
- value: 0
236+
- value: false
237237
text: 'No'
238-
- value: 1
238+
- value: true
239239
text: 'Yes'
240240
columnWidth: 6
241241
adminOnly: true
242242
# helpContent: The route_id field contains an ID that uniquely identifies a route. The route_id is dataset unique.
243243
- name: route_id
244244
required: true
245-
inputType: ID
245+
inputType: GTFS_ID
246246
columnWidth: 5
247247
helpContent: The route_id field contains an ID that uniquely identifies a route. The route_id is dataset unique.
248248
- name: route_short_name
@@ -309,10 +309,10 @@
309309
text: Black
310310
columnWidth: 6
311311
helpContent: The route_text_color field can be used to specify a legible color to use for text drawn against a background of route_color. The color must be provided as a six-character hexadecimal number, for example, FFD700. If no color is specified, the default text color is black (000000).
312-
- name: routeBrandingUrl
312+
- name: route_branding_url
313313
required: false
314314
displayName: Route branding URL
315-
datatools: true
315+
datatools: false
316316
placeholder: https://agency.org/assets/route/1234
317317
inputType: URL
318318
columnWidth: 12
@@ -334,7 +334,7 @@
334334
helpContent: "The service_id contains an ID that uniquely identifies a set of dates when service is available for one or more routes. This value is referenced from thecalendar.txt or calendar_dates.txt file."
335335
- name: "trip_id"
336336
required: true
337-
inputType: ID
337+
inputType: GTFS_ID
338338
columnWidth: 6
339339
helpContent: "The trip_id field contains an ID that identifies a trip. The trip_id is dataset unique."
340340
- name: "trip_headsign"
@@ -460,7 +460,7 @@
460460
fields:
461461
- name: "service_id"
462462
required: true
463-
inputType: ID
463+
inputType: GTFS_ID
464464
columnWidth: 6
465465
helpContent: "The service_id contains an ID that uniquely identifies a set of dates when service is available for one or more routes. Each service_id value can appear at most once in a calendar.txt file. This value is dataset unique. It is referenced by the trips.txt file."
466466
- name: "description"
@@ -567,7 +567,7 @@
567567
fields:
568568
- name: "fare_id"
569569
required: true
570-
inputType: ID
570+
inputType: GTFS_ID
571571
columnWidth: 6
572572
helpContent: "The fare_id field contains an ID that uniquely identifies a fare class. The fare_id is dataset unique."
573573
- name: "price"

0 commit comments

Comments
 (0)