opentripplanner / OpenTripPlanner

An open source multi-modal trip planner
http://www.opentripplanner.org
Other
2.12k stars 1.01k forks source link

Remove write access to the transit layer from the transit editor service #5921

Closed vpaturet closed 5 days ago

vpaturet commented 2 weeks ago

Summary

The transit editor service allows today to set a new transit layer on the transit model. This is not used anywhere in the code and obscures the lifecycle of the transit layer (the transit layer is created at application construction time and never changed afterwards). This PR removes this dead code.

Issue

No

Unit tests

No

Documentation

No

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 69.46%. Comparing base (d9706b6) to head (2c73e05). Report is 4 commits behind head on dev-2.x.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev-2.x #5921 +/- ## ========================================== Coverage 69.45% 69.46% + Complexity 17067 17066 -1 ========================================== Files 1928 1928 Lines 73580 73578 -2 Branches 7550 7550 ========================================== Hits 51108 51108 + Misses 19847 19845 -2 Partials 2625 2625 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

leonardehrenfried commented 2 weeks ago

There are more unused setter methods in TransitEditorService. Can we remove those, too?

vpaturet commented 2 weeks ago

Good point. It shows actually that the transit editor service is not used properly, the idea was to centralize all write accesses to the transit model.

vpaturet commented 2 weeks ago

To be discussed in the developer meeting, but this should perhaps be part of a larger refactoring.