Skip to content

Commit 97cbf91

Browse files
authored
Merge branch 'master' into master
2 parents 956cdc5 + 2919b7c commit 97cbf91

File tree

20 files changed

+1326
-118
lines changed

20 files changed

+1326
-118
lines changed

.github/workflows/docker.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18-
- uses: gradle/wrapper-validation-action@v1
18+
- uses: gradle/actions/wrapper-validation@v4
1919
test:
2020
needs: [ validate_gradle_wrapper ]
2121
runs-on: ubuntu-latest
@@ -33,9 +33,11 @@ jobs:
3333
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
3434
restore-keys: ${{ runner.os }}-gradle
3535
- name: Run Java tests
36-
uses: gradle/gradle-build-action@v2
37-
with:
38-
arguments: testAggregateTestReport
36+
uses: gradle/actions/setup-gradle@v4
37+
38+
- name: Generate aggregate test report
39+
run: ./gradlew testAggregateTestReport
40+
3941
- name: Persist aggregated test reports on failure
4042
if: ${{ failure() }}
4143
uses: actions/upload-artifact@v4

.github/workflows/end_to_end.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
runs-on: ubuntu-latest
4444
steps:
4545
- uses: actions/checkout@v3
46-
- uses: gradle/wrapper-validation-action@v1
46+
- uses: gradle/actions/wrapper-validation@v4
4747
pack-snapshot:
4848
needs: validate_gradle_wrapper
4949
runs-on: ubuntu-latest
@@ -61,9 +61,11 @@ jobs:
6161
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
6262
restore-keys: ${{ runner.os }}-gradle
6363
- name: Package cli app jar with Gradle
64-
uses: gradle/gradle-build-action@v2
65-
with:
66-
arguments: shadowJar
64+
uses: gradle/actions/setup-gradle@v3
65+
66+
- name: Builds ShadowJar
67+
run: ./gradlew shadowJar
68+
6769
- name: Persist gtfs-validator snapshot jar
6870
uses: actions/upload-artifact@v4
6971
with:

.github/workflows/package_installers.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
runs-on: ubuntu-latest
3636
steps:
3737
- uses: actions/checkout@v4
38-
- uses: gradle/wrapper-validation-action@v2
38+
- uses: gradle/actions/wrapper-validation@v4
3939

4040
build_push:
4141
needs: [ validate_gradle_wrapper ]
@@ -81,11 +81,9 @@ jobs:
8181
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "${MACOS_CI_KEYCHAIN_PWD}" build.keychain
8282
8383
- name: "Package GUI app installer with Gradle"
84-
uses: gradle/actions/setup-gradle@v3
85-
with:
86-
arguments: |
87-
jpackage
88-
-Psign-app=${{github.event_name == 'push' || github.event_name == 'release'}}
84+
uses: gradle/actions/setup-gradle@v4
85+
- name: Run Gradle GUI packaging command on push or release
86+
run: ./gradlew jpackage -Psign-app=${{github.event_name == 'push' || github.event_name == 'release'}}
8987

9088
# On MacOS, we now submit the app for "notarization", where Apple will scan the app for
9189
# malware and other issues. This step can take a few minutes or more; the action will wait
@@ -142,9 +140,10 @@ jobs:
142140
143141
- name: Package cli and gui app jars with Gradle
144142
if: ${{ matrix.os == 'ubuntu-latest' }}
145-
uses: gradle/actions/setup-gradle@v3
146-
with:
147-
arguments: shadowJar
143+
uses: gradle/actions/setup-gradle@v4
144+
145+
- name: Produce shadowJar
146+
run: ./gradlew shadowJar
148147

149148
- name: Persist cli app jar
150149
if: ${{ matrix.os == 'ubuntu-latest' }}

