-
Notifications
You must be signed in to change notification settings - Fork 10
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
Regenerating fixtures #16
Conversation
Great work @mapsam. Are you good to keep chugging along here, or would you like help from @mapbox/core-tech in creating some with you? Also, any specific needs for review? |
Thanks @springmeyer - I've just been slowly working on them as I have time. If we're needing them immediately then I'd love some help! I've had a little trouble around working with specific data types, such as uint32's where we should have a string. Right now in the JSON format it's just integer/float ... any ideas how to specify? Should I be doing something in the manipulate function? |
@mapsam Wow, really enjoying playing around with this fantastic tool. My update:
Also, via local testing I confirmed that integer types passed to
So, I think we'll need to modify the proto on the fly like we discussed (easy), or manipulate the buffer (harder). |
Great to hear @springmeyer!
Not one bit
gorgeous
Thanks for fixing this!
Sounds like a plan. How about we merge this branch in and start with a fresh PR for this task? |
@mapsam - dropping some additional thoughts I have after poking last week:
Thoughts on how to pull this off? |
Good thinking @springmeyer - yes I have some ideas. We can move the schema compile lines into
I'd like to avoid creating entirely new protofiles for each malformed fixture, so maybe we can update the concept of proto: '2.1' Or a string representing a completely new protofile that we can write to disk when generate fixtures and remove it when done generating, like: proto: `
package vector_tile;
option optimize_for = LITE_RUNTIME;
message Tile {
enum GeomType {
UNKNOWN = 0;
POINT = 1;
LINESTRING = 2;
POLYGON = 3;
}
message Value {
optional string string_value = 1;
optional float float_value = 2;
optional double double_value = 3;
optional int64 int_value = 4;
optional uint64 uint_value = 5;
optional sint64 sint_value = 6;
optional bool bool_value = 7;
extensions 8 to max;
}
message Feature {
optional uint64 id = 1 [ default = 0 ];
repeated uint32 tags = 2 [ packed = true ];
optional GeomType type = 3 [ default = UNKNOWN ];
repeated uint32 geometry = 4 [ packed = true ];
}
message Layer {
required uint32 version = 15 [ default = 1 ];
required string name = 1;
repeated Feature features = 2;
repeated string keys = 3;
repeated Value values = 4;
optional uint32 extent = 5 [ default = 4096 ];
extensions 16 to max;
}
repeated Layer layers = 3;
extensions 16 to 8191;
}
` The protocol-buffers-schema library allows you to pass in a string to |
@mapsam - great, happy to have you run this out however you think fit. |
👍 going to merge this in and start fresh |
Working on #15
cc @mapbox/core-tech