Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev-2.x' into gtfsgraphql-canc…
Browse files Browse the repository at this point in the history
…elled-trips
  • Loading branch information
optionsome committed Aug 6, 2024
2 parents 45aacde + db62d62 commit a1fe6e3
Show file tree
Hide file tree
Showing 1,802 changed files with 63,224 additions and 30,381 deletions.
5 changes: 5 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
# project-wide reformatting with prettier
9c9dd613489a348d2381acdcbeab8f86589154d7

# graphql test and documentation reformatting with prettier
12c51f44f204db31d34a1eeb0d59204226e0fa5d

# reorder and reformat GTFS GraphQL API schema file with graphql-java
14051fab312a67cae9a460aaf0bbc77223bec624
53 changes: 22 additions & 31 deletions .github/workflows/cibuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,25 @@ jobs:
timeout-minutes: 20
steps:
# Starting in v2.2 checkout action fetches all tags when fetch-depth=0, for auto-versioning.
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v4
with:
fetch-depth: 0

# nodejs is needed because the dynamic download of it via the prettier maven plugin often
# times out
# Example: https://github.com/opentripplanner/OpenTripPlanner/actions/runs/4490450225/jobs/7897533439
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18

# Java setup step completes very fast, no need to run in a preconfigured docker container
- name: Set up JDK 21
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
cache: maven

- name: Build debug client
working-directory: ./client-next
run: |
npm install
npm run build
- name: Prepare coverage agent, build and test
# these are split into two steps because otherwise maven keeps long-running HTTP connections
# to Maven Central open which then hang during the package phase because the Azure (Github Actions)
Expand All @@ -57,9 +51,11 @@ jobs:
- name: Send coverage data to codecov.io
if: github.repository_owner == 'opentripplanner'
uses: codecov/codecov-action@v3.1.1
uses: codecov/codecov-action@v4
with:
files: target/site/jacoco/jacoco.xml
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true

- name: Deploy to Github Package Registry
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev-1.x' || github.ref == 'refs/heads/dev-2.x')
Expand All @@ -71,17 +67,17 @@ jobs:
timeout-minutes: 20
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
cache: maven
# on windows there are frequent failures caused by page files being too small
# https://github.com/actions/virtual-environments/issues/785
- name: Configure Windows Pagefile
uses: al-cheb/configure-pagefile-action@v1.3
uses: al-cheb/configure-pagefile-action@v1.4
- name: Run tests
run: mvn --batch-mode test -P prettierSkip

Expand All @@ -93,11 +89,11 @@ jobs:
LOCAL_BRANCH: local-pages
REMOTE_BRANCH: main
TOKEN: ${{ secrets.CHANGELOG_TOKEN }}
MASTER_BRANCH_VERSION: 2.4.0
MASTER_BRANCH_VERSION: 2.5.0

steps:

- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v4
# this is necessary so that the correct credentials are put into the git configuration
# when we push to dev-2.x and push the HTML to the git repo
if: github.event_name == 'push' && (github.ref == 'refs/heads/dev-2.x' || github.ref == 'refs/heads/master')
Expand All @@ -107,7 +103,7 @@ jobs:
# was modified last
fetch-depth: 1000

- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v4
# for a simple PR where we don't push, we don't need any credentials
if: github.event_name == 'pull_request'

Expand All @@ -119,14 +115,14 @@ jobs:
if: github.event_name == 'pull_request'
run: mkdocs build

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20

- name: Build GTFS GraphQL API documentation
run: |
npm install -g @magidoc/cli@4.0.0
magidoc generate
npm install -g @magidoc/cli@6.0.0
magidoc generate --stacktrace
- name: Deploy compiled HTML to Github pages
if: github.event_name == 'push' && (github.ref == 'refs/heads/dev-2.x' || github.ref == 'refs/heads/master')
Expand Down Expand Up @@ -180,8 +176,8 @@ jobs:
if: github.repository_owner == 'opentripplanner'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
- name: Run code generator
Expand All @@ -190,7 +186,7 @@ jobs:
yarn install
yarn generate
- name: Set up JDK 21
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
Expand All @@ -205,23 +201,18 @@ jobs:
- build-windows
- build-linux
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 21
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
cache: maven
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Build debug client
working-directory: ./client-next
run: |
npm install
npm run build
- name: Build container image with Jib, push to Dockerhub
env:
CONTAINER_REPO: docker.io/opentripplanner/opentripplanner
Expand Down
88 changes: 88 additions & 0 deletions .github/workflows/debug-client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Debug client

