Skip to content

Port of osrm-text-instructions to Java#374

Merged
zugaldia merged 13 commits into
masterfrom
lib-osrm-text-instructions
Mar 9, 2017
Merged

Port of osrm-text-instructions to Java#374
zugaldia merged 13 commits into
masterfrom
lib-osrm-text-instructions

Conversation

@zugaldia

@zugaldia zugaldia commented Mar 2, 2017

Copy link
Copy Markdown
Member

For easier iterations, let's include it in the navigation package. Once it's stable, let's spin it off as its own package / repo possibly like https://github.com/Project-OSRM/osrm-text-instructions.swift.

cc: @freenerd @frederoni @bsudekum @1ec5 @cammace

@mention-bot

Copy link
Copy Markdown

@zugaldia, thanks for your PR! By analyzing the history of the files in this pull request, we identified @cammace, @ivovandongen and @ghoshkaj to be potential reviewers.

Comment thread Makefile Outdated
libosrm:
rm -rf mapbox/libjava-services/src/main/resources/translations
mkdir -p mapbox/libjava-services/src/main/resources/translations
cp ../osrm-text-instructions/languages/translations/* mapbox/libjava-services/src/main/resources/translations

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assumes the developer has a clone of osrm-text-instructions at a specific location on disk, and people with different commits checked out will end up with different JSON files in this repository. Can we make this dependency less fragile, perhaps using a submodule?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@1ec5 totally, though I personally would love to avoid submodules at all costs, the final set up is gonna depend on how we decide to distribute and host this library. cc: @freenerd

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you check in the JSON files, then the submodule can be something only contributors to this project have to worry about; someone incorporating the library would use the checked-in JSON files but never have to worry about how they got there.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current code’s disadvantage is twofold: it assumes a suprarepository file structure, and it doesn’t record versions or commit hashes, so it’ll be more difficult to bisect should something go wrong that depends on specific translations.

@zugaldia

zugaldia commented Mar 3, 2017

Copy link
Copy Markdown
Member Author

The good news is that the core logic as well as tests have now been ported. The bad news is that the tests for the compile method are not passing. We're getting different values for the compiled instructions vs fixtures:

image

@cammace

cammace commented Mar 8, 2017

Copy link
Copy Markdown

It looks like you've added additional constructors to some of the direction model classes. Would this resolve #368 or do we still want to add setters?

@zugaldia

zugaldia commented Mar 8, 2017

Copy link
Copy Markdown
Member Author

@cammace I'm afraid this PR won't bring all the getters/setter needed for #368, we'll need to address that one in a separate PR. Otherwise, after the fixes we're now good for your review.

@zugaldia zugaldia changed the title [WIP] Port of osrm-text-instructions to Java Port of osrm-text-instructions to Java Mar 8, 2017

@cammace cammace left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a good start for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants