Skip to content

Commit

Permalink
Merge remote-tracking branch 'otp/dev-2.x' into filter_access_paths_r…
Browse files Browse the repository at this point in the history
…aptor

# Conflicts:
#	src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/RaptorRequestMapper.java
  • Loading branch information
t2gran committed Jan 16, 2024
2 parents de319cd + 288f7d2 commit 2a0418c
Show file tree
Hide file tree
Showing 284 changed files with 2,391 additions and 1,861 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/cibuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ jobs:
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 Down Expand Up @@ -217,11 +211,6 @@ jobs:
- uses: actions/setup-node@v3
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
87 changes: 87 additions & 0 deletions .github/workflows/debug-client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Debug client

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

# 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@v3
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-next
run: |
npm install
npm run build -- --base https://cdn.jsdelivr.net/gh/opentripplanner/debug-client-assets@main/${VERSION}/
- 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-next/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/debug-client-preview/index.html
mkdir -p src/client/debug-client-preview/
cp client-next/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
2 changes: 1 addition & 1 deletion .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
4 changes: 4 additions & 0 deletions .github/workflows/post-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ 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')
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
3 changes: 2 additions & 1 deletion client-next/.env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
VITE_API_URL=/otp/routers/default/transmodel/index/graphql
VITE_API_URL=/otp/routers/default/transmodel/index/graphql
VITE_DEBUG_STYLE_URL=/otp/routers/default/inspector/vectortile/style.json
3 changes: 2 additions & 1 deletion client-next/.env.development
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
VITE_API_URL=http://localhost:8080/otp/routers/default/transmodel/index/graphql
VITE_API_URL=http://localhost:8080/otp/routers/default/transmodel/index/graphql
VITE_DEBUG_STYLE_URL=http://localhost:8080/otp/routers/default/inspector/vectortile/style.json
1 change: 1 addition & 0 deletions client-next/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-exact=true
50 changes: 25 additions & 25 deletions client-next/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 25 additions & 25 deletions client-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,35 @@
"codegen": "graphql-codegen --config codegen.ts"
},
"dependencies": {
"@googlemaps/polyline-codec": "^1.0.28",
"bootstrap": "^5.3.1",
"graphql": "^16.8.0",
"graphql-request": "^6.1.0",
"maplibre-gl": "^3.3.0",
"react": "^18.2.0",
"react-bootstrap": "^2.8.0",
"react-dom": "^18.2.0",
"react-map-gl": "^7.1.5"
"@googlemaps/polyline-codec": "1.0.28",
"bootstrap": "5.3.1",
"graphql": "16.8.0",
"graphql-request": "6.1.0",
"maplibre-gl": "3.3.0",
"react": "18.2.0",
"react-bootstrap": "2.8.0",
"react-dom": "18.2.0",
"react-map-gl": "7.1.5"
},
"devDependencies": {
"@graphql-codegen/cli": "5.0.0",
"@graphql-codegen/client-preset": "4.1.0",
"@graphql-codegen/introspection": "4.0.0",
"@parcel/watcher": "^2.3.0",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vitejs/plugin-react": "^4.0.3",
"eslint": "^8.45.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"prettier": "^3.0.3",
"typescript": "^5.2.2",
"vite": "^4.4.5"
"@parcel/watcher": "2.3.0",
"@types/react": "18.2.21",
"@types/react-dom": "18.2.7",
"@typescript-eslint/eslint-plugin": "6.5.0",
"@typescript-eslint/parser": "6.5.0",
"@vitejs/plugin-react": "4.0.4",
"eslint": "8.48.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-import": "2.28.1",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-react-refresh": "0.4.3",
"prettier": "3.0.3",
"typescript": "5.2.2",
"vite": "4.4.9"
}
}
27 changes: 27 additions & 0 deletions client-next/src/components/MapView/GeometryPropertyPopup.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import {LngLat, Popup} from 'react-map-gl';
import {Table} from 'react-bootstrap';

export function GeometryPropertyPopup({
coordinates,
properties,
onClose,
}: {
coordinates: LngLat;
properties: { [s: string]: string };
onClose: () => void;
}) {
return (
<Popup latitude={coordinates.lat} longitude={coordinates.lng} closeButton={true} onClose={() => onClose()}>
<Table bordered>
<tbody>
{Object.entries(properties).map(([key, value]) => (
<tr key={key}>
<th scope="row">{key}</th>
<td>{value}</td>
</tr>
))}
</tbody>
</Table>
</Popup>
);
}
Loading

0 comments on commit 2a0418c

Please sign in to comment.