You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| width |`int`| The width of the detected object. |
511
511
| height |`int`| The height of the detected object. |
512
512
| confidence |`float`| Represents the "quality" of the detection. The range depends on the detection algorithm. 0.0 is lowest quality. Higher values are higher quality. Using a standard range of [0.0 - 1.0] is advised. If the component is unable to supply a confidence value, it should return -1.0. |
513
-
| detection_properties |`mpf_component_api.Properties`|Dict-like object with keys and values of type `str` containing optional additional information about the detected object. For best practice, keys should be in all CAPS. |
513
+
| detection_properties |`dict[str, str]`|A dict with keys and values of type `str` containing optional additional information about the detected object. For best practice, keys should be in all CAPS. |
| start_frame |`int`| The first frame number (0-based index) that contained the detected object. |
714
714
| stop_frame |`int`| The last frame number (0-based index) that contained the detected object. |
715
715
| confidence |`float`| Represents the "quality" of the detection. The range depends on the detection algorithm. 0.0 is lowest quality. Higher values are higher quality. Using a standard range of [0.0 - 1.0] is advised. If the component is unable to supply a confidence value, it should return -1.0. |
716
-
| frame_locations |`mpf_component_api.FrameLocationMap`| A dict-like object of individual detections. The key for each entry is the frame number where the detection was generated, and the value is a `mpf_component_api.ImageLocation` calculated as if that frame was a still image. Note that a key-value pair is *not* required for every frame between the track start frame and track stop frame. |
717
-
| detection_properties |`mpf_component_api.Properties`|Dict-like object with keys and values of type `str` containing optional additional information about the detected object. For best practice, keys should be in all CAPS. |
716
+
| frame_locations |`dict[int, mpf_component_api.ImageLocation]`| A dict of individual detections. The key for each entry is the frame number where the detection was generated, and the value is a `mpf_component_api.ImageLocation` calculated as if that frame was a still image. Note that a key-value pair is *not* required for every frame between the track start frame and track stop frame. |
717
+
| detection_properties |`dict[str, str]`|A dict with keys and values of type `str` containing optional additional information about the detected object. For best practice, keys should be in all CAPS. |
718
718
719
719
> **NOTE:** Currently, `mpf_component_api.VideoTrack.detection_properties` do not show up in the JSON output object or
| start_time |`int`| The time (0-based index, in ms) when the audio detection event started. |
928
928
| stop_time |`int`| The time (0-based index, in ms) when the audio detection event stopped. |
929
929
| confidence |`float`| Represents the "quality" of the detection. The range depends on the detection algorithm. 0.0 is lowest quality. Higher values are higher quality. Using a standard range of [0.0 - 1.0] is advised. If the component is unable to supply a confidence value, it should return -1.0. |
930
-
| detection_properties |`mpf_component_api.Properties`|Dict-like object with keys and values of type `str` containing optional additional information about the detected object. For best practice, keys should be in all CAPS. |
930
+
| detection_properties |`dict[str, str]`|A dict with keys and values of type `str` containing optional additional information about the detected object. For best practice, keys should be in all CAPS. |
931
931
932
932
> **NOTE:** Currently, `mpf_component_api.AudioTrack.detection_properties` do not show up in the JSON output object or
| confidence |`float`| Represents the "quality" of the detection. The range depends on the detection algorithm. 0.0 is lowest quality. Higher values are higher quality. Using a standard range of [0.0 - 1.0] is advised. If the component is unable to supply a confidence value, it should return -1.0. |
1033
-
| detection_properties |`mpf_component_api.Properties`|Dict-like object with keys and values of type `str` containing optional additional information about the detected object. For best practice, keys should be in all CAPS. |
1033
+
| detection_properties |`dict[str, str]`|A dict with keys and values of type `str` containing optional additional information about the detected object. For best practice, keys should be in all CAPS. |
1034
1034
1035
1035
1036
1036
# Python Component Build Environment
1037
-
All Python components must work with CPython 2.7. Also, Python components must work with the Linux version that is
1037
+
All Python components must work with CPython 3.8.2. Also, Python components must work with the Linux version that is
1038
1038
used by the OpenMPF Component Executable. At this writing, OpenMPF runs on CentOS 7.4.1708 (kernel version 3.10.0-693).
1039
1039
Pure Python code should work on any OS, but incompatibility issues can arise when using Python libraries that include
1040
1040
compiled extension modules. Python libraries are typically distributed as wheel files. The wheel format requires that
1041
1041
the file name follows the pattern of
1042
1042
`<dist_name>-<version>-<python_tag>-<abi_tag>-<platform_tag>.whl`. `<python_tag>-<abi_tag>-<platform_tag>` are called
1043
-
[compatibility tags](https://www.python.org/dev/peps/pep-0425). For example, `mpf_component_api` is pure Python
1044
-
so the name of its wheel file is `mpf_component_api-0.1-py2-none-any.whl`. `py2` means it will work with any Python 2
1043
+
[compatibility tags](https://www.python.org/dev/peps/pep-0425). For example, `mpf_component_api` is pure Python,
1044
+
so the name of its wheel file is `mpf_component_api-0.1-py3-none-any.whl`. `py3` means it will work with any Python 3
1045
1045
implementation because it does not use any implementation-specific features. `none` means that it does not use the
1046
1046
Python ABI. `any` means it will work on any platform.
1047
1047
1048
-
Supported Python Tags:
1049
-
1050
-
*`py2`
1051
-
*`py27`
1052
-
*`cp2`
1053
-
*`cp27`
1054
-
1055
-
Supported ABI Tags:
1056
-
1057
-
*`none`
1058
-
*`cp27mu`
1059
-
1060
-
Supported Platform Tags:
1061
-
1062
-
*`any`
1063
-
*`manylinux1_x86_64`
1064
-
1048
+
The following combinations of compatibility tags are supported:
1049
+
1050
+
*`cp32-abi3-linux_x86_64`
1051
+
*`cp32-abi3-manylinux1_x86_64`
1052
+
*`cp32-abi3-manylinux2010_x86_64`
1053
+
*`cp32-abi3-manylinux2014_x86_64`
1054
+
*`cp33-abi3-linux_x86_64`
1055
+
*`cp33-abi3-manylinux1_x86_64`
1056
+
*`cp33-abi3-manylinux2010_x86_64`
1057
+
*`cp33-abi3-manylinux2014_x86_64`
1058
+
*`cp34-abi3-linux_x86_64`
1059
+
*`cp34-abi3-manylinux1_x86_64`
1060
+
*`cp34-abi3-manylinux2010_x86_64`
1061
+
*`cp34-abi3-manylinux2014_x86_64`
1062
+
*`cp35-abi3-linux_x86_64`
1063
+
*`cp35-abi3-manylinux1_x86_64`
1064
+
*`cp35-abi3-manylinux2010_x86_64`
1065
+
*`cp35-abi3-manylinux2014_x86_64`
1066
+
*`cp36-abi3-linux_x86_64`
1067
+
*`cp36-abi3-manylinux1_x86_64`
1068
+
*`cp36-abi3-manylinux2010_x86_64`
1069
+
*`cp36-abi3-manylinux2014_x86_64`
1070
+
*`cp37-abi3-linux_x86_64`
1071
+
*`cp37-abi3-manylinux1_x86_64`
1072
+
*`cp37-abi3-manylinux2010_x86_64`
1073
+
*`cp37-abi3-manylinux2014_x86_64`
1074
+
*`cp38-abi3-linux_x86_64`
1075
+
*`cp38-abi3-manylinux1_x86_64`
1076
+
*`cp38-abi3-manylinux2010_x86_64`
1077
+
*`cp38-abi3-manylinux2014_x86_64`
1078
+
*`cp38-cp38-linux_x86_64`
1079
+
*`cp38-cp38-manylinux1_x86_64`
1080
+
*`cp38-cp38-manylinux2010_x86_64`
1081
+
*`cp38-cp38-manylinux2014_x86_64`
1082
+
*`cp38-none-any`
1083
+
*`cp38-none-linux_x86_64`
1084
+
*`cp38-none-manylinux1_x86_64`
1085
+
*`cp38-none-manylinux2010_x86_64`
1086
+
*`cp38-none-manylinux2014_x86_64`
1087
+
*`py30-none-any`
1088
+
*`py30-none-linux_x86_64`
1089
+
*`py30-none-manylinux1_x86_64`
1090
+
*`py30-none-manylinux2010_x86_64`
1091
+
*`py30-none-manylinux2014_x86_64`
1092
+
*`py31-none-any`
1093
+
*`py31-none-linux_x86_64`
1094
+
*`py31-none-manylinux1_x86_64`
1095
+
*`py31-none-manylinux2010_x86_64`
1096
+
*`py31-none-manylinux2014_x86_64`
1097
+
*`py32-none-any`
1098
+
*`py32-none-linux_x86_64`
1099
+
*`py32-none-manylinux1_x86_64`
1100
+
*`py32-none-manylinux2010_x86_64`
1101
+
*`py32-none-manylinux2014_x86_64`
1102
+
*`py33-none-any`
1103
+
*`py33-none-linux_x86_64`
1104
+
*`py33-none-manylinux1_x86_64`
1105
+
*`py33-none-manylinux2010_x86_64`
1106
+
*`py33-none-manylinux2014_x86_64`
1107
+
*`py34-none-any`
1108
+
*`py34-none-linux_x86_64`
1109
+
*`py34-none-manylinux1_x86_64`
1110
+
*`py34-none-manylinux2010_x86_64`
1111
+
*`py34-none-manylinux2014_x86_64`
1112
+
*`py35-none-any`
1113
+
*`py35-none-linux_x86_64`
1114
+
*`py35-none-manylinux1_x86_64`
1115
+
*`py35-none-manylinux2010_x86_64`
1116
+
*`py35-none-manylinux2014_x86_64`
1117
+
*`py36-none-any`
1118
+
*`py36-none-linux_x86_64`
1119
+
*`py36-none-manylinux1_x86_64`
1120
+
*`py36-none-manylinux2010_x86_64`
1121
+
*`py36-none-manylinux2014_x86_64`
1122
+
*`py37-none-any`
1123
+
*`py37-none-linux_x86_64`
1124
+
*`py37-none-manylinux1_x86_64`
1125
+
*`py37-none-manylinux2010_x86_64`
1126
+
*`py37-none-manylinux2014_x86_64`
1127
+
*`py38-none-any`
1128
+
*`py38-none-linux_x86_64`
1129
+
*`py38-none-manylinux1_x86_64`
1130
+
*`py38-none-manylinux2010_x86_64`
1131
+
*`py38-none-manylinux2014_x86_64`
1132
+
*`py3-none-any`
1133
+
*`py3-none-linux_x86_64`
1134
+
*`py3-none-manylinux1_x86_64`
1135
+
*`py3-none-manylinux2010_x86_64`
1136
+
*`py3-none-manylinux2014_x86_64`
1065
1137
1066
1138
Components should be supplied as a tar file, which includes not only the component library, but any other libraries or
1067
1139
files needed for execution. This includes all other non-standard libraries used by the component
@@ -1082,11 +1154,9 @@ OpenMPF components should be stateless in operation and give identical output fo
1082
1154
1083
1155
## Logging
1084
1156
It recommended that components use the logger returned from:
1085
-
<br> `mpf_component_util.configure_logging(log_file_name, is_debug=False)`. When `is_debug` is false, the log messages
1086
-
will be written to
1087
-
<br> `${MPF_LOG_PATH}/${THIS_MPF_NODE}/log/<log_file_name>.log` When `is_debug` is true, the log messages
1088
-
will be written to standard out. Note that multiple instances of the same component can log to the same file.
1089
-
Also, logging content can span multiple lines. The following log levels are supported:
The logger will write log messages to standard out. When `debug` is false, the log messages will also be written to `${MPF_LOG_PATH}/${THIS_MPF_NODE}/log/<log_file_name>.log` Note that multiple instances of the same component
1159
+
can log to the same file. Also, logging content can span multiple lines. The following log levels are supported:
0 commit comments