on:
push:
paths:
- 'client/**'
pull_request:
paths:
- 'client/**'

# to avoid conflicts, make sure that only one workflow pushes to Github at the same time
concurrency:
group: github-push

jobs:
debug-client:
if: github.repository_owner == 'opentripplanner'
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
# this is necessary so that the correct credentials are put into the git configuration
# when we push to dev-2.x and push the compiled output to the git repo
- uses: actions/checkout@v4
if: github.event_name == 'push'
with:
token: ${{ secrets.CHANGELOG_TOKEN }}
fetch-depth: 0

# for a simple PR where we don't push, we don't need any credentials
- uses: actions/checkout@v4
if: github.event_name == 'pull_request'

- uses: actions/setup-node@v4
with:
node-version: 18

- name: Set version
run: echo "VERSION=`date +%Y/%m/%Y-%m-%dT%H:%M`" >> $GITHUB_ENV

- name: Build debug client
working-directory: client
run: |
npm install
npm run build -- --base https://cdn.jsdelivr.net/gh/opentripplanner/debug-client-assets@main/${VERSION}/
npm run coverage
- name: Deploy compiled assets to repo
if: github.event_name == 'push' && github.ref == 'refs/heads/dev-2.x'
env:
REMOTE: debug-client
LOCAL_BRANCH: local-assets
REMOTE_BRANCH: main
TOKEN: ${{ secrets.CHANGELOG_TOKEN }}
run: |
# Configure git user
git config --global user.name 'OTP Bot'
git config --global user.email '[email protected]'
# Fetch the assets repo
git remote add $REMOTE https://[email protected]/opentripplanner/debug-client-assets.git
git fetch --depth=1 $REMOTE $REMOTE_BRANCH:$LOCAL_BRANCH
git checkout $LOCAL_BRANCH
# Copy the compiled output to a versioned folder
mkdir -p $VERSION
rsync -r client/output/* ./$VERSION/
git add $VERSION
git commit -am "Add version ${VERSION} of debug client"
# Push to assets repo https://github.com/opentripplanner/debug-client-assets
git push $REMOTE $LOCAL_BRANCH:$REMOTE_BRANCH
# Switch back to the OTP code
git checkout dev-2.x
git pull --rebase
CLIENT_HTML_OUTPUT=src/client/index.html
mkdir -p src/client/
cp client/output/index.html ${CLIENT_HTML_OUTPUT}
# just to debug
cat ${CLIENT_HTML_OUTPUT}
git add -f ${CLIENT_HTML_OUTPUT}
git commit -m "Upgrade debug client to version ${VERSION}"
git push ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git HEAD:dev-2.x
12 changes: 6 additions & 6 deletions .github/workflows/performance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
perf-test:
if: github.repository_owner == 'opentripplanner' && !startsWith(github.event.head_commit.message ,'Bump serialization version id for')
if: github.repository_owner == 'opentripplanner' && !startsWith(github.event.head_commit.message ,'Bump serialization version id for') && !startsWith(github.event.head_commit.message ,'Upgrade debug client to version')
runs-on: performance-test
strategy:
fail-fast: false
Expand Down Expand Up @@ -60,22 +60,22 @@ jobs:
profile: extended

steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v4
if: matrix.profile == 'core' || github.ref == 'refs/heads/dev-2.x'
with:
fetch-depth: 0

- name: Set up JDK
if: matrix.profile == 'core' || github.ref == 'refs/heads/dev-2.x'
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
timeout-minutes: 5

- name: Set up Maven
if: matrix.profile == 'core' || github.ref == 'refs/heads/dev-2.x'
uses: stCarolas/setup-maven@v.4.5
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.8.2

Expand All @@ -102,14 +102,14 @@ jobs:
- name: Archive travel results file
if: matrix.profile == 'core' || github.ref == 'refs/heads/dev-2.x'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.location }}-travelSearch-results.csv
path: test/performance/${{ matrix.location }}/travelSearch-results.csv

- name: Archive Flight Recorder instrumentation file
if: matrix.profile == 'core' || github.ref == 'refs/heads/dev-2.x'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.location }}-flight-recorder
path: ${{ matrix.location}}-speed-test.jfr
9 changes: 7 additions & 2 deletions .github/workflows/post-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ on:
- dev-2.x
types: [closed]

# to avoid conflicts, make sure that only one workflow pushes to Github at the same time
concurrency:
group: github-push

jobs:
changelog-entry:
if: github.event.pull_request.merged && github.repository_owner == 'opentripplanner' && !contains(github.event.pull_request.labels.*.name, 'skip changelog')
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v3.1.0
uses: actions/checkout@v4
with:
token: ${{ secrets.CHANGELOG_TOKEN }}

Expand Down Expand Up @@ -50,6 +54,7 @@ jobs:

- name: Install xmllint
run: |
sudo apt-get update
sudo apt-get install -y libxml2-utils
- name: Configure git user
Expand All @@ -58,7 +63,7 @@ jobs:
git config --global user.email '[email protected]'
- name: Checkout
uses: actions/checkout@v3.1.0
uses: actions/checkout@v4
with:
token: ${{ secrets.CHANGELOG_TOKEN }}

Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ gen-py/
node_modules/
target/
/graphs
/src/client/debug-client-preview/

# for local dev only
/src/test/resources/speedtest/travelSearch-results-*.csv
Expand Down
19 changes: 6 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
## Overview

[![Join the chat at https://gitter.im/opentripplanner/OpenTripPLanner](https://badges.gitter.im/opentripplanner/OpenTripPlanner.svg)](https://gitter.im/opentripplanner/OpenTripPlanner)
[![Matrix](https://img.shields.io/matrix/opentripplanner%3Amatrix.org?label=Matrix%20chat&?cacheSeconds=172800)](https://matrix.to/#/#opentripplanner_OpenTripPlanner:gitter.im)
[![codecov](https://codecov.io/gh/opentripplanner/OpenTripPlanner/branch/dev-2.x/graph/badge.svg?token=ak4PbIKgZ1)](https://codecov.io/gh/opentripplanner/OpenTripPlanner)
[![Commit activity](https://img.shields.io/github/commit-activity/y/opentripplanner/OpenTripPlanner)](https://github.com/opentripplanner/OpenTripPlanner/graphs/contributors)
[![Docker Pulls](https://img.shields.io/docker/pulls/opentripplanner/opentripplanner)](https://hub.docker.com/r/opentripplanner/opentripplanner)

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
including Linux, Mac, and Windows). It exposes 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 2018. The latest version of OTP is v2.4.0, released in September 2023.
been under development since 2018. The latest version of OTP is v2.5.0, released in March 2024.

If you do not want to use this version, please switch to the final 1.x release
tag `v1.5.0` or the `dev-1.x` branch.
Expand Down Expand Up @@ -58,18 +60,9 @@ the world.

## Getting in touch

The fastest way to get help is to use our [Gitter chat room](https://gitter.im/opentripplanner/OpenTripPlanner)
where most of the core developers are. You can also send questions and comments to the
[mailing list](http://groups.google.com/group/opentripplanner-users).

Changes and extensions to OTP are debated in issues on [GitHub](https://github.com/opentripplanner/OpenTripPlanner/issues)
and in the [Gitter chat room](https://gitter.im/opentripplanner/OpenTripPlanner). 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.
The fastest way to get help is to use our [Gitter chat room](https://gitter.im/opentripplanner/OpenTripPlanner) where most of the core developers are. Bug reports may be filed via the Github [issue tracker](https://github.com/openplans/OpenTripPlanner/issues). The OpenTripPlanner [mailing list](http://groups.google.com/group/opentripplanner-users) is used almost exclusively for project announcements. The mailing list and issue tracker are not intended for support questions or discussions. Please use the chat for this purpose. 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,
- [awesome-transit](https://github.com/MobilityData/awesome-transit) Community list of transit APIs,
apps, datasets, research, and software.
Loading

0 comments on commit a1fe6e3

Please sign in to comment.