.github/workflows/test_pack_doc.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v3
16-
- uses: gradle/wrapper-validation-action@v1
16+
- uses: gradle/actions/wrapper-validation@v4
1717
test:
1818
needs: [ validate_gradle_wrapper ]
1919
runs-on: ${{ matrix.os }}
@@ -35,9 +35,10 @@ jobs:
3535
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
3636
restore-keys: ${{ runner.os }}-gradle
3737
- name: Run tests on Java ${{ matrix.java_version }} and ${{ matrix.os }}
38-
uses: gradle/gradle-build-action@v2
39-
with:
40-
arguments: testAggregateTestReport --continue
38+
uses: gradle/actions/setup-gradle@v4
39+
- name: Continue on test report
40+
run: ./gradlew testAggregateTestReport --continue
41+
4142
- name: Persist aggregated test reports on failure - Java ${{ matrix.java_version }} on ${{ matrix.os }}
4243
if: ${{ failure() }}
4344
uses: actions/upload-artifact@v4
@@ -66,9 +67,10 @@ jobs:
6667
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
6768
restore-keys: ${{ runner.os }}-gradle
6869
- name: Package cli app jar with Gradle
69-
uses: gradle/gradle-build-action@v2
70-
with:
71-
arguments: shadowJar
70+
uses: gradle/actions/setup-gradle@v4
71+
- name: Produce shadowJar
72+
run: ./gradlew shadowJar
73+
7274
- name: Persist cli app jar
7375
uses: actions/upload-artifact@v4
7476
with:
@@ -95,10 +97,10 @@ jobs:
9597
path: ~/.gradle/caches
9698
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
9799
restore-keys: ${{ runner.os }}-gradle
100+
- name: Setup Javadoc build
101+
uses: gradle/actions/setup-gradle@v4
98102
- name: Build Javadoc
99-
uses: gradle/gradle-build-action@v2
100-
with:
101-
arguments: aggregateJavadoc
103+
run: ./gradlew aggregateJavadoc
102104
- name: Persist javadoc
103105
uses: actions/upload-artifact@v4
104106
with:

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ subprojects {
123123
}
124124
} else {
125125
// For releases, the publish task does not upload to MavenCentral.
126-
// It just the artifacts directory hierarchy on the local disk,
126+
// It just creates the artifacts directory hierarchy on the local disk,
127127
// The actual zipping and uploading is done in the publishToMavenCentral task.
128128
url = "${buildDir}/local-repo"
129129
}
@@ -195,7 +195,7 @@ subprojects {
195195
}
196196

197197
tasks.register('publishToSnapshotRepository') {
198-
// We want to do call the publish task only if the version is a snapshot.
198+
// We want to call the publish task only if the version is a snapshot.
199199
// Without this conditional, with a release it would do the publish first, then throw the Exception below.
200200
// But since the dependsOn is within the conditional, the dependency is not created for release versions
201201
// so the publish in that case is never executed.

docs/NEW_RULES.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,6 @@ Values for `csvRowNumber` and `tripId` will be different for each generated noti
143143

144144
### c. Implement the validation rule logic (`FileValidator`)
145145

146-
<!--suppress ALL -->
147-
148-
<a name="examples"/>
149-
150146
Here's the fun part - writing the rule. Because this rule `...extends FileValidator`, we need to define what GTFS files we want - in this case the `trips.txt` and `stop_times.txt` tables.
151147

152148
We do that by declaring the two variables at the top of the class `GtfsTripTableContainer tripTable` and `GtfsStopTimeTableContainer stopTimeTable` (similar `...TableContainer` classes exist for all GTFS files).

main/src/main/java/org/mobilitydata/gtfsvalidator/table/GtfsAgencySchema.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,6 @@ public interface GtfsAgencySchema extends GtfsEntity {
4949

5050
@FieldType(FieldTypeEnum.EMAIL)
5151
String agencyEmail();
52+
53+
GtfsCemvSupport cemvSupport();
5254
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package org.mobilitydata.gtfsvalidator.table;
2+
3+
import org.mobilitydata.gtfsvalidator.annotation.GtfsEnumValue;
4+
5+
/**
6+
* Enum representing the cars_allowed field values.
7+
*
8+
* <p>0 or empty: No information available about car access for trips associated with this agency or
9+
* route. 1: Cars are allowed for trips associated with this agency or route. 2: Cars are not
10+
* allowed for trips associated with this agency or route.
11+
*/
12+
@GtfsEnumValue(name = "NO_INFORMATION", value = 0)
13+
@GtfsEnumValue(name = "ALLOWED", value = 1)
14+
@GtfsEnumValue(name = "NOT_ALLOWED", value = 2)
15+
public interface GtfsCarsAllowedEnum {}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package org.mobilitydata.gtfsvalidator.table;
2+
3+
import org.mobilitydata.gtfsvalidator.annotation.GtfsEnumValue;
4+
5+
/**
6+
* Enum representing the cemv_support field values.
7+
*
8+
* <p>0 or empty: No cEMV information available for trips associated with this agency or route. 1:
9+
* Riders may use cEMVs as fare media for trips associated with this agency or route. 2: cEMVs are
10+
* not supported as fare media for trips associated with this agency or route.
11+
*/
12+
@GtfsEnumValue(name = "NO_INFORMATION", value = 0)
13+
@GtfsEnumValue(name = "SUPPORTED", value = 1)
14+
@GtfsEnumValue(name = "NOT_SUPPORTED", value = 2)
15+
public interface GtfsCemvSupportEnum {}

main/src/main/java/org/mobilitydata/gtfsvalidator/table/GtfsRouteSchema.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,6 @@ public interface GtfsRouteSchema extends GtfsEntity {
6969
@Index
7070
@ConditionallyRequired
7171
String networkId();
72+
73+
GtfsCemvSupport cemvSupport();
7274
}

0 commit comments

Comments
 (0)