Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev-2.x' into upstream-merge-2…
Browse files Browse the repository at this point in the history
…023-12-13
  • Loading branch information
leonardehrenfried committed Dec 13, 2023
2 parents bd92f7e + 21fa273 commit b594a02
Show file tree
Hide file tree
Showing 215 changed files with 5,058 additions and 2,589 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/prune-container-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 'Prune container images'

on:
schedule:
- cron: '0 12 * * 1'
workflow_dispatch:

jobs:
container-image:
if: github.repository_owner == 'opentripplanner'
runs-on: ubuntu-latest
steps:
- name: Delete unused container images
env:
CONTAINER_REPO: opentripplanner/opentripplanner
CONTAINER_REGISTRY_USER: otpbot
CONTAINER_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
run: |
# remove all snapshot container images that have not been pulled for over a year
# --keep-semver makes sure that any image with a x.y.z version scheme is unaffected by this
pip install prune-container-repo==0.0.4
prune-container-repo -u ${CONTAINER_REGISTRY_USER} -r ${CONTAINER_REPO} --days=365 --keep-semver --activate
2 changes: 1 addition & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ examples. The Transit model is more complex than the VehiclePosition model.
a use-case or set of features. It may have an api with request/response classes. These are
usually stateless; Hence the `Use Case Service` does normally not have a model. The implementing
class has the same name as the interface with prefix `Default`.
- `Domain Model` A model witch encapsulate a business area. In the drawing two examples are shown,
- `Domain Model` A model which encapsulate a business area. In the drawing two examples are shown,
the `transit` and `vhicleposition` domain model. The transit model is more complex so the
implementation have a separate `Service` and `Repository`. Almost all http endpoints are ,
read-only so the `Service` can focus on serving the http API endpoints, while the repository
Expand Down
8 changes: 7 additions & 1 deletion CODE_CONVENTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ Builder initStop(Stop stop) {

## Naming Conventions

In general, we use American English. We use the GTFS terminology inside OTP as the transit domain
specific language. In cases where GTFS does not provide an alternative we use NeTEx. The naming
should follow the Java standard naming conventions. For example a "real-time updater" class
is named `RealTimeUpdater`. If in doubt check the Oxford Dictionary(American).


### Packages

Try to arrange code by domain functionality, not technology. The main structure of a package should
Expand All @@ -38,7 +44,7 @@ be `org.opentripplanner.<domain>.<component>.<sub-component>`.
| Package | Description |
| ------------------------------- |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `o.o.<domain>` | At the top level we should divide OTP into "domain"s like `apis`, `framework`, `transit`, `street`, `astar`, `raptor`, `feeds`, `updaters`, and `application`. |
| `component` and `sub-component` | A group of packages/classes witch naturally belong together, think aggregate as in Domain Driven Design. |
| `component` and `sub-component` | A group of packages/classes which naturally belong together, think aggregate as in Domain Driven Design. |
| `component.api` | Used for components to define the programing interface for the component. If present, (see Raptor) all outside dependencies to the component should be through the `api`. |
| `component.model` | Used to create a model of a Entites, ValueObjects, ++. If exposed outside the component you should include an entry point like `xyz.model.XyzModel` and/or a Service (in api or component root package). |
| `component.service` | Implementation of the service like `DefaultTransitService`, may also contain use-case specific code. Note, the Service interface goes into the component root or `api`, not in the service package. |
Expand Down
2 changes: 1 addition & 1 deletion doc-templates/StopConsolidation.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This has the following consequences

However, this feature has also severe downsides:

- It makes realtime trip updates referencing a stop id much more complicated and in many cases
- It makes real-time trip updates referencing a stop id much more complicated and in many cases
impossible to resolve.
You can only reference a stop by its sequence, which only works in GTFS-RT, not Siri.
- Fare calculation and transfers are unlikely to work as expected.
Expand Down
1 change: 0 additions & 1 deletion docs/BuildConfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ Sections follow that describe particular settings in more depth.
| [graph](#graph) | `uri` | URI to the graph object file for reading and writing. | *Optional* | | 2.0 |
| [gsCredentials](#gsCredentials) | `string` | Local file system path to Google Cloud Platform service accounts credentials file. | *Optional* | | 2.0 |
| [includeEllipsoidToGeoidDifference](#includeEllipsoidToGeoidDifference) | `boolean` | Include the Ellipsoid to Geoid difference in the calculations of every point along every StreetWithElevationEdge. | *Optional* | `false` | 2.0 |
| matchBusRoutesToStreets | `boolean` | Based on GTFS shape data, guess which OSM streets each bus runs on to improve stop linking. | *Optional* | `false` | 1.5 |
| maxAreaNodes | `integer` | Visibility calculations for an area will not be done if there are more nodes than this limit. | *Optional* | `150` | 2.1 |
| [maxDataImportIssuesPerFile](#maxDataImportIssuesPerFile) | `integer` | When to split the import report. | *Optional* | `1000` | 2.0 |
| maxElevationPropagationMeters | `integer` | The maximum distance to propagate elevation to vertices which have no elevation. | *Optional* | `2000` | 1.5 |
Expand Down
Loading

0 comments on commit b594a02

Please sign in to comment.