node-gtfs icon indicating copy to clipboard operation
node-gtfs copied to clipboard

Prefixes for IDs

Open Pawajoro opened this issue 2 years ago • 3 comments

Hi!

I've just coded the prefix funcionality. As there may be collisions of IDs when importing multiple feeds, a prefix may be declared to omit ambiguity. Then all merges ideally. I've run linter, but tests failed to start with my npm. Please, check all the changes and enjoy! :)

Pawajoro avatar Apr 17 '23 07:04 Pawajoro

This will be a really useful feature.

I don't see any code in this PR which actually adds the prefixes - only the updates to the models to indicate which fields need prefixes.

brendannee avatar Apr 17 '23 20:04 brendannee

Sorry, fixed! :)

Pawajoro avatar Apr 19 '23 11:04 Pawajoro

This is great.

I added some more details in the readme, some tests and made a few adjustments to how prefixes get added on import. Check out the latest master branch to see this in action.

Could you review the changes I made and let me know if this looks good and works for your use case? Then, I'll release it in a new version.

brendannee avatar Apr 24 '23 19:04 brendannee