Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored OSMImporter.isOneway() to OSMImporter.getRoadDirection(), … #238

Closed
wants to merge 2 commits into from
Closed

Conversation

ehx-v1
Copy link
Contributor

@ehx-v1 ehx-v1 commented May 10, 2016

…changed Javadoc.

My proposed solution to #231.

Perhaps a new method isOneway() redelegating to getRoadDirection() should be added though, for those using the method from outside. Because references outside of Neo4j Spatial most probably won't be auto-updated.
Unfortunately, I thought of that too late...

@ehx-v1
Copy link
Contributor Author

ehx-v1 commented May 10, 2016

The problem about Travis CI is probably exactly what I noticed, it has the old method name while post-commit Neo4j Spatial only has the new one.

isOneway(...) seems to be needed in references like e.g. Travis CI, so I
re-added it as redelegation to getRoadDirection(...), as the
implementation stayed the same (the new Javadoc links towards
getDirection(...) too)
@ehx-v1
Copy link
Contributor Author

ehx-v1 commented May 17, 2016

Added the old name as redelegation. Javadoc states the method as "legacy" and links towards the Javadoc of the refactored method.

@craigtaverner
Copy link
Contributor

Have you signed the CLA? If not, please check the instructions at http://neo4j.com/developer/cla/

@ehx-v1
Copy link
Contributor Author

ehx-v1 commented May 25, 2016

Just done. Already wondered where the instructions are - they were in the wiki for any pull requests where I found a mention, and the wiki does not exist at the moment.

@ehx-v1
Copy link
Contributor Author

ehx-v1 commented May 25, 2016

I wonder what's up with Travis CI though...

*/
public static RoadDirection isOneway(Map<String, Object> wayProperties) {
return getRoadDirection(wayProperties);
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if isOneway(...) should perhaps be marked as deprecated, but I think it should not.

Copy link
Contributor

Choose a reason for hiding this comment

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

Since this code is very likely only used internally, despite this being a public method, I have no objection removing this method. Also, all of Neo4j Spatial is alpha code, and changing the API is completely acceptable at this point. Should there be users that are relying on this we can either revert that decision, or support them changing to the new API.

@craigtaverner
Copy link
Contributor

The problem with Travis is that it is not accepting Java8, which we are using in master (since Neo4j 3.0 has moved to Java8).

I personally think you should fix this at least on Neo4j 2.3 version (like the branch 0.15-neo4j-2.3). You could consider even fixing it on 2.2, but the further back you go the less value. Between 2.3 and 3.0 there were big changes, so it makes sense to support one version before those changes.

The process I suggest is:

  • Delete this pull request
  • Make a new PR against 0.15-neo4j-2.3 branch (you can locally check out a branch based on that, and then cherry-pick your commit onto that branch)
  • Do not keep the old name (I see no value in maintaining an API that is probably not used)
  • Consider making the method private if not used elsewhere
  • Make a new PR against 0.15-neo4j-2.3

Then travis CI will probably be able to compile and test this new PR and I can take it from there:

  • I will merge the PR to 0.15-neo4j-2.3
  • I will merge it forward into master (or 0.16-neo4j-3.0 if I've made that branch by then)

For future reference, I view 'master' as where new development happens. All maintanance work should happen in older branches and merged forward. This current PR is kind of in the grey area, could be maintenance, could be cleanup. I'm voting to do it on an older branch because we get around travis CI.

@ehx-v1
Copy link
Contributor Author

ehx-v1 commented May 25, 2016

Alright, moving the change to 0.15 then.

@ehx-v1 ehx-v1 closed this May 25, 2016
@ehx-v1
Copy link
Contributor Author

ehx-v1 commented May 25, 2016

That means, if I still get to it, because I'm quite busy with the actual company product at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants