Skip to content

Commit

Permalink
Merge pull request #46 from conveyal/dev
Browse files Browse the repository at this point in the history
UI refactor and semantic versioning
  • Loading branch information
Landon Reed authored Feb 24, 2017
2 parents fe29528 + 0332cde commit f28b44e
Show file tree
Hide file tree
Showing 518 changed files with 29,755 additions and 39,949 deletions.
18 changes: 0 additions & 18 deletions .babelrc

This file was deleted.

10 changes: 3 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@ node_modules/
dist
*.log
coverage
.idea
server_config.js
src/main/client/config.js
src/main/resources/public
application.conf
target/
.java-version
datatools.iml
src/main/client/config.js
datatools-manager.iml
config.yml
config_server.yml
configurations/*
!configurations/default
tmp/
26 changes: 26 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
language: node_js
notifications:
email: false
node_js:
- '6'
cache:
yarn: true
before_install:
- npm i -g codecov
script:
- yarn run lint
- yarn run cover-client
- codecov
- yarn run build

# If sudo is disabled, CI runs on container based infrastructure (allows caching &c.)
sudo: false

# Notify us of the build status on the Slack channel
notifications:
slack: conveyal:WQxmWiu8PdmujwLw4ziW72Gc

# Push results to codecov.io
after_success:
- bash <(curl -s https://codecov.io/bash)
- yarn run semantic-release
2 changes: 2 additions & 0 deletions config.yml.template
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ application:
gtfs_s3_bucket: bucket-name
port: 4000
title: Data Manager
assets_bucket: bucket-name
logo: http://gtfs-assets-dev.conveyal.com/data_manager.png # defaults to src/main/client/assets/application_logo.png
active_project: project-id
notifications_enabled: false
Expand All @@ -16,6 +17,7 @@ application:
changelog_url: https://changelog.example.com
support_email: support@example.com
osm_vex: http://localhost:1000
r5: http://localhost:8080
date_format: MMM Do YYYY

auth0:
Expand Down
8 changes: 0 additions & 8 deletions config_server.yml.template

This file was deleted.

66 changes: 66 additions & 0 deletions configurations/default/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
entries:
- lib/main.js:dist/index.js
- lib/index.css:dist/index.css
application:
data:
mapdb: /path/to/mapdb
gtfs: /path/to/gtfs
editor_mapdb: /path/to/editor
regions: /path/to/regions/geojson
use_s3_storage: false
gtfs_s3_bucket: bucket-name
port: 4000
title: Data Manager
assets_bucket: bucket-name
logo: http://gtfs-assets-dev.conveyal.com/data_manager.png # defaults to src/main/client/assets/application_logo.png
active_project: project-id
notifications_enabled: false
public_url: http://localhost:9000
docs_url: http://docs.example.com
changelog_url: https://changelog.example.com
support_email: support@example.com
osm_vex: http://localhost:1000
r5: http://localhost:8080
date_format: MMM Do YYYY

auth0:
domain: your-auth0-domain
client_id: your-auth0-client-id
MAPZEN_TURN_BY_TURN_KEY: API_KEY
mapbox:
access_token: MAPBOX_ACCESS_TOKEN
map_id: conveyal.ie3o67m0
modules:
enterprise:
enabled: false
editor:
enabled: true
legacy_editor:
enabled: false
url: http://localhost:9001
alerts:
enabled: false
use_extension: mtc
sign_config:
enabled: false
user_admin:
enabled: true
validator:
enabled: true
deployment:
enabled: false
gtfsapi:
enabled: false
load_on_fetch: false
load_on_startup: false
use_extension: mtc
update_frequency: 3600 # in seconds

extensions:
transitland:
enabled: true
api: https://transit.land/api/v1/feeds
transitfeeds:
enabled: true
api: http://api.transitfeeds.com/v1/getFeeds
key: your-api-key
15 changes: 9 additions & 6 deletions docs/dev/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Prerequisites

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.
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).

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

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

## Building and Running the Application

Install the Javascript dependencies using npm:
Install the Javascript dependencies using yarn:

```bash
$ npm install
$ yarn
```

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

```bash
$ webpack
$ npm run deploy -- s3://$S3_BUCKET_NAME/dist
>>>>>>> Stashed changes
```

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

The application should now be accessible at `http://localhost:9000` (or whatever port you specified in `config.yml`).

The application back-end should now be running at `http://localhost:9000` (or whatever port you specified in `config.yml`).
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`.

## Configuring Modules

Expand Down
10 changes: 6 additions & 4 deletions docs/dev/development.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Development

## Using `combine-serve`
## mastarm

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.
We use Conveyal's front-end JS tool-belt [`mastarm`](https://github.com/conveyal/mastarm) to build, run, and lint while developing.

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:
To kick off a development server at [http://localhost:9966](http://localhost:9966):

```
combine-serve --serve / src/main/resources/public/ --proxy / http://localhost:9000 --port 9001
npm start
```

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.
26 changes: 13 additions & 13 deletions gtfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
fields:
- name: "agency_id"
required: false
inputType: ID
inputType: GTFS_ID
columnWidth: 12
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."
- name: "agency_name"
Expand Down Expand Up @@ -126,10 +126,10 @@
placeholder: contact@agency.org
columnWidth: 12
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."
- name: agencyBrandingUrl
- name: agency_branding_url
required: false
displayName: Agency branding URL
datatools: true
datatools: false
placeholder: https://agency.org/assets/agency/XYZ
inputType: URL
columnWidth: 12
Expand All @@ -141,12 +141,12 @@
fields:
- name: "stop_id"
required: true
inputType: ID
inputType: GTFS_ID
columnWidth: 6
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."
- name: "stop_code"
required: false
inputType: ID
inputType: GTFS_ID
columnWidth: 6
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."
- name: "stop_name"
Expand Down Expand Up @@ -233,16 +233,16 @@
required: true
inputType: DROPDOWN
options:
- value: 0
- value: false
text: 'No'
- value: 1
- value: true
text: 'Yes'
columnWidth: 6
adminOnly: true
# helpContent: The route_id field contains an ID that uniquely identifies a route. The route_id is dataset unique.
- name: route_id
required: true
inputType: ID
inputType: GTFS_ID
columnWidth: 5
helpContent: The route_id field contains an ID that uniquely identifies a route. The route_id is dataset unique.
- name: route_short_name
Expand Down Expand Up @@ -309,10 +309,10 @@
text: Black
columnWidth: 6
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).
- name: routeBrandingUrl
- name: route_branding_url
required: false
displayName: Route branding URL
datatools: true
datatools: false
placeholder: https://agency.org/assets/route/1234
inputType: URL
columnWidth: 12
Expand All @@ -334,7 +334,7 @@
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."
- name: "trip_id"
required: true
inputType: ID
inputType: GTFS_ID
columnWidth: 6
helpContent: "The trip_id field contains an ID that identifies a trip. The trip_id is dataset unique."
- name: "trip_headsign"
Expand Down Expand Up @@ -460,7 +460,7 @@
fields:
- name: "service_id"
required: true
inputType: ID
inputType: GTFS_ID
columnWidth: 6
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."
- name: "description"
Expand Down Expand Up @@ -567,7 +567,7 @@
fields:
- name: "fare_id"
required: true
inputType: ID
inputType: GTFS_ID
columnWidth: 6
helpContent: "The fare_id field contains an ID that uniquely identifies a fare class. The fare_id is dataset unique."
- name: "price"
Expand Down
Loading

0 comments on commit f28b44e

Please sign in to comment.