-
Notifications
You must be signed in to change notification settings - Fork 1
add ply_type to the material properties #20
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
Conversation
greschd
left a comment
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.
Thanks @roosre, just one question.
src/ansys/api/acp/v0/ply_type.proto
Outdated
| @@ -0,0 +1,15 @@ | |||
| syntax = "proto3"; | |||
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 we using this in different objects, or could it be defined directly in the materials.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.
The ply type is only used by the material, at least as defining property. It is used in several places in the current UI though (ESAComp export, upgrade Mechanism). Do you prefer to move it to materials.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.
As you asked me to look at the PRs, I'll comment as well:
Looks like you define a new enum here, and there is already something called "enum_types.proto", why not add it 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.
The name of the values have to be unique per namespace and I thought that UNKNOWN is used for the Status and PlyType but this is not the case.
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.
Was curious about the scopes of enums for protobuf, so I quickly googled, finding this:
Here they say in C++ it maps to C++ scoping rules, meaning you cannot have two enums with same values.
https://protobuf.narkive.com/6BXBO4QR/enum-values-are-siblings-of-their-type-not-children-of-it
This is probably why the protobuf doc here uses unique enum values with 'enum_name'_'value' :
https://developers.google.com/protocol-buffers/docs/proto3#enum
?
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.
General question:
From this PR and the one on ACP side it looks a bit look you keep the proto defs manually in sync in acp kernel and pyacp repo? I would expect that protos are defined in one place and then be consumed as some sort of pkg/zip on the other end?
src/ansys/api/acp/v0/ply_type.proto
Outdated
| @@ -0,0 +1,15 @@ | |||
| syntax = "proto3"; | |||
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.
As you asked me to look at the PRs, I'll comment as well:
Looks like you define a new enum here, and there is already something called "enum_types.proto", why not add it there?
No description provided.