Skip to content

Commit

Permalink
Merge branch 'master' into laurenz/json-stringify-measurements
Browse files Browse the repository at this point in the history
  • Loading branch information
glados-verma authored Oct 12, 2022
2 parents a8fa970 + 598651a commit dd8798e
Show file tree
Hide file tree
Showing 132 changed files with 7,229 additions and 4,245 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Continuous Integration

on:
Expand Down Expand Up @@ -53,7 +67,5 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 9
- run: npm install
- run: npm run build
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ The open-source hardware testing framework.

[![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)
[![Coverage Status](https://coveralls.io/repos/google/openhtf/badge.svg?branch=master&service=github)](https://coveralls.io/github/google/openhtf?branch=master)

[Issue Stats](http://issuestats.com/github/google/openhtf)
[![Percentage of issues still open](http://isitmaintained.com/badge/open/google/openhtf.svg)](http://isitmaintained.com/project/google/openhtf "Percentage of issues still open")
[![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")

## Overview
OpenHTF is a Python library that provides a set of convenient abstractions
Expand Down
14 changes: 14 additions & 0 deletions examples/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

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

station_id: hello_world
example_plug_increment_size: 3
133 changes: 101 additions & 32 deletions openhtf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,38 +19,17 @@
from openhtf import plugs
from openhtf.core import phase_executor
from openhtf.core import test_record
from openhtf.core.base_plugs import BasePlug
from openhtf.core.diagnoses_lib import DiagnosesStore
from openhtf.core.diagnoses_lib import Diagnosis
from openhtf.core.diagnoses_lib import DiagnosisComponent
from openhtf.core.diagnoses_lib import DiagPriority
from openhtf.core.diagnoses_lib import DiagResultEnum
from openhtf.core.diagnoses_lib import PhaseDiagnoser
from openhtf.core.diagnoses_lib import TestDiagnoser

from openhtf.core.measurements import Dimension
from openhtf.core.measurements import Measurement
from openhtf.core.monitors import monitors
from openhtf.core.phase_branches import BranchSequence
from openhtf.core.phase_branches import DiagnosisCheckpoint
from openhtf.core.phase_branches import DiagnosisCondition
from openhtf.core.phase_branches import PhaseFailureCheckpoint
from openhtf.core.phase_collections import PhaseSequence
from openhtf.core.phase_collections import Subtest
from openhtf.core.phase_descriptor import diagnose
from openhtf.core.phase_descriptor import measures
from openhtf.core.phase_descriptor import PhaseDescriptor
from openhtf.core.phase_descriptor import PhaseNameCase
from openhtf.core.phase_descriptor import PhaseOptions
from openhtf.core.phase_descriptor import PhaseResult
from openhtf.core.phase_group import PhaseGroup
from openhtf.core.phase_nodes import PhaseNode
from openhtf.core.test_descriptor import Test
from openhtf.core.test_descriptor import TestApi
from openhtf.core.test_descriptor import TestDescriptor
from openhtf.core.test_record import PhaseRecord
from openhtf.core.test_record import TestRecord
from openhtf.plugs import plug
import openhtf.core.base_plugs
import openhtf.core.diagnoses_lib
import openhtf.core.measurements
import openhtf.core.monitors
import openhtf.core.phase_branches
import openhtf.core.phase_collections
import openhtf.core.phase_descriptor
import openhtf.core.phase_group
import openhtf.core.phase_nodes
import openhtf.core.test_descriptor
import openhtf.util
from openhtf.util import configuration
from openhtf.util import console_output
from openhtf.util import data
Expand All @@ -59,6 +38,96 @@
from openhtf.util import units
import pkg_resources

__all__ = ( # Expliclty export certain API components.
# Modules.
'plugs',
'phase_executor',
'test_record',
'configuration',
'console_output',
'data',
'functions',
'logs',
'units',
# Public Functions.
'plug',
'monitors',
'diagnose',
'measures',
# Public Classes.
'BasePlug',
'DiagnosesStore',
'Diagnosis',
'DiagnosisComponent',
'DiagPriority',
'DiagResultEnum',
'PhaseDiagnoser',
'TestDiagnoser',
'Dimension',
'Measurement',
'BranchSequence',
'DiagnosisCheckpoint',
'DiagnosisCondition',
'PhaseFailureCheckpoint',
'PhaseSequence',
'Subtest',
'PhaseDescriptor',
'PhaseNameCase',
'PhaseOptions',
'PhaseResult',
'PhaseGroup',
'PhaseNode',
'Test',
'TestApi',
'TestDescriptor',
'PhaseRecord',
'TestRecord',
# Globals.
'conf',
)

plug = plugs.plug
BasePlug = openhtf.core.base_plugs.BasePlug

DiagnosesStore = openhtf.core.diagnoses_lib.DiagnosesStore
Diagnosis = openhtf.core.diagnoses_lib.Diagnosis
DiagnosisComponent = openhtf.core.diagnoses_lib.DiagnosisComponent
DiagPriority = openhtf.core.diagnoses_lib.DiagPriority
DiagResultEnum = openhtf.core.diagnoses_lib.DiagResultEnum
PhaseDiagnoser = openhtf.core.diagnoses_lib.PhaseDiagnoser
TestDiagnoser = openhtf.core.diagnoses_lib.TestDiagnoser

Dimension = openhtf.core.measurements.Dimension
Measurement = openhtf.core.measurements.Measurement

monitors = openhtf.core.monitors.monitors

BranchSequence = openhtf.core.phase_branches.BranchSequence
DiagnosisCheckpoint = openhtf.core.phase_branches.DiagnosisCheckpoint
DiagnosisCondition = openhtf.core.phase_branches.DiagnosisCondition
PhaseFailureCheckpoint = openhtf.core.phase_branches.PhaseFailureCheckpoint

PhaseSequence = openhtf.core.phase_collections.PhaseSequence
Subtest = openhtf.core.phase_collections.Subtest

diagnose = openhtf.core.phase_descriptor.diagnose
measures = openhtf.core.phase_descriptor.measures
PhaseDescriptor = openhtf.core.phase_descriptor.PhaseDescriptor
PhaseNameCase = openhtf.core.phase_descriptor.PhaseNameCase
PhaseOptions = openhtf.core.phase_descriptor.PhaseOptions
PhaseResult = openhtf.core.phase_descriptor.PhaseResult

PhaseGroup = openhtf.core.phase_group.PhaseGroup

PhaseNode = openhtf.core.phase_nodes.PhaseNode

Test = openhtf.core.test_descriptor.Test
TestApi = openhtf.core.test_descriptor.TestApi
TestDescriptor = openhtf.core.test_descriptor.TestDescriptor

PhaseRecord = test_record.PhaseRecord
TestRecord = test_record.TestRecord

conf = configuration.CONF


Expand Down
14 changes: 14 additions & 0 deletions openhtf/core/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

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

14 changes: 14 additions & 0 deletions openhtf/output/callbacks/console_summary.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Module to display test summary on console."""

import os
Expand Down
14 changes: 14 additions & 0 deletions openhtf/output/callbacks/json_factory.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Module for outputting test record to JSON-formatted files."""

import base64
Expand Down
14 changes: 14 additions & 0 deletions openhtf/output/callbacks/mfg_inspector.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Output and/or upload a TestRun or MfgEvent proto for mfg-inspector.com."""

import logging
Expand Down
14 changes: 14 additions & 0 deletions openhtf/output/proto/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

14 changes: 14 additions & 0 deletions openhtf/output/proto/assembly_event.proto
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package openhtf;
Expand Down
14 changes: 14 additions & 0 deletions openhtf/output/proto/mfg_event.proto
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto2";

package openhtf;
Expand Down
14 changes: 14 additions & 0 deletions openhtf/output/proto/mfg_event_converter.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Convert a TestRecord into a mfg_event proto for upload to mfg inspector.
Also includes utilities to handle multi-dim conversion into an attachment
Expand Down
14 changes: 14 additions & 0 deletions openhtf/output/proto/test_runs_converter.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Utils to convert OpenHTF TestRecord to test_runs_pb2 proto.
MULTIDIM_JSON schema:
Expand Down
Loading

0 comments on commit dd8798e

Please sign in to comment.