From cf5600c2c402ddc41439aa9d7db11a1ac696b055 Mon Sep 17 00:00:00 2001 From: Harshit Pawar Date: Thu, 14 Dec 2023 16:36:20 +0530 Subject: [PATCH 1/3] fixed typos and closed open brackets (#807) Update mfg_event.proto fixed typos and closed open brackets (#807) fixed typos and closed open brackets (#807) --- docs/event_sequence.md | 2 +- examples/phase_groups.py | 2 +- openhtf/core/diagnoses_lib.py | 2 +- openhtf/core/phase_branches.py | 2 +- openhtf/core/test_record.py | 4 ++-- openhtf/core/test_state.py | 2 +- openhtf/output/callbacks/json_factory.py | 2 +- openhtf/output/callbacks/mfg_inspector.py | 4 ++-- openhtf/output/proto/assembly_event.proto | 2 +- openhtf/output/proto/mfg_event.proto | 2 +- openhtf/output/proto/test_runs.proto | 4 ++-- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/event_sequence.md b/docs/event_sequence.md index 3d95b07cf..14dd4b03b 100644 --- a/docs/event_sequence.md +++ b/docs/event_sequence.md @@ -75,7 +75,7 @@ callbacks. `PhaseGroup` collections behave like contexts. They are entered if their `setup` phases are all non-terminal; if this happens, the `teardown` phases are -guarenteed to run. `PhaseGroup` collections can contain additional `PhaseGroup` +guaranteed to run. `PhaseGroup` collections can contain additional `PhaseGroup` instances. If a nested group has a terminal phase, the outer groups will trigger the same shortcut logic. diff --git a/examples/phase_groups.py b/examples/phase_groups.py index 0a9c95d6e..326248bdc 100644 --- a/examples/phase_groups.py +++ b/examples/phase_groups.py @@ -14,7 +14,7 @@ """Example OpenHTF Phase Groups. PhaseGroups are used to control phase shortcutting due to terminal errors to -better guarentee when teardown phases run. +better guarantee when teardown phases run. """ import openhtf as htf diff --git a/openhtf/core/diagnoses_lib.py b/openhtf/core/diagnoses_lib.py index e8eeed51a..ae1424006 100644 --- a/openhtf/core/diagnoses_lib.py +++ b/openhtf/core/diagnoses_lib.py @@ -107,7 +107,7 @@ def example_phase(test, reader): def block_test_diag(test_record, diagnoses_store): if (diagnoses_store.has_diagnosis_result( BlockStatusResult.BLOCK0_OUT_OF_SPEC) and - diagnoses_store.has_diganosis_result( + diagnoses_store.has_diagnosis_result( BlockStatusResult.BLOCK1_OUT_OF_SPEC)): return openhtf.Diagnosis( BlockStatusResult.UNIT_OUT_OF_SPEC, diff --git a/openhtf/core/phase_branches.py b/openhtf/core/phase_branches.py index d498bc427..2baac6eb2 100644 --- a/openhtf/core/phase_branches.py +++ b/openhtf/core/phase_branches.py @@ -77,7 +77,7 @@ def _not_all(iterable: Iterator[bool]) -> bool: @attr.s(slots=True, frozen=True) class DiagnosisCondition(object): - """Encapsulated object for evaulating DiagResultEnum conditions.""" + """Encapsulated object for evaluating DiagResultEnum conditions.""" # Indicates the diagnosis is tested. condition = attr.ib(type=ConditionOn) diff --git a/openhtf/core/test_record.py b/openhtf/core/test_record.py index bddce0357..690ecc4fc 100644 --- a/openhtf/core/test_record.py +++ b/openhtf/core/test_record.py @@ -40,7 +40,7 @@ CONF.declare( 'attachments_directory', default_value=None, - description='Directory where temprorary files can be safely stored.') + description='Directory where temporary files can be safely stored.') _LOG = logging.getLogger(__name__) @@ -339,7 +339,7 @@ class PhaseRecord(object): dictionaries, each of which map measurement name to the respective object. In the case of the measurements field, those objects are measurements.Measurement instances. The 'value' attribute of each of those instances is an instance of - measurments.MeasuredValue, which contains either a single value, or a list of + measurements.MeasuredValue, which contains either a single value, or a list of values in the case of a dimensioned measurement. See measurements.Record.GetValues() for more information. diff --git a/openhtf/core/test_state.py b/openhtf/core/test_state.py index 3c408a77a..fc1d3f43e 100644 --- a/openhtf/core/test_state.py +++ b/openhtf/core/test_state.py @@ -866,7 +866,7 @@ def _execute_phase_diagnoser( if self.phase_record.result.is_terminal: self.logger.exception( 'Phase Diagnoser %s raised an exception, but phase result is ' - 'already terminal; logging additonal exception here.', + 'already terminal; logging additional exception here.', diagnoser.name) else: self.phase_record.result = phase_executor.PhaseExecutionOutcome( diff --git a/openhtf/output/callbacks/json_factory.py b/openhtf/output/callbacks/json_factory.py index 5363b9e07..cd9247c44 100644 --- a/openhtf/output/callbacks/json_factory.py +++ b/openhtf/output/callbacks/json_factory.py @@ -74,7 +74,7 @@ def stream_json( json_encoder = TestRecordEncoder(allow_nan=allow_nan, **kwargs) # The iterencode return type in typeshed for PY2 is wrong; not worried about - # fixing it as we are droping PY2 support soon. + # fixing it as we are dropping PY2 support soon. return json_encoder.iterencode(encoded_test_rec) # pytype: disable=bad-return-type diff --git a/openhtf/output/callbacks/mfg_inspector.py b/openhtf/output/callbacks/mfg_inspector.py index eaee27b4e..bd1de0050 100644 --- a/openhtf/output/callbacks/mfg_inspector.py +++ b/openhtf/output/callbacks/mfg_inspector.py @@ -93,7 +93,7 @@ class MfgInspector(object): my_custom_converter) my_tester.add_output_callbacks(interface.save_to_disk(), interface.upload()) - **Important** the conversion of the TestRecord to protofbuf as specified in + **Important** the conversion of the TestRecord to protobuf as specified in the _converter callable attribute only occurs once and the resulting protobuf is cached in memory on the instance. @@ -101,7 +101,7 @@ class MfgInspector(object): username and authentication key (which should be the key data itself, not a filename or file). - In typical productin setups, we *first* save the protobuf to disk then attempt + In typical production setups, we *first* save the protobuf to disk then attempt to upload the protobuf to mfg-inspector. In the event of a network outage, the result of the test run is available on disk and a separate process can retry the upload when network is available. diff --git a/openhtf/output/proto/assembly_event.proto b/openhtf/output/proto/assembly_event.proto index 9f257dbc1..b4a89202d 100644 --- a/openhtf/output/proto/assembly_event.proto +++ b/openhtf/output/proto/assembly_event.proto @@ -36,7 +36,7 @@ message AssemblyEvent { // An individual Component, potentially a member of an assembly. message Component { string part_number = 1; // GPN - // Unique idenfier of a component, either serial or lot/index. + // Unique identifier of a component, either serial or lot/index. oneof id { string serial = 2; // GSN. Most components will have this. ByLot lot = 3; // For tracking resistors, lenses, etc. diff --git a/openhtf/output/proto/mfg_event.proto b/openhtf/output/proto/mfg_event.proto index 708852d3b..ff6cc0ff9 100644 --- a/openhtf/output/proto/mfg_event.proto +++ b/openhtf/output/proto/mfg_event.proto @@ -27,7 +27,7 @@ message MfgEvent { // The serial number or lot info of the device under test. // For non-serialized items, we can track them via lot_number and an // optional lot_index within the lot (such as "This tray of items is lot - // #FOT123 and this is the part in slot 6 of the tray. + // #FOT123 and this is the part in slot 6 of the tray.)s message ByLot { required string lot_number = 1; optional string lot_index = 2; diff --git a/openhtf/output/proto/test_runs.proto b/openhtf/output/proto/test_runs.proto index 6f7828252..99f940750 100644 --- a/openhtf/output/proto/test_runs.proto +++ b/openhtf/output/proto/test_runs.proto @@ -110,7 +110,7 @@ message Phase { optional TimeInfo timing = 4; } -// A parameter which is tested during a test run. These are parameteric values +// A parameter which is tested during a test run. These are parametric values // which are used to pass or fail the test. message TestParameter { // reserved 9; @@ -223,7 +223,7 @@ message TestRun { // Not supported by OpenHTF. // For non-serialized items, we can track them via lot_number and a part_id // within the lot (such as "This try of items is lot #FOT123 and this is the - // part in slot 6 of the tray. In this case, a unique dut should be + // part in slot 6 of the tray). In this case, a unique dut should be // synthesized and stored in the required field dut_serial, and the // synthetic_dut flag should be set. optional string lot_number = 23; From b4a82914d8361d2ef1008b064b563fc214a38e60 Mon Sep 17 00:00:00 2001 From: Harshit Pawar Date: Fri, 15 Dec 2023 13:53:52 +0530 Subject: [PATCH 2/3] adressing to the comment --- openhtf/output/callbacks/mfg_inspector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openhtf/output/callbacks/mfg_inspector.py b/openhtf/output/callbacks/mfg_inspector.py index bd1de0050..a6ad0652f 100644 --- a/openhtf/output/callbacks/mfg_inspector.py +++ b/openhtf/output/callbacks/mfg_inspector.py @@ -101,7 +101,7 @@ class MfgInspector(object): username and authentication key (which should be the key data itself, not a filename or file). - In typical production setups, we *first* save the protobuf to disk then attempt + In typical productn setups, we *first* save the protobuf to disk then attempt to upload the protobuf to mfg-inspector. In the event of a network outage, the result of the test run is available on disk and a separate process can retry the upload when network is available. From 7993642deaedad37065a1bff2e1250b2487f430e Mon Sep 17 00:00:00 2001 From: Harshit Pawar <88630334+iHarshit15@users.noreply.github.com> Date: Fri, 15 Dec 2023 23:17:04 +0530 Subject: [PATCH 3/3] Update mfg_inspector.py addressed the comment "80 character/line" --- openhtf/output/callbacks/mfg_inspector.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openhtf/output/callbacks/mfg_inspector.py b/openhtf/output/callbacks/mfg_inspector.py index a6ad0652f..349c97a28 100644 --- a/openhtf/output/callbacks/mfg_inspector.py +++ b/openhtf/output/callbacks/mfg_inspector.py @@ -101,10 +101,10 @@ class MfgInspector(object): username and authentication key (which should be the key data itself, not a filename or file). - In typical productn setups, we *first* save the protobuf to disk then attempt - to upload the protobuf to mfg-inspector. In the event of a network outage, - the result of the test run is available on disk and a separate process can - retry the upload when network is available. + In typical production setups, we *first* save the protobuf to disk then + attempt to upload the protobuf to mfg-inspector. In the event of a network, + outage the result of the test run is available on disk and a separate process + can retry the upload when the network is available. """ TOKEN_URI = 'https://accounts.google.com/o/oauth2/token'