Skip to content

Commit

Permalink
Merge remote-tracking branch 'official/master' into openmove
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiDiaconu97 committed Jan 10, 2025
2 parents ed5d99e + 6694d7c commit 3f04605
Show file tree
Hide file tree
Showing 296 changed files with 14,084 additions and 3,051 deletions.
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**Summary:**

Summarize the changes in the pull request including how it relates to any issues (include the issue number, or link them).

**Expected behavior:**

Explain how you expect the pull request to work in your testing (in case other platforms/versions exhibit different behavior).

Please make sure these boxes are checked before submitting your pull request - thanks!

- [ ] Linked all relevant issues
14 changes: 14 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
changelog:
categories:
- title: Breaking changes
labels:
- "Breaking change"
- title: Bugfixes
labels:
- bug
- title: Non-breaking changes
labels:
- "*"
- title: Dependency upgrades
labels:
- dependencies
89 changes: 68 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,83 @@ on:
pull_request:
branches: [ master ]

env:
MAVEN_ARGS: "--no-transfer-progress -Dstyle.color=always"

jobs:
build:

build:
runs-on: ubuntu-latest

strategy:
matrix:
locale: [ "en_US.utf8", "fr_FR.utf8" ]

env:
LANG: ${{ matrix.locale }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 11
- name: Set locale to ${{ matrix.locale }}
run: |
lang=`echo "${{ matrix.locale }}" | head -c 2`
sudo apt-get -qq install -y language-pack-${lang}
echo ""
# list installed locales
echo "Available locales"
locale -a
sudo locale-gen ${{ matrix.locale }}
sudo update-locale LANG=${{ matrix.locale }}
- run: date

- name: Cache Maven dependencies
uses: actions/cache@v3
- uses: actions/setup-java@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
distribution: 'temurin'
java-version: '17'
cache: 'maven'

- name: Test project with Maven
run: mvn --no-transfer-progress test install
run: |
mvn $MAVEN_ARGS test package
- name: Build documentation
run: mvn --no-transfer-progress site
cli-integration-tests:
runs-on: ubuntu-latest

- name: Deploy documentation to Github Pages
# only deploy after merging to master
if: github.repository_owner == 'OneBusAway' && github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: target/site/
steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'

- name: Run CLI integration tests
run: ./cli-tests/cli-tests.sh

container-image:
if: github.repository_owner == 'onebusaway' && github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest

env:
CONTAINER_REGISTRY_NAMESPACE: docker.io/opentransitsoftwarefoundation
CONTAINER_REGISTRY_USER: onebusawaybot
CONTAINER_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}

steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'

- name: Build container image tarball
run: |
MAVEN_SKIP_ARGS="-Dmaven.test.skip=true -Dmaven.source.skip=true"
mvn $MAVEN_ARGS $MAVEN_SKIP_ARGS package jib:build
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Create Github release

on:
push:
tags:
- "v*.*.*"

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ junkyard
/onebusaway-gtfs-modules.iml
/pom.xml.versionsBackup
*.iml
*.zip
*.jar
6 changes: 0 additions & 6 deletions .travis.yml

This file was deleted.

4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
release:
git checkout master
git pull
mvn release:clean release:prepare release:perform -Dgoals=deploy release:clean
33 changes: 16 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
# onebusaway-gtfs-modules [![CI](https://github.com/OneBusAway/onebusaway-gtfs-modules/actions/workflows/ci.yml/badge.svg)](https://github.com/OneBusAway/onebusaway-gtfs-modules/actions/workflows/ci.yml)
# onebusaway-gtfs-modules

[![CI](https://github.com/OneBusAway/onebusaway-gtfs-modules/actions/workflows/ci.yml/badge.svg)](https://github.com/OneBusAway/onebusaway-gtfs-modules/actions/workflows/ci.yml)
[![Maven Central](https://img.shields.io/maven-central/v/org.onebusaway/onebusaway-gtfs-modules.svg)](https://mvnrepository.com/artifact/org.onebusaway/onebusaway-gtfs-modules)

A Java library for reading and writing [GTFS](https://developers.google.com/transit/gtfs) feeds, including database support.

See more documentation [on the wiki](https://github.com/OneBusAway/onebusaway-gtfs-modules/wiki).
See more documentation in the [`docs folder`](./docs).

## Maven usage

In your `pom.xml`, include:

~~~
<repositories>
<repository>
<id>public.onebusaway.org</id>
<url>https://repo.camsys-apps.com/releases/</url>
</repository>
</repositories>
~~~

... and inside `<dependencies>`:
```
~~~
<dependency>
<groupId>org.onebusaway</groupId>
<artifactId>onebusaway-gtfs</artifactId>
<version>1.3.88</version>
<groupId>org.onebusaway</groupId>
<artifactId>onebusaway-gtfs</artifactId>
<version>${VERSION}</version>
</dependency>
~~~
```

...where `<version>` contains the latest version number.

## Update on camsys-apps.com repo

In August 2024 @leonardehrenfried took over maintainership and subsequently all artifacts are
now again published to Maven Central. Adding camsys-apps.com to your Maven repo configuration is no
longer necessary when you use version 1.4.18 or newer.
28 changes: 28 additions & 0 deletions cli-tests/cli-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash +x

mvn clean package --no-transfer-progress -DskipTests -Dmaven.source.skip=true -Dmaven.javadoc.skip=true

EXAMPLE_1="example.gtfs.zip"
EXAMPLE_2="deathvalley.gtfs.zip"

# transformer-cli

TRANSFORMER_JAR="transformer-cli.jar"

cp onebusaway-gtfs-transformer-cli/target/onebusaway-gtfs-transformer-cli.jar ./${TRANSFORMER_JAR}
wget https://github.com/google/transit/blob/master/gtfs/spec/en/examples/sample-feed-1.zip?raw=true -O ${EXAMPLE_1}

java -jar ${TRANSFORMER_JAR} --help

java -jar ${TRANSFORMER_JAR} --transform="{'op':'remove','match':{'file':'stops.txt','stop_id':'BEATTY_AIRPORT'}}" ${EXAMPLE_1} gtfs.transformed.zip

# merge-cli

MERGE_JAR="merge-cli.jar"

cp onebusaway-gtfs-merge-cli/target/onebusaway-gtfs-merge-cli-*.jar ./${MERGE_JAR}
wget "http://data.trilliumtransit.com/gtfs/deathvalley-demo-ca-us/deathvalley-demo-ca-us.zip" -O ${EXAMPLE_2}

java -jar ${MERGE_JAR} --help

java -jar ${MERGE_JAR} ${EXAMPLE_1} ${EXAMPLE_2} gtfs.merged.zip
Loading

0 comments on commit 3f04605

Please sign in to comment.