Skip to content

Merging units.proto into test_runs.proto to streamline copybara#748

Merged
kdsudac merged 5 commits intogoogle:masterfrom
kdsudac:proto
Apr 3, 2018
Merged

Merging units.proto into test_runs.proto to streamline copybara#748
kdsudac merged 5 commits intogoogle:masterfrom
kdsudac:proto

Conversation

@kdsudac
Copy link
Contributor

@kdsudac kdsudac commented Mar 30, 2018

Our copybara sync to internal openhtf removes import of units_pb2 and replaces all references with test_runs_pb2.

Making this switch to streamline and to enable reversible transformations.


This change is Reviewable

@kdsudac kdsudac requested a review from Kenadia March 30, 2018 22:22
@kdsudac
Copy link
Contributor Author

kdsudac commented Mar 30, 2018

Not sure why the travis CI build is failing. Running unit test locally and importing directly from command line locally both work fine.

from openhtf.output.callbacks import mfg_inspector

mfg_inspector.UOM_CODE_MAP

output:

{u'': 1,
 u'2J': 80,
 u'2N': 31,
 u'2Z': 38,
 u'4K': 33,
 u'4T': 36,
 u'AD': 50,
 u'AMP': 29,
 u'B84': 32,
 u'B98': 13,
 u'C81': 61,
 u'CEL': 40,
 u'COU': 37,
 u'D82': 34,
 u'DD': 60,
 u'HTZ': 12,
 u'KEL': 41,
 u'LC': 22,
 u'M0R': 24,
 u'MBPS': 51,
 u'MBR': 81,
 u'MHZ': 11,
 u'MLT': 25,
 u'MMT': 21,
 u'MTQ': 26,
 u'MTR': 23,
 u'NDL': 3,
 u'NEW': 70,
 u'P1': 2,
 u'PX': 4,
 u'PXL': 5,
 u'RPM': 7,
 u'SEC': 10,
 u'VLT': 35,
 u'WTT': 39}

@kdsudac
Copy link
Contributor Author

kdsudac commented Mar 30, 2018

Looks like the generated protobuf codes changes with whatever version of the protobuf compiler we're using in travis CI:

``
from openhtf.output.proto import units_pb2 as openhtf_dot_output_dot_proto_dot_units__pb2

@kdsudac kdsudac changed the title Accessing units_pb2 via test_runs_pb2 to streamline copybara Mergeing units.proto into test_runs.proto to streamline copybara Mar 31, 2018
@kdsudac kdsudac changed the title Mergeing units.proto into test_runs.proto to streamline copybara Merging units.proto into test_runs.proto to streamline copybara Apr 2, 2018
Copy link
Contributor

@Kenadia Kenadia left a comment

Choose a reason for hiding this comment

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

Discussed offline. The justification for the change is that the structure of the protos in output/proto/ should match the structure of the protos used by MfgInspector.

@kdsudac kdsudac merged commit d62691d into google:master Apr 3, 2018
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