onebusaway-gtfs-modules icon indicating copy to clipboard operation
onebusaway-gtfs-modules copied to clipboard

Where should transformer strategies live?

Open laidig opened this issue 6 years ago • 4 comments

Summary:

Currently, there are transformer strategies in both org.onebusaway.gtfs_transformer.updates and org.onebusaway.gtfs_transformer.impl. This caused me some confusion (as not all transformations are documented), and I wrote a duplicate transform.

Is there a reason why they are split?

I propose that they be all moved together into one of the following org.onebusaway.gtfs_transformer packages:

updates impl (as they implement a strategy) strategies (a new package)

If someone else opines, I'd be happy to refactor this, test, and submit a PR. Expected behavior:

They should be in one package.

laidig avatar May 07 '18 21:05 laidig

We've been rushing some changes for the latest project, and this repo could use some cleanup in general. Some things that should happen:

  1. Document some of the hidden gems, like support for s// and m//
  2. Create a plugin convention and pull out some of the agency specific transforms, and start refactoring
  3. Investigate, document, and if necessary implement the ability to commit, apply, or flatten the dao from within a transform. Either that or document that multi-part transforms are not recommended
  4. General cleanup as suggested above

sheldonabrown avatar May 08 '18 12:05 sheldonabrown

I spoke with the rest of my team and they agree with your proposed changes. We are happy to accept any contributions you are willing to make...

sheldonabrown avatar May 08 '18 13:05 sheldonabrown

Any thoughts on transform strategies that live outside the onebusaway-gtfs-modules tree? Right now I'm just including onebusaway-gtfs-transformer-cli as a dependency and building a shaded JAR whose main class is org.onebusaway.gtfs_transformer.GtfsTransformerMain, so as to avoid having to tinker with the classpath, but that's not a particularly clean solution.

kurtraschke avatar Mar 27 '19 14:03 kurtraschke

We've been doing a similar pattern for other modules recently for code not appropriate for the generic/open source repo. So no, no better ideas here so far.

sheldonabrown avatar Mar 29 '19 16:03 sheldonabrown