-
Notifications
You must be signed in to change notification settings - Fork 80
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
Save Atlas to ProtobufAtlas similar to TextAtlas #99
Conversation
…md for instructions on how to get the project working with Eclipse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've officially become our Proto expert! Really nice and clean code. Some minor suggestions inline.
return protoTags; | ||
} | ||
|
||
private ProtoLocation convertLocationToProtoLocation(final Location location) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check out the Converter
and TwoWayConverter
interfaces, it might be a good pattern to follow here as well. Create a proto conversion package that has all the converters (with convert and backwardConvert), then use them here in the builder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good! James actually mentioned the exact same thing.
final ProtoTag.Builder tagBuilder = ProtoTag.newBuilder(); | ||
|
||
// TODO what happens if entry.getValue() returns null? | ||
// this could happen if someone inserted a null entry at that key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say in the case of a null key or value, throw away the entry and log a warning.
} | ||
return result; | ||
} | ||
// TODO do something smarter here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine, I would add the error to the re-thrown exception so it doesn't get lost. Possibly the tagsList as well.
throw new CoreException("Unable to parse proto tags.", error);
{ | ||
protoAtlasContainer = ProtoAtlasContainer.parseFrom(resource.readBytesAndClose()); | ||
} | ||
// TODO do something smarter here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only add the caught exception to the CoreException argument list so the stack trace isn't lost.
throw new CoreException("Error parsing the protobuf", exception);
protoLineBuilder.setId(line.getIdentifier()); | ||
|
||
final List<ProtoLocation> protoLocations = StreamSupport | ||
.stream(line.getRawGeometry().spliterator(), false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An alternative way (not sure if it's cleaner) would be line.asPolyLine().stream().map(...).collect(...);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll change this. For some reason I couldn't get that to work initially so went with the StreamSupport solution. I was probably just spelling something wrong.
final long numberOfRelations = 0; | ||
final AtlasSize atlasSize = new AtlasSize(numberOfEdges, numberOfNodes, numberOfAreas, | ||
numberOfLines, numberOfPoints, numberOfRelations); | ||
final AtlasMetaData atlasMetaData = new AtlasMetaData(atlasSize, true, "unknown", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if we should have any kind of tag to specify this atlas was built from Proto?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take a look at that class and see if there's something I can add.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I just mean add an entry into the Metadata tags saying source=proto and proto_version=xx (not sure if you can read that dynamically, but assuming yes).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok yeah can do. Did you have some fancy method in mind or should I just write code that greps build.gradle?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought there might be an easier way! If there's not, I wouldn't worry about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll mark it as TODO and if some simple way presents itself I'll be sure to implement it.
resource.writeAndClose(protoAtlas.toByteArray()); | ||
} | ||
|
||
private List<ProtoTag> buildProtoTagListFromTagMap(final Map<String, String> tags) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this function can also go in the Converter package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Converter back and forth between List and Map<String,String>? That sounds like it would work.
}); | ||
} | ||
|
||
private Map<String, String> parseTags(final List<ProtoTag> tagsList) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this class can go in the Converter package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good looking code and protos! I have a few questions/requests regarding the gradle/eclipse integration.
ECLIPSE_README.md
Outdated
``` | ||
|
||
4. Back in Eclipse, right click the Atlas project in Package Explorer and click "Refresh" | ||
1. NOTE: You should now see a "gen" folder appear in the package explorer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if you do right click > Gradle > Refresh and the build.gradle
defines gen as a source folder, it should be picked up by Eclipse automatically. There should not be a need to go in the "cofigure build path" menu. Have you tried that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem I had with that is for some reason it just goes ahead and deletes the generated code folder, and I can't figure out why. It may have something to do with the source set config. I am currently playing around with that on a new branch on my local machine.
build.gradle
Outdated
{ | ||
java | ||
{ | ||
srcDir file('gen/main/java') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about calling that folder src/generated/java
? It would fall nicely with the other src/main/java
, src/test/java
and src/integrationTest/java
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See note regarding ECLIPSE_README above
build.gradle
Outdated
generatedFilesBaseDir = 'gen/' | ||
|
||
protoc { | ||
artifact = 'com.google.protobuf:protoc:2.6.1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would make sense to use the version from dependencies.gradle
here for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently investigating the proper syntax for this.
config/checkstyle/suppressions.xml
Outdated
@@ -9,5 +9,6 @@ | |||
<suppress checks="MultipleStringLiterals" files="src/test/*" /> | |||
<suppress checks="MultipleStringLiterals" files="src/integrationTest/*" /> | |||
<suppress checks="InnerAssignment" files="src/test/*" /> | |||
<suppress checks="InnerAssignment" files="src/integrationTest/*" /> | |||
<suppress checks="InnerAssignment" files="src/integrationTest/*" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like indentation is not aligned here!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah that's because suppressions.xml is indented with tabs. I have Eclipse set to expand tabs to spaces, which I forgot to disable while editing that file. I'll go ahead and fix that. Perhaps it would be better to change suppressions.xml to be indented with spaces? I could update that as well if you think it's a good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will change the indentation to spaces.
dependencies.gradle
Outdated
@@ -56,5 +57,6 @@ project.ext.packages = [ | |||
core: "com.fasterxml.jackson.core:jackson-core:${versions.jackson_core}", | |||
databind: "com.fasterxml.jackson.core:jackson-databind:${versions.jackson_databind}" | |||
], | |||
protobuf_java: "com.google.protobuf:protobuf-java:2.6.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here use ${versions.protobuf_java}
} | ||
catch (final InvalidProtocolBufferException exception) | ||
{ | ||
throw new CoreException("Error deserializing the ProtoAtlasContainer", exception); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I would pass the name of the resource as well!
throw new CoreException("Error deserializing the ProtoAtlasContainer from {}", resource.getName(), exception);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome I'll add that in.
recompileProto.dependsOn(deleteGeneratedProto) | ||
recompileProto.dependsOn(generateProto) | ||
|
||
compileJava.dependsOn(generateProto) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you figure out what gradle tasks Eclipse's gradle plugin calls? Once we know that we could just add someTask.dependeOn(recompileProto)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will look into it. Some cursory googling I did the other day turned up nothing. I may have to dive deep into documentation.
|
||
if (entry.getKey() == null) | ||
{ | ||
logger.warn("buildProtoTagListFromTagMap found null key"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it is possible, but adding more context to those logs might help...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's definitely possible. I'll change that in the next couple of commits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice @lucaspcram! Easy to follow and well commented. Couple comments about potential places to reuse code.
final Map<String, String> tags = protoTagListConverter.convert(protoLine.getTagsList()); | ||
builder.addLine(identifier, geometry, tags); | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parseAreas
and parseLines
seem to be identical apart from different parameters. Would it be worth consolidating these two and passing a generic proto object?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is something Mike and I discussed in our 1on1. We decided for now to have them separate purely so that the design follows the API in a logically consistent way, in spite of the code reuse. Later on if it seems to be an issue we can pretty easily refactor it away.
protoAtlasBuilder.addLines(protoLineBuilder.build()); | ||
} | ||
protoAtlasBuilder.setNumberOfLines(numberOfLines); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above
final Latitude latitude = Latitude.dm7(protoLocation.getLatitude()); | ||
return new Location(latitude, longitude); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are perfect for the utilities.conversion package, nice!
.map(protoLocationConverter::convert).collect(Collectors.toList()); | ||
final PolyLine geometry = new PolyLine(shapePoints); | ||
final Map<String, String> tags = protoTagListConverter.convert(protoArea.getTagsList()); | ||
builder.addLine(identifier, geometry, tags); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be addArea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, just a heads up: The PolyLine class stores all points. Since areas are closed lines, the first and last point is identical. The Polygon class expects the last point to not be the first point, that is implicit. So when creating the Polygon, make sure the last point is not equal to the first point, otherwise it will get duplicated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Some classic cut and paste shenanigans right there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My unit test is actually failing due to this exact reason. The Atlas that gets written to the file has an Area with a Polygon, which repeats the start and end node. The Atlas that is read back in has a Linestring without the repeated point.
numberOfAreas++; | ||
protoAtlasBuilder.addAreas(protoAreaBuilder.build()); | ||
} | ||
protoAtlasBuilder.setNumberOfLines(numberOfAreas); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setNumberOfLines --> setNumberOfAreas
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unbelievable. This is embarrassing.
* | ||
* @author lcram | ||
*/ | ||
public class ProtoLocationConverter implements TwoWayConverter<ProtoLocation, Location> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice-To-Have: Corresponding unit test for each converter. You're doing this in your Builder Test, but if someone needs to change this, would be good to have a unit test for each. If you feel this is too much, feel free to disregard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually a good idea. Shouldn't be too hard. It'll be in a future commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: Would it be better to move this class to org.openstreetmap.atlas.geography.converters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep - see my original comment about a new package for these! I'd suggest org.openstreetmap.atlas.geography.converters.proto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
parsePoints(builder, protoAtlasContainer.getPointsList()); | ||
parseLines(builder, protoAtlasContainer.getLinesList()); | ||
parseAreas(builder, protoAtlasContainer.getAreasList()); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there no relations being added to the new packed Atlas or am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're getting there. It's still in development :)
* | ||
* @author lcram | ||
*/ | ||
public class ProtoTagListConverter implements TwoWayConverter<List<ProtoTag>, Map<String, String>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dig all the converters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I doubled the number of converters we have hahaha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See org.openstreetmap.atlas.geography.converters
and org.openstreetmap.atlas.geography.converters.jts
for some converter love :)
It builds locally I swear. |
Thanks for the feedback guys! @jwpgage These are good points. It might be a good idea to set up an email filter for my PRs, that way your inbox doesn't get spammed.
|
no longer forces user to manually update the build path
ECLIPSE_README.md
Outdated
3. Once you are done adjusting the .proto files, open a command line and run | ||
``` | ||
$ cd /path/to/local/Atlas/repo | ||
$ ./gradlew clean build -x test -x integrationTest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to update these instructions with the latest gradle task?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going to be removing this file and updating the regular README!
build.gradle
Outdated
|
||
task deleteGeneratedProto { | ||
// the Google gradle-protobuf plugin automatically registers this task | ||
// to be run as a pre-requisite to 'clean'. Since Eclipse's "Refresh Gradle Project" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential rabbit hole: have you tried this on IntelliJ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. And it's something I know needs to be done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One option is to create a github issue for it and address it after this is merged.
.map(protoLocationConverter::convert).collect(Collectors.toList()); | ||
final Polygon geometry = new Polygon(shapePoints); | ||
final Map<String, String> tags = protoTagListConverter.convert(protoArea.getTagsList()); | ||
// TODO see Mike's PR note about duplicate points, since start and end are the same for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this TODO be removed?
|
||
private void parseAreas(final PackedAtlasBuilder builder, final List<ProtoArea> areas) | ||
{ | ||
final ProtoLocationConverter protoLocationConverter = new ProtoLocationConverter(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can rely on static converters instead of initializing them for each parsing function. This should trim the code a little to avoid initializing a new converter each time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll change that!
}); | ||
} | ||
|
||
private void parseLines(final PackedAtlasBuilder builder, final List<ProtoLine> lines) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you want to combine parseLines and parseAreas? The only difference is creating a PolyLine vs. a Polygon, which can be handled with a boolean flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to take a look at some of these things today. Please don't merge yet!!
}); | ||
} | ||
|
||
private void parsePoints(final PackedAtlasBuilder builder, final List<ProtoPoint> points) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar comment on combining parseNodes and parsePoints
final RelationBean bean = parseRelationBean(protoRelation); | ||
final Map<String, String> tags = protoTagListConverter | ||
.convert(protoRelation.getTagsList()); | ||
// TODO should identifier and OSMIdentifier be the same? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They shouldn't be the same, one is the Atlas identifier, and one is the OSM identifier. Atlas identifier is padded with the country-slicing and way-sectioning digits. We should make a design decision on which one is passed in. This is somewhat tricky - since atlas identifier must be unique per type of entity (a Relation and an Edge can have the same atlas identifier, but no two Relations can have the same atlas identifier). So if this is a true representation of an Atlas, they should pass in the Atlas Identifier and we can leverage our existing factories to figure out the OSM Identifier based on the atlas identifier (remove the 6 digit padding). Let me know if that made sense!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I see. I guess my question is, what should I be passing in for that second parameter? Will I need to have some additional code right here in this function to calculate the correct OSM id? Is there a reason the other builder 'add' methods for Node, Edge, Point, Line, etc. do not have an OSM id parameter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check out ReverseIdentifierFactory - it can return the OSM identifier given an Atlas identifier. There is currently an issue for the other "add" methods to be consistent with this one. Sent you a pointer offline.
final ItemType type = ItemType.forEntity(member.getEntity()); | ||
beanBuilder.setMemberType(ProtoRelation.ProtoItemType.valueOf(type.getValue())); | ||
|
||
// TODO there may be a problem here if there are more relations in this atlas than |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doubt we will have 2 billion relations in an atlas. I would be more concerned with number of edges (due to way-sectioning and bi-directionality)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. This would be a problem as well, since the ProtoAtlasContainer, when deserialized into an object, stores each of the feature types in an ArrayList - this is built into protobuf. So in memory you have a List of Nodes, Points, Lines, Edges, etc. I would imagine you would never have 2 billion features in one of those categories in a single atlas.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's hope not, but theoretically this could happen! This is worth noting and identifying as a limitation of the current proto implementation.
* | ||
* @author lcram | ||
*/ | ||
public class PackedToProtoAtlasSubCommand implements FlexibleSubCommand |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very clean! Nicely done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done! Couple of nits, addressing TODOs, and minor code duplication removal possibilities.
Hey @MikeGost ! Thanks, I'll be taking care of those in a coming commit. There are actually still some lingering gradle issues, and at this point I'm uncertain as to the right solution. Definitely will need to work with @matthieun to get this resolved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done! Just added a bunch of nits.
*/ | ||
public class ProtoAtlasBuilder | ||
{ | ||
private final ProtoLocationConverter protoLocationConverter = new ProtoLocationConverter(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nit: Why not make all the converters private static final
variables?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha. I had this initially, but it looked more verbose with the all-caps and the fact that the style checker prepends ProtoAtlasBuilder. to the front of every variable reference. I can change it back to static though if that is preferred.
{ | ||
private final ProtoLocationConverter protoLocationConverter = new ProtoLocationConverter(); | ||
private final ProtoTagListConverter protoTagListConverter = new ProtoTagListConverter(); | ||
private final ReverseIdentifierFactory reverseIDFactory = new ReverseIdentifierFactory(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: To avoid abbreviations: reverseIdentifierFactory
final ItemType type = ItemType.forEntity(member.getEntity()); | ||
beanBuilder.setMemberType(ProtoRelation.ProtoItemType.valueOf(type.getValue())); | ||
protoRelationBuilder.addBeans(beanBuilder.build()); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: extra line
I will leave the honor to @MikeGost to merge that massive (in terms of commits) PR :) |
Merge public changes
Since I changed the build flow of the Atlas project to accommodate protobuf, I think it may be a good idea to create a protobuf (or some other name) branch on the repo. I don't want to break peoples' Eclipse workflow on the dev branch until we are further along with this update. In the interest of this objective, we should probably close this PR and I'll reopen it on the protobuf branch once that is created.EDIT: After discussion with Matthieu, we have decided to not create a protobuf branch on the repo. Instead, I will push to a protobuf branch on my fork, then submit PRs against dev for review. We can discuss, I'll make changes in my fork, then resubmit or restart the PR. When the feature is complete, we will consolidate and pull the changes into dev.
Other than that, I was hoping we could have an initial discussion about the proposed changes, and make sure I am moving in the right direction before I really start cranking out more code.