Skip to content

Commit

Permalink
Merge commit 'd4a1d8fb' into otp2_move_speed_test_to_routing_worker
Browse files Browse the repository at this point in the history
  • Loading branch information
t2gran committed Mar 28, 2022
2 parents 82189c6 + d4a1d8f commit 54a99f0
Show file tree
Hide file tree
Showing 1,008 changed files with 25,461 additions and 21,678 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/automatic-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,21 @@ on:

jobs:
changelog-entry:
if: github.event.pull_request.merged && github.repository_owner == 'opentripplanner'
runs-on: ubuntu-latest
steps:

- name: Checkout
if: github.event.pull_request.merged && github.repository_owner == 'opentripplanner'
uses: actions/checkout@v2
with:
token: ${{ secrets.CHANGELOG_TOKEN }}

- name: Configure Git User
if: github.event.pull_request.merged && github.repository_owner == 'opentripplanner'
run: |
git config --global user.name 'OTP Changelog Bot'
git config --global user.email '[email protected]'
- name: Generate changelog entry from PR information
if: github.event.pull_request.merged && github.repository_owner == 'opentripplanner'
run: |
# if the title contains "changelog skip" we don't generate an entry
TITLE_LOWER_CASE=`echo $TITLE | awk '{print tolower($0)}'`
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cibuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
with:
fetch-depth: 0
# Java setup step completes very fast, no need to run in a preconfigured docker container
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Cache local Maven repository
uses: actions/cache@v2
with:
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/close_stale_pr_and_issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'Close stale issues'

on:
schedule:
- cron: '30 7 * * *'
workflow_dispatch:

permissions:
issues: write

jobs:
stale:
if: github.repository_owner == 'opentripplanner'
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
id: stale
with:
stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days'
days-before-stale: 90
days-before-close: 30
operations-per-run: 10
exempt-issue-labels: 'Roadmap'
ascending: true
6 changes: 3 additions & 3 deletions .github/workflows/performance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17

- name: Set up Maven
uses: stCarolas/[email protected]
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Build Norway graph
run: |
cp test/ci-performance-test/build-config.json graph/build-config.json
cp target/otp-2.1.0-SNAPSHOT-shaded.jar otp.jar
cp target/otp-*-SNAPSHOT-shaded.jar otp.jar
java -Xmx32G -jar otp.jar --build --save graph
- name: Copy graph, run speed test
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
.pydevproject
.settings
.sonar
.nvmrc
*~
*.ipr
*.iml
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ In turn, in order to prevent OTP2 from turning into a "big-ball-of-mud" (https:/

## OTP2 versus OTP1

The vast majority of the work done by the core development team is now on OTP2 (the dev-2.x branch) as opposed to OTP1 (the dev-1.x branch). Please see http://docs.opentripplanner.org/en/latest/Version-Comparison/ for a discussion of the difference between these two branches. At this point, OTP1 is essentially a legacy product that will receive bug and stability fixes to the extent that they can be readily backported from OTP2 or that the author of such patches can invest the effort to join a meeting and answer any questions about the impact and design of their code.
The vast majority of the work done by the core development team is now on OTP2 (the `dev-2.x` branch) as opposed to OTP1 (the `dev-1.x` branch). Please see http://docs.opentripplanner.org/en/latest/Version-Comparison/ for a discussion of the difference between these two branches. At this point, OTP1 is essentially a legacy product that will receive bug and stability fixes to the extent that they can be readily backported from OTP2 or that the author of such patches can invest the effort to join a meeting and answer any questions about the impact and design of their code.

There is a large base of existing deployments of OTP1, in both trip planning and academic research use. OTP2 is different in many ways from OTP1, and some features that were research prototypes or not actively maintained have been removed. We want to ensure long-term users can continue to rely on these OTP1-specific if needed. Therefore we cannot apply changes to OTP1 which pose any significant risk of introducing new bugs or behavior changes, as this will create additional maintenance or documentation work for which there is no budgeted developer time.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

OpenTripPlanner (OTP) is an open source multi-modal trip planner, focusing on travel by scheduled public transportation in combination with bicycling, walking, and mobility services including bike share and ride hailing. Its server component runs on any platform with a Java virtual machine (including Linux, Mac, and Windows). It exposes REST and GraphQL APIs that can be accessed by various clients including open source Javascript components and native mobile applications. It builds its representation of the transportation network from open data in open standard file formats (primarily GTFS and OpenStreetMap). It applies real-time updates and alerts with immediate visibility to clients, finding itineraries that account for disruptions and service changes.

Note that this branch contains **OpenTripPlanner 2**, the second major version of OTP, which has been under development since Q2 2018 and was released as version v2.0.0 in November 2020.
Note that this branch contains **OpenTripPlanner 2**, the second major version of OTP, which has been under development since Q2 2018. The latest version of OTP is v2.1.0, released in March 2022.

If you do not want to test or explore this version, please switch to the final 1.x release tag `v1.5.0` or the `dev-1.x` branch for any patches and bugfixes applied to the v1.5.0 release.


## Performance Test

[📊 Speed Bench Mark](https://otp-performance.leonard.io/) We run the SpeedTest (included in the code) to measure the performance for every PR merged into OTP. The test uses a fixed Norwegian Netex data set and Grafana is used to display the results.
[📊 Speed Benchmark](https://otp-performance.leonard.io/) We run the SpeedTest (included in the code) to measure the performance for every PR merged into OTP. The test uses a fixed Norwegian Netex data set and Grafana is used to display the results. Each run is listed under the [GitHub Actions](https://github.com/opentripplanner/OpenTripPlanner/actions/workflows/performance-test.yml). If you need to run the test locally you can [download the NeTex file](https://leonard.io/otp/rb_norway-aggregated-netex-2021-12-11.zip) from the Continuous Integration Pipeline. There is a [text file](test/ci-performance-test/travelSearch-expected-results.csv) with the expected results witch might need to be updated when OTP is changed and the test fails. The OSM data used is the [norway-210101.osm.pbf](https://download.geofabrik.de/europe/norway-210101.osm.pbf) file from Geofabrik OSM extract from January 1st 2021.


## Repository layout
Expand All @@ -33,3 +33,8 @@ The OpenTripPlanner project was launched by Portland, Oregon's transport agency
## Mailing Lists

The main forums through which the OpenTripPlanner community organizes development and provides mutual assistance are our two Google discussion groups. Changes and extensions to OTP are debated on the [opentripplanner-dev](https://groups.google.com/forum/#!forum/opentripplanner-dev) developers' list. More general questions and announcements of interest to non-developer OTP users should be directed to the [opentripplanner-users](https://groups.google.com/forum/#!forum/opentripplanner-users) list. Other details of [project governance](http://docs.opentripplanner.org/en/dev-2.x/Governance/) can be found in the main documentation.


## OTP Ecosystem

- [awesome-transit](https://github.com/CUTR-at-USF/awesome-transit) Community list of transit APIs, apps, datasets, research, and software.
25 changes: 9 additions & 16 deletions docs/Basic-Tutorial.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# OpenTripPlanner 2 Basic Tutorial
# OpenTripPlanner Basic Tutorial

This page should allow you to set up and test your own OTP2 server. If all goes well it should only take a few minutes!

## Get Java

As a Java program, OTP must be run within a Java virtual machine (JVM), which is provided as part of the Java runtime (JRE) or Java development kit (JDK). OTP2 is compatible with Java 11 or later. We recommend running on Java 11 rather than a later version, as it is a long-term support release. Run `java -version` to check that you have version 11 or newer of the JVM installed. If you do not, you will need to install a recent OpenJDK or Oracle Java package for your operating system.
As a Java program, OTP must be run within a Java virtual machine (JVM), which is provided as part of the Java runtime (JRE) or Java development kit (JDK). OTP2 is compatible with Java 17 or later. We recommend running on Java 17 rather than a later version, as it is a long-term support release. Run `java -version` to check that you have version 17 or newer of the JVM installed. If you do not, you will need to install a recent OpenJDK or Oracle Java package for your operating system.

## Get OTP

OpenTripPlanner is written in Java and distributed as a single runnable JAR file. This is a "shaded" JAR containing all other libraries needed for OTP to work, and is available from the Maven Central repository. You will be able to go to [the OTP directory at Maven Central](https://repo1.maven.org/maven2/org/opentripplanner/otp/), navigate to the [directory for the 2.0 release](https://repo1.maven.org/maven2/org/opentripplanner/otp/2.0.0/), and download the [file whose name ends with `shaded.jar`](https://repo1.maven.org/maven2/org/opentripplanner/otp/2.0.0/otp-2.0.0-shaded.jar).
OpenTripPlanner is written in Java and distributed as a single runnable JAR file. This is a "shaded" JAR containing all other libraries needed for OTP to work, and is available from the Maven Central repository. You will be able to go to [the OTP directory at Maven Central](https://repo1.maven.org/maven2/org/opentripplanner/otp/), navigate to the [directory for the 2.1 release](https://repo1.maven.org/maven2/org/opentripplanner/otp/2.1.0/), and download the [file whose name ends with `shaded.jar`](https://repo1.maven.org/maven2/org/opentripplanner/otp/2.1.0/otp-2.1.0-shaded.jar).

You may also want to get your own copy of the OTP source code and [build a bleeding edge development JAR from scratch](Getting-OTP.md), especially if you plan to do some development yourself. In that case, check out the branch `dev-2.x`.

Expand Down Expand Up @@ -44,13 +44,6 @@ If you have extracted a smaller PBF file from a larger region, be sure to put on
A typical command to start OTP looks like `java -Xmx2G -jar otp.shaded.jar <options>`. The
`-Xmx` parameter sets the limit on how much memory OTP is allowed to consume. GTFS and OSM data sets are often very large, and OTP is relatively memory-hungry. You will need at least 1GB of memory when working with the Portland TriMet data set, and several gigabytes for larger inputs. If you have
sufficient memory in your computer, set this to a couple of gigabytes (e.g. `-Xmx2G`). Java uses a [garbage collection](https://en.wikipedia.org/wiki/Garbage_collection_(computer_science)) approach to memory management, which requires some "breathing room" to efficiently operate. Without sufficient free memory OTP can grind to a halt. [VisualVM](https://visualvm.github.io) is a good way to inspect Java memory usage, especially with the [VisualGC plugin](https://visualvm.github.io/plugins.html).

Java 11 has tighter security restrictions than previous versions, so when running OTP under Java 11 you will see warnings like this:
```
WARNING: An illegal reflective access operation has occurred
WARNING: Please consider reporting this to the maintainers of com.esotericsoftware.kryo.util.UnsafeUtil
```
These warnings are expected to remain for a while, until all libraries OTP2 depends on have fully migrated to Java 11 and we have upgraded them all.

## Building Graphs

Expand All @@ -63,7 +56,7 @@ It is possible to save the graph to a file on disk after the first phase, then l
The simplest way to use OTP is to build a graph in a single step and start a server immediately, without saving it to disk. The command to do so is:


$ java -Xmx2G -jar otp-2.0.0-rc1-shaded.jar --build --serve /home/username/otp
$ java -Xmx2G -jar otp-2.1.0-shaded.jar --build --serve /home/username/otp


where `/home/username/otp` should be the directory where you put your configuration and input files.
Expand All @@ -80,11 +73,11 @@ the developer tools in your web browser. OTP's built-in web server will run by d

If you want speed up the process of repeatedly starting up a server with the same graph, you can build a graph from street and transit data then save it to a file using the `--build` and `--save` command line parameters together. If for example your current working directory (`.`) contains the input files and the OTP JAR file, you can use this command:

$ java -Xmx2G -jar otp-2.0.0-rc1-shaded.jar --build --save .
$ java -Xmx2G -jar otp-2.1.0-shaded.jar --build --save .

This will produce a file called `graph.obj` in the same directory as the inputs. The server can then be started later using the `--load` parameter, and will read this file instead of building the graph from scratch:

$ java -Xmx2G -jar otp-2.0.0-rc1-shaded.jar --load .
$ java -Xmx2G -jar otp-2.1.0-shaded.jar --load .

Another reason to perform these two phases separately is that the building process loads the entire GTFS and OSM data sets into memory, so can require significantly more memory than just running a server. Accordingly, you may want to perform the build on one machine (e.g. a throw-away cloud instance with more memory or compute capacity), then copy the resulting graph file to one or more smaller machines to serve the API.

Expand All @@ -94,15 +87,15 @@ Building the street graph (especially with elevation data) can take a long time.

Again assuming the input files and OTP JAR file are in the current working directory, you can build a street graph with OSM and elevation data only (ignoring transit input files) with this command:

$ java -Xmx2G -jar otp-2.0.0-rc1-shaded.jar --buildStreet .
$ java -Xmx2G -jar otp-2.1.0-shaded.jar --buildStreet .

Then, to build a graph layering transit data on top of the saved street graph (built using the previous command):

$ java -Xmx2G -jar otp-2.0.0-rc1-shaded.jar --loadStreet --save .
$ java -Xmx2G -jar otp-2.1.0-shaded.jar --loadStreet --save .

Finally, the server can be started using the `--load` parameter:

$ java -Xmx2G -jar otp-2.0.0-rc1-shaded.jar --load .
$ java -Xmx2G -jar otp-2.1.0-shaded.jar --load .


## Command Line Switches
Expand Down
Loading

0 comments on commit 54a99f0

Please sign in to comment.