Skip to content

Commit c52d6f0

Browse files
authored
Merge pull request #133 from ibi-group/dev
Merge IBI dev branch into catalogueglobal dev
2 parents 7623646 + 6bb66b3 commit c52d6f0

File tree

93 files changed

+4371
-1382
lines changed

Some content is hidden

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

93 files changed

+4371
-1382
lines changed

.github/CODEOWNERS

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# See https://help.github.com/articles/about-codeowners/
2+
3+
# A Conveyal employee is required to approve PR merges
4+
* @conveyal/employees

.github/issue_template.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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 responded to in a timely manner. [Conveyal](https://www.conveyal.com) is unable to provide technical support for custom deployments of this software unless your company has a support contract with us. Please remove this note when creating the issue._
2+
3+
## Observed behavior
4+
5+
Please explain what is being observed within the application here.
6+
7+
## Expected behavior
8+
9+
Please explain what should happen instead.
10+
11+
## Steps to reproduce the problem
12+
13+
Please be as specific as possible.
14+
15+
## Any special notes on configuration used
16+
17+
Please describe any applicable config files that were used
18+
19+
## Version of datatools-server and datatools-ui if applicable (exact commit hash or branch name)
20+
21+
If using this in conjunction with [datatools-ui](https://github.com/conveyal/datatools-ui), this info can be found by clicking on the gear icon on the sidebar.

.github/pull_request_template.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
### Checklist
2+
3+
- [ ] Appropriate branch selected _(all PRs must first be merged to `dev` before they can be merged to `master`)_
4+
- [ ] Any modified or new methods or classes have helpful JavaDoc and code is thoroughly commented
5+
- [ ] The description lists all applicable issues this PR seeks to resolve
6+
- [ ] The description lists any configuration setting(s) that differ from the default settings
7+
- [ ] All tests and CI builds passing
8+
- [ ] The description lists all relevant PRs included in this release _(remove this if not merging to master)_
9+
- [ ] e2e tests are all passing _(remove this if not merging to master)_
10+
- [ ] Code coverage improves or is at 100% _(remove this if not merging to master)_
11+
12+
### Description
13+
14+
Please explain the changes you made here and, if not immediately obvious from the code, how they resolve any referenced issues. Be sure to include all issues being resolved and any special configuration settings that are need for the software to run properly with these changes. If merging to master, please also list the PRs that are to be included.

.travis.yml

+42-12
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,69 @@
1+
dist: trusty # jdk 8 not available on xenial
12
language: java
2-
jdk:
3-
- oraclejdk8
3+
java:
4+
- oraclejdk8
45
install: true
56
sudo: false
67
# Install mongoDB to perform persistence tests
7-
services: mongodb
8+
services:
9+
- mongodb
10+
- postgresql
11+
addons:
12+
postgresql: 9.6
813
cache:
914
directories:
10-
- "$HOME/.m2"
15+
- $HOME/.m2
16+
- $HOME/.cache/yarn
1117
# Install semantic-release
1218
before_script:
13-
- yarn global add @conveyal/maven-semantic-release semantic-release
19+
- yarn global add @conveyal/maven-semantic-release semantic-release@15
20+
# Create dir for GTFS+ files (used during testing)
21+
- mkdir /tmp/gtfsplus
1422
before_install:
1523
#- sed -i.bak -e 's|https://nexus.codehaus.org/snapshots/|https://oss.sonatype.org/content/repositories/codehaus-snapshots/|g' ~/.m2/settings.xml
1624
# set region in AWS config for S3 setup
1725
- mkdir ~/.aws && printf '%s\n' '[default]' 'aws_access_key_id=foo' 'aws_secret_access_key=bar' 'region=us-east-1' > ~/.aws/config
1826
- cp configurations/default/server.yml.tmp configurations/default/server.yml
27+
# create database for tests
28+
- psql -U postgres -c 'CREATE DATABASE catalogue;'
1929
script:
2030
# package jar
2131
- mvn package
2232
after_success:
23-
- semantic-release --prepare @conveyal/maven-semantic-release --publish @semantic-release/github,@conveyal/maven-semantic-release --verify-conditions @semantic-release/github,@conveyal/maven-semantic-release --verify-release @conveyal/maven-semantic-release --use-conveyal-workflow --dev-branch=dev --skip-maven-deploy
24-
# Run codecov after semantic-release because maven-semantic-release creates extra commits that
25-
# codecov will need a report on to reference in future PRs to the release branch
33+
# this first codecov run will upload a report associated with the commit set through Travis CI environment variables
2634
- bash <(curl -s https://codecov.io/bash)
27-
# notify slack channel of build status
35+
# run maven-semantic-release to potentially create a new release of datatools-server. The flag --skip-maven-deploy is
36+
# used to avoid deploying to maven central. So essentially, this just creates a release with a changelog on github.
37+
#
38+
# If maven-semantic-release finishes successfully and the current branch is master, upload coverage reports for the
39+
# commits that maven-semantic-release generated. Since the above codecov run is associated with the commit that
40+
# initiated the Travis build, the report will not be associated with the commits that maven-semantic-release performed
41+
# (if it ended up creating a release and the two commits that were a part of that workflow). Therefore, if on master
42+
# codecov needs to be ran two more times to create codecov reports for the commits made by maven-semantic-release.
43+
# See https://github.com/conveyal/gtfs-lib/issues/193.
44+
#
45+
# The git commands get the commit hash of the HEAD commit and the commit just before HEAD.
46+
- |
47+
semantic-release --prepare @conveyal/maven-semantic-release --publish @semantic-release/github,@conveyal/maven-semantic-release --verify-conditions @semantic-release/github,@conveyal/maven-semantic-release --verify-release @conveyal/maven-semantic-release --use-conveyal-workflow --dev-branch=dev --skip-maven-deploy
48+
if [[ "$TRAVIS_BRANCH" = "master" ]]; then
49+
bash <(curl -s https://codecov.io/bash) -C "$(git rev-parse HEAD)"
50+
bash <(curl -s https://codecov.io/bash) -C "$(git rev-parse HEAD^)"
51+
fi
2852
notifications:
53+
# notify slack channel of build status
2954
slack: conveyal:WQxmWiu8PdmujwLw4ziW72Gc
3055
before_deploy:
3156
# get branch name of current branch for use in jar name: https://graysonkoonce.com/getting-the-current-branch-name-during-a-pull-request-in-travis-ci/
3257
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
33-
# copy packaged jars over to deploy dir
58+
# Create directory that will contain artifacts to deploy to s3.
3459
- mkdir deploy
60+
# Display contents of target directory (for logging purposes only).
61+
- ls target/*.jar
62+
# Copy packaged jars over to deploy dir.
3563
- cp target/dt-*.jar deploy/
36-
- cp "target/dt-$(git describe --always).jar" "deploy/dt-latest-${BRANCH}.jar"
64+
# FIXME: Do not create a branch-specific jar for now. Having a jar that changes contents but keeps the same name
65+
# may cause confusion down the road and may be undesirable.
66+
# - cp "target/dt-$(git describe --always).jar" "deploy/dt-latest-${BRANCH}.jar"
3767
deploy:
3868
provider: s3
3969
skip_cleanup: true
@@ -45,5 +75,5 @@ deploy:
4575
local-dir: deploy
4676
acl: public_read
4777
on:
48-
repo: conveyal/datatools-server
78+
repo: ibi-group/datatools-server
4979
all_branches: true

configurations/default/env.yml.tmp

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
# This client ID refers to the UI client in Auth0.
12
AUTH0_CLIENT_ID: your-auth0-client-id
23
AUTH0_DOMAIN: your-auth0-domain
34
# Note: One of AUTH0_SECRET or AUTH0_PUBLIC_KEY should be used depending on the signing algorithm set on the client.
45
# It seems that newer Auth0 accounts (2017 and later) might default to RS256 (public key).
56
AUTH0_SECRET: your-auth0-secret # uses HS256 signing algorithm
67
# AUTH0_PUBLIC_KEY: /path/to/auth0.pem # uses RS256 signing algorithm
7-
AUTH0_TOKEN: your-auth0-token
8+
# This client/secret pair refer to a machine-to-machine Auth0 application used to access the Management API.
9+
AUTH0_API_CLIENT: your-api-client-id
10+
AUTH0_API_SECRET: your-api-secret-id
811
DISABLE_AUTH: false
912
OSM_VEX: http://localhost:1000
1013
SPARKPOST_KEY: your-sparkpost-key

configurations/default/server.yml.tmp

+6
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ modules:
1515
enabled: false
1616
user_admin:
1717
enabled: true
18+
# Enable GTFS+ module for testing purposes
19+
gtfsplus:
20+
enabled: true
1821
gtfsapi:
1922
enabled: true
2023
load_on_fetch: false
@@ -29,3 +32,6 @@ extensions:
2932
enabled: true
3033
api: http://api.transitfeeds.com/v1/getFeeds
3134
key: your-api-key
35+
# Enable MTC for testing purposes
36+
mtc:
37+
enabled: true

pom.xml

+81-54
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.conveyal</groupId>
88
<artifactId>datatools-server</artifactId>
9-
<version>3.2.1-SNAPSHOT</version>
9+
<version>3.5.1-SNAPSHOT</version>
1010

1111
<licenses>
1212
<license>
@@ -16,42 +16,33 @@
1616
</licenses>
1717

1818
<!-- Developer entries are provided for primary developers.
19-
For other contributors, see https://github.com/conveyal/datatools-server/graphs/contributors -->
19+
For other contributors, see https://github.com/ibi-group/datatools-server/graphs/contributors -->
2020
<developers>
2121
<developer>
2222
<name>Landon Reed</name>
23-
<email>[email protected]</email>
24-
<organization>Conveyal</organization>
25-
<organizationUrl>http://conveyal.com/</organizationUrl>
26-
</developer>
27-
<developer>
28-
<name>Andrew Byrd</name>
29-
<email>[email protected]</email>
30-
<organization>Conveyal</organization>
31-
<organizationUrl>http://conveyal.com/</organizationUrl>
32-
</developer>
33-
<developer>
34-
<name>David Emory</name>
35-
<email>[email protected]</email>
36-
<organization>Conveyal</organization>
37-
<organizationUrl>http://conveyal.com/</organizationUrl>
23+
<email>[email protected]</email>
24+
<organization>IBI Group</organization>
25+
<organizationUrl>https://ibigroup.com/</organizationUrl>
3826
</developer>
3927
<developer>
4028
<name>Evan Siroky</name>
41-
<email>esiroky@conveyal.com</email>
42-
<organization>Conveyal</organization>
43-
<organizationUrl>http://conveyal.com/</organizationUrl>
29+
<email>evan.siroky@ibigroup.com</email>
30+
<organization>IBI Group</organization>
31+
<organizationUrl>https://ibigroup.com/</organizationUrl>
4432
</developer>
4533
</developers>
4634

4735
<!-- Define where the source code for project lives -->
4836
<scm>
49-
<connection>scm:git:https://github.com/conveyal/datatools-server.git</connection>
50-
<developerConnection>scm:git:ssh://[email protected]/conveyal/datatools-server.git</developerConnection>
51-
<url>https://github.com/conveyal/datatools-server.git</url>
37+
<connection>scm:git:https://github.com/ibi-group/datatools-server.git</connection>
38+
<developerConnection>scm:git:ssh://[email protected]/ibi-group/datatools-server.git</developerConnection>
39+
<url>https://github.com/ibi-group/datatools-server.git</url>
5240
</scm>
5341
<properties>
54-
<jackson.version>2.9.8</jackson.version>
42+
<jackson.version>2.9.9</jackson.version>
43+
<!-- Using the latest version of geotools (e.g, 20) seems to cause issues with the shapefile
44+
plugin where the_geom for each feature is null. -->
45+
<geotools.version>17.5</geotools.version>
5546
</properties>
5647
<build>
5748
<resources>
@@ -130,6 +121,7 @@
130121
<plugin>
131122
<groupId>org.apache.maven.plugins</groupId>
132123
<artifactId>maven-jar-plugin</artifactId>
124+
<version>3.1.2</version>
133125
<configuration>
134126
<archive>
135127
<manifest>
@@ -158,23 +150,6 @@
158150
</execution>
159151
</executions>
160152
</plugin>
161-
<!-- This plugin makes sure junit 5 tests run -->
162-
<plugin>
163-
<artifactId>maven-surefire-plugin</artifactId>
164-
<version>2.22.0</version>
165-
<dependencies>
166-
<dependency>
167-
<groupId>org.junit.platform</groupId>
168-
<artifactId>junit-platform-surefire-provider</artifactId>
169-
<version>1.3.1</version>
170-
</dependency>
171-
<dependency>
172-
<groupId>org.junit.jupiter</groupId>
173-
<artifactId>junit-jupiter-engine</artifactId>
174-
<version>5.3.1</version>
175-
</dependency>
176-
</dependencies>
177-
</plugin>
178153
</plugins>
179154
</build>
180155
<repositories>
@@ -218,6 +193,11 @@
218193
<updatePolicy>always</updatePolicy>
219194
</snapshots>
220195
</repository>
196+
<!-- used for importing java projects from github -->
197+
<repository>
198+
<id>jitpack.io</id>
199+
<url>https://jitpack.io</url>
200+
</repository>
221201
</repositories>
222202

223203
<dependencies>
@@ -238,7 +218,7 @@
238218
<dependency>
239219
<groupId>ch.qos.logback</groupId>
240220
<artifactId>logback-classic</artifactId>
241-
<version>1.1.3</version>
221+
<version>1.2.3</version>
242222
</dependency>
243223

244224
<!-- Used to connect to and import legacy editor MapDBs -->
@@ -255,11 +235,31 @@
255235
<version>2.1.0</version>
256236
</dependency>
257237

258-
<!-- Used for loading/fetching/writing GTFS entities (also provides access to commons-io and AWS S3 SDK). -->
238+
<!-- Used for testing (note: this should match the version in gtfs-lib). -->
239+
<dependency>
240+
<groupId>junit</groupId>
241+
<artifactId>junit</artifactId>
242+
<version>4.12</version>
243+
<scope>test</scope>
244+
</dependency>
245+
246+
<!-- Used for loading/fetching/writing GTFS entities. gtfs-lib also provides access to:
247+
- commons-io - generic utilities
248+
- AWS S3 SDK - putting/getting objects into/out of S3.
249+
-->
259250
<dependency>
260251
<groupId>com.conveyal</groupId>
261252
<artifactId>gtfs-lib</artifactId>
262-
<version>4.2.2</version>
253+
<version>5.0.2</version>
254+
<!-- Exclusions added in order to silence SLF4J warnings about multiple bindings:
255+
http://www.slf4j.org/codes.html#multiple_bindings
256+
-->
257+
<exclusions>
258+
<exclusion>
259+
<groupId>org.slf4j</groupId>
260+
<artifactId>slf4j-simple</artifactId>
261+
</exclusion>
262+
</exclusions>
263263
</dependency>
264264

265265
<!-- Used for data-tools application database -->
@@ -290,11 +290,11 @@
290290
<artifactId>jackson-dataformat-yaml</artifactId>
291291
<version>${jackson.version}</version>
292292
</dependency>
293-
293+
<!-- This version does not use ${jackson.version} because v2.9.9.1 does not exist for jackson-annotations. -->
294294
<dependency>
295295
<groupId>com.fasterxml.jackson.core</groupId>
296296
<artifactId>jackson-databind</artifactId>
297-
<version>${jackson.version}</version>
297+
<version>2.9.9.1</version>
298298
</dependency>
299299

300300
<dependency>
@@ -322,15 +322,18 @@
322322
<dependency>
323323
<groupId>org.geotools</groupId>
324324
<artifactId>gt-shapefile</artifactId>
325-
<version>19.2</version>
325+
<version>${geotools.version}</version>
326326
</dependency>
327-
328-
<!-- Unit testing -->
327+
<!-- gt-metadata and gt-api contains some dependencies required by gt-shapefile -->
329328
<dependency>
330-
<groupId>org.junit.jupiter</groupId>
331-
<artifactId>junit-jupiter-api</artifactId>
332-
<version>5.3.1</version>
333-
<scope>test</scope>
329+
<groupId>org.geotools</groupId>
330+
<artifactId>gt-metadata</artifactId>
331+
<version>${geotools.version}</version>
332+
</dependency>
333+
<dependency>
334+
<groupId>org.geotools</groupId>
335+
<artifactId>gt-api</artifactId>
336+
<version>${geotools.version}</version>
334337
</dependency>
335338

336339
<!-- Error reporting -->
@@ -359,8 +362,32 @@
359362
<groupId>org.hamcrest</groupId>
360363
<artifactId>java-hamcrest</artifactId>
361364
<version>2.0.0.0</version>
365+
<scope>test</scope>
366+
</dependency>
367+
<!-- Snapshotting library for testing -->
368+
<dependency>
369+
<groupId>com.github.conveyal</groupId>
370+
<artifactId>java-snapshot-matcher</artifactId>
371+
<version>3495b32f7b4d3f82590e0a2284029214070b6984</version>
372+
<scope>test</scope>
373+
</dependency>
374+
<!-- wiremock is used to mock http requests -->
375+
<dependency>
376+
<groupId>com.github.tomakehurst</groupId>
377+
<artifactId>wiremock-standalone</artifactId>
378+
<version>2.14.0</version>
379+
<scope>test</scope>
380+
</dependency>
381+
<!-- Used for writing csv for merged feeds. Note: this appears to be one of the only
382+
CSV libraries that will only quote values when necessary (e.g., there is a comma character
383+
contained within the value) and that will work with an output stream writer when writing
384+
directly to a zip output stream.
385+
-->
386+
<dependency>
387+
<groupId>net.sf.supercsv</groupId>
388+
<artifactId>super-csv</artifactId>
389+
<version>2.4.0</version>
362390
</dependency>
363-
364391
</dependencies>
365392

366393
</project>

0 commit comments

Comments
 (0)