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

Allow users to choose the name strategy of fields #79

Merged
merged 2 commits into from
Nov 22, 2023

Conversation

kinow
Copy link
Owner

@kinow kinow commented Nov 22, 2023

Closes #78 related to #75

In #10 we changed how names of fields were chosen, as there could be fields with the same name, but that meant/were different things. Instead, we started using the field full name (i.e. Airplace.wing, Chicken.wing instead of just wing).

In this pull request we allow users to change that behavior if they are sure that will not cause any issues, or if they prefer for aesthetics.

Thanks to @danjohles for reporting it.

-Bruno

@kinow kinow self-assigned this Nov 22, 2023
@codecov-commenter
Copy link

codecov-commenter commented Nov 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f63166e) 100.00% compared to head (77aae0c) 100.00%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #79   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           99       108    +9     
  Branches        15        16    +1     
=========================================
+ Hits            99       108    +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kinow
Copy link
Owner Author

kinow commented Nov 22, 2023

Just pending unit tests, changelog entry, docs. Tested with the sample protobuf from the docs.

protobuf_uml_diagram.py --proto test_data/issue_10.proto --output /tmp

#or 

protobuf_uml_diagram.py --proto test_data/issue_10.proto --output /tmp --full_names=true

issue_10_pb2

$ protobuf_uml_diagram.py --proto test_data/issue_10.proto --output /tmp --full_names=False

issue_10_pb2

The difference is the new parameter --full_names=true|True|False|false|<default=true>.

@kinow kinow marked this pull request as ready for review November 22, 2023 21:57
@kinow kinow force-pushed the allow-users-to-choose-name-strategy branch from 9a5ea96 to 77aae0c Compare November 22, 2023 21:59
@kinow kinow merged commit e0c9d2e into master Nov 22, 2023
8 checks passed
@kinow kinow deleted the allow-users-to-choose-name-strategy branch November 22, 2023 22:03
kinow added a commit that referenced this pull request Nov 22, 2023
@kinow kinow added this to the 0.13 milestone Nov 22, 2023
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.

Result png contains too much redundant information
2 participants