Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev-2.x' into siri-light
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardehrenfried committed Dec 11, 2024
2 parents 790bdc6 + cd254bf commit ebcaca2
Show file tree
Hide file tree
Showing 96 changed files with 3,313 additions and 5,169 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cibuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ jobs:

- name: Build GTFS GraphQL API documentation
run: |
npm install -g @magidoc/cli@6.1.0
npm install -g @magidoc/cli@6.2.0
magidoc generate --stacktrace
- name: Deploy compiled HTML to Github pages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/performance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
- name: Build graph
if: matrix.profile == 'core' || github.ref == 'refs/heads/dev-2.x'
run: |
cp application/target/otp-*-SNAPSHOT-shaded.jar otp.jar
cp shaded-jar/target/otp-*-SNAPSHOT-shaded.jar otp.jar
java -Xmx32G -jar otp.jar --build --save test/performance/${{ matrix.location }}/
- name: Run speed test
Expand Down
6 changes: 3 additions & 3 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Used to import NeTEx transit data files.

### Transit Routing

#### [Raptor transit routing](application/src/main/java/org/opentripplanner/raptor/package.md)
#### [Raptor transit routing](raptor/src/main/java/org/opentripplanner/raptor/package.md)

This is the OTP2 new transit routing engine implemented using the Raptor algorithm. It explains how
Raptor works, the important concepts and the design. It might be worth reading even if you are not a
Expand All @@ -71,9 +71,9 @@ implementation is highly critical code, hence we set the bar higher with respect
OTP provides transit data to Raptor by implementing the _raptor/spi_. The
[RoutingService](application/src/main/java/org/opentripplanner/routing/service/DefaultRoutingService.java)
is responsible for mapping from the OTP context to a
[RaptorRequest](application/src/main/java/org/opentripplanner/raptor/api/request/RaptorRequest.java)
[RaptorRequest](raptor/src/main/java/org/opentripplanner/raptor/api/request/RaptorRequest.java)
and then map the
result, [Raptor Path](application/src/main/java/org/opentripplanner/raptor/api/path/RaptorPath.java), back to
result, [Raptor Path](raptor/src/main/java/org/opentripplanner/raptor/api/path/RaptorPath.java), back to
the OTP internal domain. This might seem like a lot of unnecessary mapping, but mapping is simple -
routing is not.

