Skip to content

Commit dd8798e

Browse files
authored
Merge branch 'master' into laurenz/json-stringify-measurements
2 parents a8fa970 + 598651a commit dd8798e

File tree

132 files changed

+7229
-4245
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+7229
-4245
lines changed

.github/workflows/build_and_deploy.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
name: Continuous Integration
216

317
on:
@@ -53,7 +67,5 @@ jobs:
5367
steps:
5468
- uses: actions/checkout@v3
5569
- uses: actions/setup-node@v3
56-
with:
57-
node-version: 9
5870
- run: npm install
5971
- run: npm run build

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ The open-source hardware testing framework.
55

66
[![Build Status](https://github.com/google/openhtf/actions/workflows/build_and_deploy.yml/badge.svg?branch=master)](https://github.com/google/openhtf/actions?branch=master)
77
[![Coverage Status](https://coveralls.io/repos/google/openhtf/badge.svg?branch=master&service=github)](https://coveralls.io/github/google/openhtf?branch=master)
8-
9-
[Issue Stats](http://issuestats.com/github/google/openhtf)
8+
[![Percentage of issues still open](http://isitmaintained.com/badge/open/google/openhtf.svg)](http://isitmaintained.com/project/google/openhtf "Percentage of issues still open")
9+
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/google/openhtf.svg)](http://isitmaintained.com/project/google/openhtf "Average time to resolve an issue")
1010

1111
## Overview
1212
OpenHTF is a Python library that provides a set of convenient abstractions

examples/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+

examples/example_config.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
station_id: hello_world
216
example_plug_increment_size: 3

openhtf/__init__.py

Lines changed: 101 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -19,38 +19,17 @@
1919
from openhtf import plugs
2020
from openhtf.core import phase_executor
2121
from openhtf.core import test_record
22-
from openhtf.core.base_plugs import BasePlug
23-
from openhtf.core.diagnoses_lib import DiagnosesStore
24-
from openhtf.core.diagnoses_lib import Diagnosis
25-
from openhtf.core.diagnoses_lib import DiagnosisComponent
26-
from openhtf.core.diagnoses_lib import DiagPriority
27-
from openhtf.core.diagnoses_lib import DiagResultEnum
28-
from openhtf.core.diagnoses_lib import PhaseDiagnoser
29-
from openhtf.core.diagnoses_lib import TestDiagnoser
30-
31-
from openhtf.core.measurements import Dimension
32-
from openhtf.core.measurements import Measurement
33-
from openhtf.core.monitors import monitors
34-
from openhtf.core.phase_branches import BranchSequence
35-
from openhtf.core.phase_branches import DiagnosisCheckpoint
36-
from openhtf.core.phase_branches import DiagnosisCondition
37-
from openhtf.core.phase_branches import PhaseFailureCheckpoint
38-
from openhtf.core.phase_collections import PhaseSequence
39-
from openhtf.core.phase_collections import Subtest
40-
from openhtf.core.phase_descriptor import diagnose
41-
from openhtf.core.phase_descriptor import measures
42-
from openhtf.core.phase_descriptor import PhaseDescriptor
43-
from openhtf.core.phase_descriptor import PhaseNameCase
44-
from openhtf.core.phase_descriptor import PhaseOptions
45-
from openhtf.core.phase_descriptor import PhaseResult
46-
from openhtf.core.phase_group import PhaseGroup
47-
from openhtf.core.phase_nodes import PhaseNode
48-
from openhtf.core.test_descriptor import Test
49-
from openhtf.core.test_descriptor import TestApi
50-
from openhtf.core.test_descriptor import TestDescriptor
51-
from openhtf.core.test_record import PhaseRecord
52-
from openhtf.core.test_record import TestRecord
53-
from openhtf.plugs import plug
22+
import openhtf.core.base_plugs
23+
import openhtf.core.diagnoses_lib
24+
import openhtf.core.measurements
25+
import openhtf.core.monitors
26+
import openhtf.core.phase_branches
27+
import openhtf.core.phase_collections
28+
import openhtf.core.phase_descriptor
29+
import openhtf.core.phase_group
30+
import openhtf.core.phase_nodes
31+
import openhtf.core.test_descriptor
32+
import openhtf.util
5433
from openhtf.util import configuration
5534
from openhtf.util import console_output
5635
from openhtf.util import data
@@ -59,6 +38,96 @@
5938
from openhtf.util import units
6039
import pkg_resources
6140

41+
__all__ = ( # Expliclty export certain API components.
42+
# Modules.
43+
'plugs',
44+
'phase_executor',
45+
'test_record',
46+
'configuration',
47+
'console_output',
48+
'data',
49+
'functions',
50+
'logs',
51+
'units',
52+
# Public Functions.
53+
'plug',
54+
'monitors',
55+
'diagnose',
56+
'measures',
57+
# Public Classes.
58+
'BasePlug',
59+
'DiagnosesStore',
60+
'Diagnosis',
61+
'DiagnosisComponent',
62+
'DiagPriority',
63+
'DiagResultEnum',
64+
'PhaseDiagnoser',
65+
'TestDiagnoser',
66+
'Dimension',
67+
'Measurement',
68+
'BranchSequence',
69+
'DiagnosisCheckpoint',
70+
'DiagnosisCondition',
71+
'PhaseFailureCheckpoint',
72+
'PhaseSequence',
73+
'Subtest',
74+
'PhaseDescriptor',
75+
'PhaseNameCase',
76+
'PhaseOptions',
77+
'PhaseResult',
78+
'PhaseGroup',
79+
'PhaseNode',
80+
'Test',
81+
'TestApi',
82+
'TestDescriptor',
83+
'PhaseRecord',
84+
'TestRecord',
85+
# Globals.
86+
'conf',
87+
)
88+
89+
plug = plugs.plug
90+
BasePlug = openhtf.core.base_plugs.BasePlug
91+
92+
DiagnosesStore = openhtf.core.diagnoses_lib.DiagnosesStore
93+
Diagnosis = openhtf.core.diagnoses_lib.Diagnosis
94+
DiagnosisComponent = openhtf.core.diagnoses_lib.DiagnosisComponent
95+
DiagPriority = openhtf.core.diagnoses_lib.DiagPriority
96+
DiagResultEnum = openhtf.core.diagnoses_lib.DiagResultEnum
97+
PhaseDiagnoser = openhtf.core.diagnoses_lib.PhaseDiagnoser
98+
TestDiagnoser = openhtf.core.diagnoses_lib.TestDiagnoser
99+
100+
Dimension = openhtf.core.measurements.Dimension
101+
Measurement = openhtf.core.measurements.Measurement
102+
103+
monitors = openhtf.core.monitors.monitors
104+
105+
BranchSequence = openhtf.core.phase_branches.BranchSequence
106+
DiagnosisCheckpoint = openhtf.core.phase_branches.DiagnosisCheckpoint
107+
DiagnosisCondition = openhtf.core.phase_branches.DiagnosisCondition
108+
PhaseFailureCheckpoint = openhtf.core.phase_branches.PhaseFailureCheckpoint
109+
110+
PhaseSequence = openhtf.core.phase_collections.PhaseSequence
111+
Subtest = openhtf.core.phase_collections.Subtest
112+
113+
diagnose = openhtf.core.phase_descriptor.diagnose
114+
measures = openhtf.core.phase_descriptor.measures
115+
PhaseDescriptor = openhtf.core.phase_descriptor.PhaseDescriptor
116+
PhaseNameCase = openhtf.core.phase_descriptor.PhaseNameCase
117+
PhaseOptions = openhtf.core.phase_descriptor.PhaseOptions
118+
PhaseResult = openhtf.core.phase_descriptor.PhaseResult
119+
120+
PhaseGroup = openhtf.core.phase_group.PhaseGroup
121+
122+
PhaseNode = openhtf.core.phase_nodes.PhaseNode
123+
124+
Test = openhtf.core.test_descriptor.Test
125+
TestApi = openhtf.core.test_descriptor.TestApi
126+
TestDescriptor = openhtf.core.test_descriptor.TestDescriptor
127+
128+
PhaseRecord = test_record.PhaseRecord
129+
TestRecord = test_record.TestRecord
130+
62131
conf = configuration.CONF
63132

64133

openhtf/core/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+

openhtf/output/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+

openhtf/output/callbacks/console_summary.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
"""Module to display test summary on console."""
216

317
import os

openhtf/output/callbacks/json_factory.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
"""Module for outputting test record to JSON-formatted files."""
216

317
import base64

openhtf/output/callbacks/mfg_inspector.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
"""Output and/or upload a TestRun or MfgEvent proto for mfg-inspector.com."""
216

317
import logging

0 commit comments

Comments
 (0)