Expand Down
6 changes: 6 additions & 0 deletions DEVELOPMENT_DECISION_RECORDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ Use established terminology from GTFS, NeTEx or the existing OTP code. Make sure
to read and understand. [Follow naming conventions](doc/dev/decisionrecords/NamingConventions.md#naming-conventions) .


## Do Analysis-and-design if needed

Be prepared to provide [analyses and/or design documentation](doc/dev/decisionrecords/AnalysesAndDesign.md)
if a task is complex, changes the core model and/or the main APIs.


## Write-Code-Documentation - Use JavaDoc

Document the business intention and decisions in the relevant code. Do not repeat the logic
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ We run a speed test (included in the code) to measure the performance for every
The main Java server code is in `application/src/main/`. OTP also includes a Javascript client based on the
MapLibre mapping library in `client/src/`. This client is now used for testing, with most major
deployments building custom clients from reusable components. The Maven build produces a unified ("shaded")
JAR file at `application/target/otp-VERSION.jar` containing all necessary code and dependencies to run OpenTripPlanner.
JAR file at `shaded-jar/target/otp-VERSION.jar` containing all necessary code and dependencies to run OpenTripPlanner.

Additional information and instructions are available in
the [main documentation](http://docs.opentripplanner.org/en/dev-2.x/), including a
Expand Down
85 changes: 5 additions & 80 deletions application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<artifactId>otp-root</artifactId>
<version>2.7.0-SNAPSHOT</version>
</parent>
<artifactId>otp</artifactId>
<artifactId>application</artifactId>
<name>OpenTripPlanner - Application</name>

<dependencies>
Expand All @@ -20,12 +20,12 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>otp-utils</artifactId>
<artifactId>utils</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>otp-raptor</artifactId>
<artifactId>raptor</artifactId>
<version>${project.version}</version>
</dependency>

Expand Down Expand Up @@ -148,7 +148,7 @@
<dependency>
<groupId>org.mobilitydata</groupId>
<artifactId>gbfs-java-model</artifactId>
<version>1.0.7</version>
<version>1.0.9</version>
</dependency>

<!-- TESTING -->
Expand Down Expand Up @@ -296,7 +296,7 @@
<dependency>
<groupId>org.onebusaway</groupId>
<artifactId>onebusaway-gtfs</artifactId>
<version>3.2.4</version>
<version>4.3.0</version>
</dependency>
<!-- Processing is used for the debug GUI (though we could probably use just Java2D) -->
<dependency>
Expand Down Expand Up @@ -456,81 +456,6 @@
</execution>
</executions>
</plugin>
<!--
There used to be a dependency-plugin:copy-dependencies plugin entry here, but the
shade-plugin will explode the dependencies even if they aren't manually copied in.
-->
<plugin>
<!-- We want to create a standalone jar that can be run on the command
line. Java does not really allow this - you cannot place jars inside of jars.
You must either provide all the dependency jars to the user (usually lib/
under the directory containing the runnable jar) or explode all the jars
and repackage them into a single jar. The problem is that while class files
are nicely organized into the package namespace and should not collide, the
META-INF directories of the jars will collide. Maven's standard assembly
plugin does not account for this and will just clobber metadata. This then
causes runtime errors, particularly with Spring. Instead, we use the shade
plugin which has transformers that will for example append files of the same
name rather than overwrite them in the combined JAR. NB: Don't use a version
of the shade plugin older than 1.3.2, as it fixed MSHADE-76 (files not merged
properly if some input files are missing a terminating newline) -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<filters>
<filter>
<!-- exclude signatures from merged JAR to avoid invalid signature messages -->
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<!-- The shaded JAR will not be the main artifact for the project, it will be attached
for deployment in the way source and docs are. -->
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>shaded</shadedClassifierName>
<createDependencyReducedPom>false</createDependencyReducedPom>
<!-- MinimizeJar removes unused classes, (classes not imported explicitly by name).
We have eliminated most Jersey auto-scanning, but there is still some need for include
filters to force-include classes that are dynamically loaded by name/auto-scanned. -->
<!-- This roughly halves the size of the OTP JAR, bringing it down to around 20 MB.
<minimizeJar>true</minimizeJar>
<filters> <filter> <artifact>com.sun.jersey:*</artifact> <includes> <include>**</include>
</includes> </filter> <filter> <artifact>org.opentripplanner:*</artifact>
<includes> <include>**</include> </includes> </filter> </filters> -->
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>org.opentripplanner.standalone.OTPMain</Main-Class>
<!-- The ImageIO lines allow some image reader plugins to work
https://stackoverflow.com/questions/7051603/jai-vendorname-null#18495658 -->
<Specification-Title>Java Advanced Imaging Image I/O
Tools
</Specification-Title>
<Specification-Version>1.1</Specification-Version>
<Specification-Vendor>Sun Microsystems, Inc.</Specification-Vendor>
<Implementation-Title>com.sun.media.imageio</Implementation-Title>
<Implementation-Version>1.1</Implementation-Version>
<Implementation-Vendor>Sun Microsystems, Inc.</Implementation-Vendor>
<Extension-Name>com.sun.media.imageio</Extension-Name>
</manifestEntries>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.bohnman</groupId>
<artifactId>package-info-maven-plugin</artifactId>
Expand Down
6 changes: 3 additions & 3 deletions application/src/client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/img/otp-logo.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OTP Debug Client</title>
<script type="module" crossorigin src="https://cdn.jsdelivr.net/gh/opentripplanner/debug-client-assets@main/2024/11/2024-11-27T19:19/assets/index-csysh7Fh.js"></script>
<link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/gh/opentripplanner/debug-client-assets@main/2024/11/2024-11-27T19:19/assets/index-CaBThmWm.css">
<title>OTP Debug</title>
<script type="module" crossorigin src="https://cdn.jsdelivr.net/gh/opentripplanner/debug-client-assets@main/2024/12/2024-12-09T10:11/assets/index-Cy40AOLN.js"></script>
<link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/gh/opentripplanner/debug-client-assets@main/2024/12/2024-12-09T10:11/assets/index-DygGy0HD.css">
</head>
<body>
<div id="root"></div>
Expand Down
Loading

0 comments on commit ebcaca2

Please sign in to comment.