hardpy 0.16.0__py3-none-any.whl → 0.17.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hardpy/__init__.py +2 -1
- hardpy/cli/template.py +5 -4
- hardpy/common/config.py +13 -0
- hardpy/hardpy_panel/api.py +31 -11
- hardpy/hardpy_panel/frontend/dist/assets/{allPaths-Cy69sdSD.js → allPaths-LQifhvrX.js} +1 -1
- hardpy/hardpy_panel/frontend/dist/assets/{allPathsLoader-D993NqQ9.js → allPathsLoader-C-JecT3u.js} +2 -2
- hardpy/hardpy_panel/frontend/dist/assets/{browser-ponyfill-DD76sq2d.js → browser-ponyfill-B-CPdmQc.js} +1 -1
- hardpy/hardpy_panel/frontend/dist/assets/{index-C93zcGIi.js → index-B2oxSaK6.js} +266 -265
- hardpy/hardpy_panel/frontend/dist/assets/{splitPathsBySizeLoader-D4hRORV6.js → splitPathsBySizeLoader-CBTnepth.js} +1 -1
- hardpy/hardpy_panel/frontend/dist/index.html +1 -1
- hardpy/hardpy_panel/frontend/dist/locales/de/translation.json +13 -7
- hardpy/hardpy_panel/frontend/dist/locales/en/translation.json +13 -7
- hardpy/hardpy_panel/frontend/dist/locales/es/translation.json +13 -7
- hardpy/hardpy_panel/frontend/dist/locales/fr/translation.json +13 -7
- hardpy/hardpy_panel/frontend/dist/locales/ja/translation.json +7 -1
- hardpy/hardpy_panel/frontend/dist/locales/ru/translation.json +13 -7
- hardpy/hardpy_panel/frontend/dist/locales/zh/translation.json +7 -1
- hardpy/pytest_hardpy/db/base_store.py +6 -0
- hardpy/pytest_hardpy/plugin.py +8 -3
- hardpy/pytest_hardpy/pytest_call.py +62 -6
- hardpy/pytest_hardpy/utils/dialog_box.py +3 -0
- {hardpy-0.16.0.dist-info → hardpy-0.17.1.dist-info}/METADATA +16 -1
- {hardpy-0.16.0.dist-info → hardpy-0.17.1.dist-info}/RECORD +26 -26
- {hardpy-0.16.0.dist-info → hardpy-0.17.1.dist-info}/WHEEL +0 -0
- {hardpy-0.16.0.dist-info → hardpy-0.17.1.dist-info}/entry_points.txt +0 -0
- {hardpy-0.16.0.dist-info → hardpy-0.17.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as o,a as _,b as i,p as c,I as u}from"./index-
|
|
1
|
+
import{_ as o,a as _,b as i,p as c,I as u}from"./index-B2oxSaK6.js";var p=function(n,s){return o(void 0,void 0,void 0,function(){var a,r;return _(this,function(e){switch(e.label){case 0:return a=c(n),s!==u.STANDARD?[3,2]:[4,i(()=>import("./index-DLOviMB1.js").then(t=>t.I),[])];case 1:return r=e.sent(),[3,4];case 2:return[4,i(()=>import("./index-B-fsa5Ru.js").then(t=>t.I),[])];case 3:r=e.sent(),e.label=4;case 4:return[2,r[a]]}})})};export{p as splitPathsBySizeLoader};
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
Learn how to configure a non-root public URL by running `npm run build`.
|
|
26
26
|
-->
|
|
27
27
|
<title>HardPy Operator Panel</title>
|
|
28
|
-
<script type="module" crossorigin src="/assets/index-
|
|
28
|
+
<script type="module" crossorigin src="/assets/index-B2oxSaK6.js"></script>
|
|
29
29
|
<link rel="stylesheet" crossorigin href="/assets/index-B7T9xvaW.css">
|
|
30
30
|
</head>
|
|
31
31
|
<body>
|
|
@@ -11,19 +11,25 @@
|
|
|
11
11
|
"connection": "Verbindung wird hergestellt... 🧐🔎",
|
|
12
12
|
"dbError": "Datenbankverbindungsfehler. 🙅🏽♀️🚫",
|
|
13
13
|
"noEntries": "Keine Einträge in der Datenbank 🙅🏽♀️🚫",
|
|
14
|
+
"stoppedTestCase": "Angehaltener Testfall",
|
|
15
|
+
"failedTestCases": "Fehlgeschlagene Testfälle",
|
|
16
|
+
"modalResultDismissHint": "Klicken Sie irgendwo oder drücken Sie eine Taste, um zu schließen",
|
|
17
|
+
"modalResultAutoDismissHint": "Automatisches Schließen in {{seconds}} Sekunden...",
|
|
14
18
|
"status": {
|
|
15
|
-
"ready": "
|
|
16
|
-
"run": "
|
|
17
|
-
"passed": "
|
|
18
|
-
"failed": "
|
|
19
|
-
"stopped": "
|
|
20
|
-
"unknown": "
|
|
19
|
+
"ready": "Bereit",
|
|
20
|
+
"run": "Läuft",
|
|
21
|
+
"passed": "Bestanden",
|
|
22
|
+
"failed": "Fehlgeschlagen",
|
|
23
|
+
"stopped": "Gestoppt",
|
|
24
|
+
"unknown": "Unbekannt"
|
|
21
25
|
}
|
|
22
26
|
},
|
|
23
27
|
"button": {
|
|
24
28
|
"start": "Starten",
|
|
25
29
|
"stop": "Stoppen",
|
|
26
|
-
"confirm": "Bestätigen"
|
|
30
|
+
"confirm": "Bestätigen",
|
|
31
|
+
"pass": "Bestanden",
|
|
32
|
+
"fail": "Fehlgeschlagen"
|
|
27
33
|
},
|
|
28
34
|
"error": {
|
|
29
35
|
"dbConnectionTitle": "Datenbankverbindungsfehler",
|
|
@@ -11,19 +11,25 @@
|
|
|
11
11
|
"connection": "Establishing a connection... 🧐🔎",
|
|
12
12
|
"dbError": "Database connection error. 🙅🏽♀️🚫",
|
|
13
13
|
"noEntries": "No entries in the database 🙅🏽♀️🚫",
|
|
14
|
+
"stoppedTestCase": "Stopped Test Case",
|
|
15
|
+
"failedTestCases": "Failed Test Cases",
|
|
16
|
+
"modalResultDismissHint": "Click anywhere or press any key to dismiss",
|
|
17
|
+
"modalResultAutoDismissHint": "Auto-dismissing in {{seconds}} seconds...",
|
|
14
18
|
"status": {
|
|
15
|
-
"ready": "
|
|
16
|
-
"run": "
|
|
17
|
-
"passed": "
|
|
18
|
-
"failed": "
|
|
19
|
-
"stopped": "
|
|
20
|
-
"unknown": "
|
|
19
|
+
"ready": "Ready",
|
|
20
|
+
"run": "Run",
|
|
21
|
+
"passed": "Pass",
|
|
22
|
+
"failed": "Fail",
|
|
23
|
+
"stopped": "Stopped",
|
|
24
|
+
"unknown": "Unknown"
|
|
21
25
|
}
|
|
22
26
|
},
|
|
23
27
|
"button": {
|
|
24
28
|
"start": "Start",
|
|
25
29
|
"stop": "Stop",
|
|
26
|
-
"confirm": "Confirm"
|
|
30
|
+
"confirm": "Confirm",
|
|
31
|
+
"pass": "Pass",
|
|
32
|
+
"fail": "Fail"
|
|
27
33
|
},
|
|
28
34
|
"error": {
|
|
29
35
|
"dbConnectionTitle": "Database Connection Error",
|
|
@@ -11,19 +11,25 @@
|
|
|
11
11
|
"connection": "Estableciendo conexión... 🧐🔎",
|
|
12
12
|
"dbError": "Error de conexión a la base de datos. 🙅🏽♀️🚫",
|
|
13
13
|
"noEntries": "No hay entradas en la base de datos 🙅🏽♀️🚫",
|
|
14
|
+
"stoppedTestCase": "Caso de prueba detenido",
|
|
15
|
+
"failedTestCases": "Casos de prueba fallidos",
|
|
16
|
+
"modalResultDismissHint": "Haga clic en cualquier lugar o presione cualquier tecla para cerrar",
|
|
17
|
+
"modalResultAutoDismissHint": "Cierre automático en {{seconds}} segundos...",
|
|
14
18
|
"status": {
|
|
15
|
-
"ready": "
|
|
16
|
-
"run": "
|
|
17
|
-
"passed": "
|
|
18
|
-
"failed": "
|
|
19
|
-
"stopped": "
|
|
20
|
-
"unknown": "
|
|
19
|
+
"ready": "Listo",
|
|
20
|
+
"run": "Ejecutando",
|
|
21
|
+
"passed": "Aprobado",
|
|
22
|
+
"failed": "Fallado",
|
|
23
|
+
"stopped": "Detenido",
|
|
24
|
+
"unknown": "Desconocido"
|
|
21
25
|
}
|
|
22
26
|
},
|
|
23
27
|
"button": {
|
|
24
28
|
"start": "Iniciar",
|
|
25
29
|
"stop": "Detener",
|
|
26
|
-
"confirm": "Confirmar"
|
|
30
|
+
"confirm": "Confirmar",
|
|
31
|
+
"pass": "Aprobado",
|
|
32
|
+
"fail": "Fallado"
|
|
27
33
|
},
|
|
28
34
|
"error": {
|
|
29
35
|
"dbConnectionTitle": "Error de conexión a la base de datos",
|
|
@@ -11,19 +11,25 @@
|
|
|
11
11
|
"connection": "Établissement de la connexion... 🧐🔎",
|
|
12
12
|
"dbError": "Erreur de connexion à la base de données. 🙅🏽♀️🚫",
|
|
13
13
|
"noEntries": "Aucune entrée dans la base de données 🙅🏽♀️🚫",
|
|
14
|
+
"stoppedTestCase": "Cas de test arrêté",
|
|
15
|
+
"failedTestCases": "Cas de test échoués",
|
|
16
|
+
"modalResultDismissHint": "Cliquez n'importe où ou appuyez sur n'importe quelle touche pour fermer",
|
|
17
|
+
"modalResultAutoDismissHint": "Fermeture automatique dans {{seconds}} secondes...",
|
|
14
18
|
"status": {
|
|
15
|
-
"ready": "
|
|
16
|
-
"run": "
|
|
17
|
-
"passed": "
|
|
18
|
-
"failed": "
|
|
19
|
-
"stopped": "
|
|
20
|
-
"unknown": "
|
|
19
|
+
"ready": "Prêt",
|
|
20
|
+
"run": "En cours",
|
|
21
|
+
"passed": "Réussi",
|
|
22
|
+
"failed": "Échoué",
|
|
23
|
+
"stopped": "Arrêté",
|
|
24
|
+
"unknown": "Inconnu"
|
|
21
25
|
}
|
|
22
26
|
},
|
|
23
27
|
"button": {
|
|
24
28
|
"start": "Commencer",
|
|
25
29
|
"stop": "Arrêter",
|
|
26
|
-
"confirm": "Confirmer"
|
|
30
|
+
"confirm": "Confirmer",
|
|
31
|
+
"pass": "Réussi",
|
|
32
|
+
"fail": "Échoué"
|
|
27
33
|
},
|
|
28
34
|
"error": {
|
|
29
35
|
"dbConnectionTitle": "Erreur de connexion à la base de données",
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
"connection": "接続を確立しています... 🧐🔎",
|
|
12
12
|
"dbError": "データベース接続エラー. 🙅🏽♀️🚫",
|
|
13
13
|
"noEntries": "データベースにエントリがありません 🙅🏽♀️🚫",
|
|
14
|
+
"stoppedTestCase": "停止されたテストケース",
|
|
15
|
+
"failedTestCases": "失敗したテストケース",
|
|
16
|
+
"modalResultDismissHint": "どこかをクリックするか、任意のキーを押して閉じます",
|
|
17
|
+
"modalResultAutoDismissHint": "{{seconds}}秒後に自動的に閉じます...",
|
|
14
18
|
"status": {
|
|
15
19
|
"ready": "準備完了",
|
|
16
20
|
"run": "実行中",
|
|
@@ -23,7 +27,9 @@
|
|
|
23
27
|
"button": {
|
|
24
28
|
"start": "開始",
|
|
25
29
|
"stop": "停止",
|
|
26
|
-
"confirm": "確認"
|
|
30
|
+
"confirm": "確認",
|
|
31
|
+
"pass": "合格",
|
|
32
|
+
"fail": "不合格"
|
|
27
33
|
},
|
|
28
34
|
"error": {
|
|
29
35
|
"dbConnectionTitle": "データベース接続エラー",
|
|
@@ -11,19 +11,25 @@
|
|
|
11
11
|
"connection": "Установка соединения... 🧐🔎",
|
|
12
12
|
"dbError": "Ошибка подключения к базе данных. 🙅🏽♀️🚫",
|
|
13
13
|
"noEntries": "Нет записей в базе данных 🙅🏽♀️🚫",
|
|
14
|
+
"stoppedTestCase": "Остановленный тестовый случай",
|
|
15
|
+
"failedTestCases": "Проваленные тестовые случаи",
|
|
16
|
+
"modalResultDismissHint": "Нажмите на любое место на экране или нажмите любую клавишу для закрытия",
|
|
17
|
+
"modalResultAutoDismissHint": "Автоматическое закрытие через {{seconds}} секунд...",
|
|
14
18
|
"status": {
|
|
15
|
-
"ready": "
|
|
16
|
-
"run": "
|
|
17
|
-
"passed": "
|
|
18
|
-
"failed": "
|
|
19
|
-
"stopped": "
|
|
20
|
-
"unknown": "
|
|
19
|
+
"ready": "Готов",
|
|
20
|
+
"run": "Выполнение",
|
|
21
|
+
"passed": "Успех",
|
|
22
|
+
"failed": "Провалено",
|
|
23
|
+
"stopped": "Остановлено",
|
|
24
|
+
"unknown": "Неизвестно"
|
|
21
25
|
}
|
|
22
26
|
},
|
|
23
27
|
"button": {
|
|
24
28
|
"start": "Старт",
|
|
25
29
|
"stop": "Стоп",
|
|
26
|
-
"confirm": "Подтвердить"
|
|
30
|
+
"confirm": "Подтвердить",
|
|
31
|
+
"pass": "Успех",
|
|
32
|
+
"fail": "Провалено"
|
|
27
33
|
},
|
|
28
34
|
"error": {
|
|
29
35
|
"dbConnectionTitle": "Ошибка подключения к базе данных",
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
"connection": "正在建立连接... 🧐🔎",
|
|
12
12
|
"dbError": "数据库连接错误. 🙅🏽♀️🚫",
|
|
13
13
|
"noEntries": "数据库中没有条目 🙅🏽♀️🚫",
|
|
14
|
+
"stoppedTestCase": "已停止的测试用例",
|
|
15
|
+
"failedTestCases": "失败的测试用例",
|
|
16
|
+
"modalResultDismissHint": "点击任意位置或按任意键关闭",
|
|
17
|
+
"modalResultAutoDismissHint": "{{seconds}}秒后自动关闭...",
|
|
14
18
|
"status": {
|
|
15
19
|
"ready": "就绪",
|
|
16
20
|
"run": "运行中",
|
|
@@ -23,7 +27,9 @@
|
|
|
23
27
|
"button": {
|
|
24
28
|
"start": "开始",
|
|
25
29
|
"stop": "停止",
|
|
26
|
-
"confirm": "确认"
|
|
30
|
+
"confirm": "确认",
|
|
31
|
+
"pass": "通过",
|
|
32
|
+
"fail": "失败"
|
|
27
33
|
},
|
|
28
34
|
"error": {
|
|
29
35
|
"dbConnectionTitle": "数据库连接错误",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Copyright (c) 2024 Everypin
|
|
2
2
|
# GNU General Public License v3.0 (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
3
3
|
|
|
4
|
+
from json import dumps
|
|
4
5
|
from logging import getLogger
|
|
5
6
|
from typing import Any
|
|
6
7
|
|
|
@@ -55,6 +56,11 @@ class BaseStore:
|
|
|
55
56
|
key (str): document key
|
|
56
57
|
value: document value
|
|
57
58
|
"""
|
|
59
|
+
try:
|
|
60
|
+
dumps(value)
|
|
61
|
+
except Exception: # noqa: BLE001
|
|
62
|
+
# serialize non-serializable objects as string
|
|
63
|
+
value = dumps(value, default=str)
|
|
58
64
|
if "." in key:
|
|
59
65
|
assign(self._doc, key, value)
|
|
60
66
|
else:
|
hardpy/pytest_hardpy/plugin.py
CHANGED
|
@@ -181,7 +181,7 @@ class HardpyPlugin:
|
|
|
181
181
|
# must be init after config data is set
|
|
182
182
|
try:
|
|
183
183
|
self._reporter = HookReporter(bool(is_clear_database))
|
|
184
|
-
except
|
|
184
|
+
except Exception as exc: # noqa: BLE001
|
|
185
185
|
exit(str(exc), ExitCode.INTERNAL_ERROR)
|
|
186
186
|
|
|
187
187
|
def pytest_sessionfinish(self, session: Session, exitstatus: int) -> None:
|
|
@@ -251,6 +251,7 @@ class HardpyPlugin:
|
|
|
251
251
|
except ValueError:
|
|
252
252
|
msg = "No tests collected"
|
|
253
253
|
self._reporter.set_alert(msg)
|
|
254
|
+
self._reporter.update_db_by_doc()
|
|
254
255
|
exit(msg, ExitCode.NO_TESTS_COLLECTED)
|
|
255
256
|
if session.config.option.collectonly:
|
|
256
257
|
# ignore collect only mode
|
|
@@ -267,6 +268,7 @@ class HardpyPlugin:
|
|
|
267
268
|
except StandCloudError as exc:
|
|
268
269
|
msg = str(exc)
|
|
269
270
|
self._reporter.set_alert(msg)
|
|
271
|
+
self._reporter.update_db_by_doc()
|
|
270
272
|
exit(msg, ExitCode.INTERNAL_ERROR)
|
|
271
273
|
try:
|
|
272
274
|
sc_connector.healthcheck()
|
|
@@ -360,9 +362,12 @@ class HardpyPlugin:
|
|
|
360
362
|
is_dut_failure = True
|
|
361
363
|
if current_attempt == attempt:
|
|
362
364
|
break
|
|
363
|
-
|
|
364
365
|
# set the caused dut failure id only the first time
|
|
365
|
-
if
|
|
366
|
+
if (
|
|
367
|
+
is_dut_failure
|
|
368
|
+
and caused_dut_failure_id is None
|
|
369
|
+
and call.excinfo.typename != "Skipped"
|
|
370
|
+
):
|
|
366
371
|
self._reporter.set_caused_dut_failure_id(module_id, case_id)
|
|
367
372
|
|
|
368
373
|
# Reporting hooks
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
# GNU General Public License v3.0 (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import json
|
|
5
6
|
from dataclasses import dataclass
|
|
6
7
|
from inspect import stack
|
|
7
8
|
from os import environ
|
|
@@ -39,6 +40,23 @@ class CurrentTestInfo:
|
|
|
39
40
|
case_id: str
|
|
40
41
|
|
|
41
42
|
|
|
43
|
+
@dataclass
|
|
44
|
+
class PassFailDialog:
|
|
45
|
+
"""Result of dialog box interaction.
|
|
46
|
+
|
|
47
|
+
Attributes:
|
|
48
|
+
result: True if the dialog was successful
|
|
49
|
+
data: Data from widget if any, None otherwise
|
|
50
|
+
"""
|
|
51
|
+
|
|
52
|
+
result: bool = False
|
|
53
|
+
data: Any = None
|
|
54
|
+
|
|
55
|
+
def __bool__(self) -> bool:
|
|
56
|
+
"""Return True if the dialog was successful."""
|
|
57
|
+
return self.result
|
|
58
|
+
|
|
59
|
+
|
|
42
60
|
class ErrorCode:
|
|
43
61
|
"""Save error code and return error message.
|
|
44
62
|
|
|
@@ -592,7 +610,6 @@ def run_dialog_box(dialog_box_data: DialogBox) -> Any: # noqa: ANN401
|
|
|
592
610
|
dialog_box_data (DialogBox): Data for creating the dialog box.
|
|
593
611
|
|
|
594
612
|
DialogBox attributes:
|
|
595
|
-
|
|
596
613
|
- dialog_text (str): The text of the dialog box.
|
|
597
614
|
- title_bar (str | None): The title bar of the dialog box.
|
|
598
615
|
If the title_bar field is missing, it is the case name.
|
|
@@ -602,22 +619,22 @@ def run_dialog_box(dialog_box_data: DialogBox) -> Any: # noqa: ANN401
|
|
|
602
619
|
|
|
603
620
|
Returns:
|
|
604
621
|
Any: An object containing the user's response.
|
|
605
|
-
|
|
606
622
|
The type of the return value depends on the widget type:
|
|
607
|
-
|
|
608
623
|
- BASE: bool.
|
|
609
624
|
- TEXT_INPUT: str.
|
|
610
625
|
- NUMERIC_INPUT: float.
|
|
611
626
|
- RADIOBUTTON: str.
|
|
612
627
|
- CHECKBOX: list[str].
|
|
613
628
|
- MULTISTEP: bool.
|
|
629
|
+
- Pass/Fail widget: PassFailDialog.
|
|
614
630
|
|
|
615
631
|
Raises:
|
|
616
|
-
ValueError: If the '
|
|
632
|
+
ValueError: If the 'dialog_text' argument is empty.
|
|
617
633
|
"""
|
|
618
634
|
if not dialog_box_data.dialog_text:
|
|
619
635
|
msg = "The 'dialog_text' argument cannot be empty."
|
|
620
636
|
raise ValueError(msg)
|
|
637
|
+
|
|
621
638
|
reporter = RunnerReporter()
|
|
622
639
|
current_test = _get_current_test()
|
|
623
640
|
key = reporter.generate_key(
|
|
@@ -633,9 +650,17 @@ def run_dialog_box(dialog_box_data: DialogBox) -> Any: # noqa: ANN401
|
|
|
633
650
|
reporter.update_db_by_doc()
|
|
634
651
|
|
|
635
652
|
input_dbx_data = _get_operator_data()
|
|
636
|
-
|
|
637
653
|
_cleanup_widget(reporter, key)
|
|
638
|
-
|
|
654
|
+
|
|
655
|
+
if dialog_box_data.pass_fail:
|
|
656
|
+
return _process_pass_fail_dialog(dialog_box_data, input_dbx_data)
|
|
657
|
+
|
|
658
|
+
try:
|
|
659
|
+
data_dict = json.loads(input_dbx_data)
|
|
660
|
+
except json.JSONDecodeError:
|
|
661
|
+
return dialog_box_data.widget.convert_data(input_dbx_data)
|
|
662
|
+
widget_data = data_dict.get("data", "")
|
|
663
|
+
return dialog_box_data.widget.convert_data(widget_data)
|
|
639
664
|
|
|
640
665
|
|
|
641
666
|
def set_operator_message( # noqa: PLR0913
|
|
@@ -723,6 +748,7 @@ def _get_current_test() -> CurrentTestInfo:
|
|
|
723
748
|
caller = stack()[1].function
|
|
724
749
|
msg = f"Function {caller} can't be called outside of the test."
|
|
725
750
|
reporter.set_alert(msg)
|
|
751
|
+
reporter.update_db_by_doc()
|
|
726
752
|
raise RuntimeError(msg)
|
|
727
753
|
|
|
728
754
|
module_delimiter = ".py::"
|
|
@@ -766,3 +792,33 @@ def _get_operator_data() -> str:
|
|
|
766
792
|
def _cleanup_widget(reporter: RunnerReporter, key: str) -> None:
|
|
767
793
|
reporter.set_doc_value(key, {}, statestore_only=True)
|
|
768
794
|
reporter.update_db_by_doc()
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
def _process_pass_fail_dialog(
|
|
798
|
+
dialog_box_data: DialogBox,
|
|
799
|
+
input_data: str,
|
|
800
|
+
) -> PassFailDialog:
|
|
801
|
+
"""Process pass/fail dialog result."""
|
|
802
|
+
result = PassFailDialog()
|
|
803
|
+
|
|
804
|
+
try:
|
|
805
|
+
data_dict = json.loads(input_data)
|
|
806
|
+
except json.JSONDecodeError:
|
|
807
|
+
result.result = False
|
|
808
|
+
if dialog_box_data.widget:
|
|
809
|
+
result.data = dialog_box_data.widget.convert_data(input_data)
|
|
810
|
+
else:
|
|
811
|
+
result.data = True
|
|
812
|
+
return result
|
|
813
|
+
|
|
814
|
+
result_value = data_dict.get("result", "")
|
|
815
|
+
widget_data = data_dict.get("data", "")
|
|
816
|
+
|
|
817
|
+
result.result = result_value == "passed"
|
|
818
|
+
|
|
819
|
+
if dialog_box_data.widget and widget_data:
|
|
820
|
+
result.data = dialog_box_data.widget.convert_data(widget_data)
|
|
821
|
+
else:
|
|
822
|
+
result.data = True
|
|
823
|
+
|
|
824
|
+
return result
|
|
@@ -366,6 +366,7 @@ class DialogBox:
|
|
|
366
366
|
widget (IWidget | None): widget info
|
|
367
367
|
image (ImageComponent | None): image
|
|
368
368
|
font_size (int): font size
|
|
369
|
+
pass_fail (bool): enable pass/fail buttons instead of confirm button
|
|
369
370
|
"""
|
|
370
371
|
|
|
371
372
|
def __init__( # noqa: PLR0913
|
|
@@ -376,6 +377,7 @@ class DialogBox:
|
|
|
376
377
|
image: ImageComponent | None = None,
|
|
377
378
|
html: HTMLComponent | None = None,
|
|
378
379
|
font_size: int = 14,
|
|
380
|
+
pass_fail: bool = False,
|
|
379
381
|
) -> None:
|
|
380
382
|
self.widget: IWidget = BaseWidget() if widget is None else widget
|
|
381
383
|
self.image: ImageComponent | None = image
|
|
@@ -385,6 +387,7 @@ class DialogBox:
|
|
|
385
387
|
self.visible: bool = True
|
|
386
388
|
self.id = str(uuid4())
|
|
387
389
|
self.font_size = font_size
|
|
390
|
+
self.pass_fail: bool = pass_fail
|
|
388
391
|
|
|
389
392
|
if font_size < 1:
|
|
390
393
|
msg = "The 'font_size' argument cannot be less than 1"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hardpy
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.17.1
|
|
4
4
|
Summary: HardPy library for device testing
|
|
5
5
|
Project-URL: Homepage, https://github.com/everypinio/hardpy/
|
|
6
6
|
Project-URL: Documentation, https://everypinio.github.io/hardpy/
|
|
@@ -68,6 +68,8 @@ HardPy is a python library for creating a test bench for devices.
|
|
|
68
68
|

|
|
69
69
|
[](https://docs.pytest.org/en/latest/)
|
|
70
70
|
[](https://everypinio.github.io/hardpy/)
|
|
71
|
+
[](https://www.reddit.com/r/HardPy)
|
|
72
|
+
[](https://t.me/everypin)
|
|
71
73
|
|
|
72
74
|
</div>
|
|
73
75
|
|
|
@@ -114,3 +116,16 @@ hardpy run
|
|
|
114
116
|
## Examples
|
|
115
117
|
|
|
116
118
|
For more examples of using **HardPy**, see the [examples](https://github.com/everypinio/hardpy/tree/main/examples) folder and the [documentation](https://everypinio.github.io/hardpy/examples/).
|
|
119
|
+
|
|
120
|
+
## Measurement instruments
|
|
121
|
+
|
|
122
|
+
**HardPy** does not contain any drivers for interacting with measuring equipment.
|
|
123
|
+
However, **HardPy** allows you to work with any Python code, meaning you can use
|
|
124
|
+
open libraries to interact with measuring equipment.
|
|
125
|
+
|
|
126
|
+
* [InstrumentKit](https://github.com/instrumentkit/InstrumentKit)
|
|
127
|
+
* [Instrumental](https://github.com/mabuchilab/Instrumental)
|
|
128
|
+
* [PyMeasure](https://github.com/pymeasure/pymeasure)
|
|
129
|
+
* [PyTango](https://gitlab.com/tango-controls/pytango)
|
|
130
|
+
* [QCoDeS](https://github.com/microsoft/Qcodes)
|
|
131
|
+
* [QCoDeS contrib drivers](https://github.com/QCoDeS/Qcodes_contrib_drivers)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
hardpy/__init__.py,sha256=
|
|
1
|
+
hardpy/__init__.py,sha256=B99MElYhd8HHgOJaT-RVPyvIN18uPaG2pb78TJ3lqvE,2957
|
|
2
2
|
hardpy/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
hardpy/cli/cli.py,sha256=MmVup0jt_H0erPiqloPInbiZ9SjWHmJvqewHOtlqB10,9632
|
|
4
|
-
hardpy/cli/template.py,sha256=
|
|
4
|
+
hardpy/cli/template.py,sha256=kOl8hsj6iBTFIDUli_dzHkH8mlnoJzOlr9muLpTEayg,6230
|
|
5
5
|
hardpy/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
hardpy/common/config.py,sha256=
|
|
6
|
+
hardpy/common/config.py,sha256=XstzgQVOSgGz44_OH82jjxM90ZTI97odp-juICfx2h0,6289
|
|
7
7
|
hardpy/common/singleton.py,sha256=RVMqbluN-mhlJ4QOYcRzQLA68Hs8t83XNyihyUwhYGo,948
|
|
8
8
|
hardpy/common/stand_cloud/__init__.py,sha256=fezdiYAehtT2H-GAef-xZU12CbmCRe64XHA9UB3kJDU,456
|
|
9
9
|
hardpy/common/stand_cloud/connector.py,sha256=scmKT09duPqqbQtwMNPnl59si_sErwqAY2PeiTSCZvg,7389
|
|
@@ -13,14 +13,14 @@ hardpy/common/stand_cloud/registration.py,sha256=UW-JGcvON5CMQQ-s2Mb4Ee3u_jmdQfS
|
|
|
13
13
|
hardpy/common/stand_cloud/token_manager.py,sha256=8dX802F0CnOrOjOQInyYCrvuRdK0CeiCrTDITAbSLgQ,4055
|
|
14
14
|
hardpy/common/stand_cloud/utils.py,sha256=GN3wzbrmF-Xe5iUXf_HurGO-YKltqd3Gc_7vG2eEL7c,692
|
|
15
15
|
hardpy/hardpy_panel/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
-
hardpy/hardpy_panel/api.py,sha256=
|
|
16
|
+
hardpy/hardpy_panel/api.py,sha256=iO7zBH56X74mj1c_5NudRlQ7frnBu-fXAoRfpN_2jU8,4721
|
|
17
17
|
hardpy/hardpy_panel/frontend/dist/favicon.ico,sha256=sgIk5PKUKEKBDpkSrc8dJgjpObp0iF82Mec0GpfKId4,15406
|
|
18
|
-
hardpy/hardpy_panel/frontend/dist/index.html,sha256=
|
|
18
|
+
hardpy/hardpy_panel/frontend/dist/index.html,sha256=cXpYNo5rQSx4sbz9B7bBkXFg2M0Zp_VcdQQfaw0WJ-U,1851
|
|
19
19
|
hardpy/hardpy_panel/frontend/dist/logo192.png,sha256=E4K7drvhJCg9HcTpRihOXZhVJVBZ7-W97Se-3tDb46o,14485
|
|
20
20
|
hardpy/hardpy_panel/frontend/dist/logo512.png,sha256=-fIMbqX7PYUpheK4kX1C1erRTe_hHZwFQYDLrAbhFRU,34188
|
|
21
21
|
hardpy/hardpy_panel/frontend/dist/manifest.json,sha256=PfmJlN2JMJtHS6OnhU4b4X5wPQC_yRBdjesjoirObSA,502
|
|
22
|
-
hardpy/hardpy_panel/frontend/dist/assets/allPaths-
|
|
23
|
-
hardpy/hardpy_panel/frontend/dist/assets/allPathsLoader-
|
|
22
|
+
hardpy/hardpy_panel/frontend/dist/assets/allPaths-LQifhvrX.js,sha256=7_DF1_Eff4_SJH2rsCwWL446cZCdq_zGVNFMEw52RxA,309
|
|
23
|
+
hardpy/hardpy_panel/frontend/dist/assets/allPathsLoader-C-JecT3u.js,sha256=9FRIQnmEmIVgrU1c-6fAYlBrzDo5Fvm0x2g6OabHg8o,550
|
|
24
24
|
hardpy/hardpy_panel/frontend/dist/assets/blueprint-icons-16-B2twAPZE.ttf,sha256=OcrUHPBAaLvJxb2DOethXFXg8PClDcyvpsh0mToLFPM,136248
|
|
25
25
|
hardpy/hardpy_panel/frontend/dist/assets/blueprint-icons-16-C0Unyq1d.eot,sha256=Bl93LjY8pyBj0Iip1lUxMM-0l1zLrRjoGmKPPnAQIgw,136456
|
|
26
26
|
hardpy/hardpy_panel/frontend/dist/assets/blueprint-icons-16-CVy9qFng.svg,sha256=57jlcc-NFRVJNJ3t-1fOnJvgdbYhcrF5a06LJLhWc5A,601027
|
|
@@ -31,26 +31,26 @@ hardpy/hardpy_panel/frontend/dist/assets/blueprint-icons-20-CjKGIKxE.woff,sha256
|
|
|
31
31
|
hardpy/hardpy_panel/frontend/dist/assets/blueprint-icons-20-DQ09GSQq.svg,sha256=3gLRYNxd_Y4iz6pspH4Bf7Ql4F6LH5haZzbTfxA53HQ,638634
|
|
32
32
|
hardpy/hardpy_panel/frontend/dist/assets/blueprint-icons-20-DmR755bS.ttf,sha256=yr5g5Jw9ZnxJJ7e1quOv977VE3NU2GRB60BMRrOJrcI,139424
|
|
33
33
|
hardpy/hardpy_panel/frontend/dist/assets/blueprint-icons-20-p9MhBXD8.eot,sha256=CFx8t8ONhB4INIrK860N56_t1dmS7FuRF7i0HKKo58k,139632
|
|
34
|
-
hardpy/hardpy_panel/frontend/dist/assets/browser-ponyfill-
|
|
34
|
+
hardpy/hardpy_panel/frontend/dist/assets/browser-ponyfill-B-CPdmQc.js,sha256=AT3hjyUgHdoxmhyl0GTfB4jtwDPxXTqIUcjdLS0fH8g,10294
|
|
35
35
|
hardpy/hardpy_panel/frontend/dist/assets/index-B-fsa5Ru.js,sha256=IonL7d7ppdDr-_FRJZQPWI4HHFTiygYvZGVlUxHY9R8,294235
|
|
36
|
+
hardpy/hardpy_panel/frontend/dist/assets/index-B2oxSaK6.js,sha256=BSl7jKiWRZWWzbp-0zqMtg-xjUfJEAKRLR7ALo38Igk,5949989
|
|
36
37
|
hardpy/hardpy_panel/frontend/dist/assets/index-B7T9xvaW.css,sha256=5m7QXWbthqi_Va8qlvnTZeuRzSN_ZJUdhyeb3JD6ZME,315862
|
|
37
|
-
hardpy/hardpy_panel/frontend/dist/assets/index-C93zcGIi.js,sha256=DJM3FiKJFlkDx7O5h_sHjbRfpzUAkWCBjl0demmuG-w,5941398
|
|
38
38
|
hardpy/hardpy_panel/frontend/dist/assets/index-DLOviMB1.js,sha256=sI0W1vvwqvIwKP2_jglrwOhej3n5rJD72-d4ZhlUHqM,285612
|
|
39
39
|
hardpy/hardpy_panel/frontend/dist/assets/logo_smol-CK3jE85c.png,sha256=E4K7drvhJCg9HcTpRihOXZhVJVBZ7-W97Se-3tDb46o,14485
|
|
40
|
-
hardpy/hardpy_panel/frontend/dist/assets/splitPathsBySizeLoader-
|
|
41
|
-
hardpy/hardpy_panel/frontend/dist/locales/de/translation.json,sha256=
|
|
42
|
-
hardpy/hardpy_panel/frontend/dist/locales/en/translation.json,sha256=
|
|
43
|
-
hardpy/hardpy_panel/frontend/dist/locales/es/translation.json,sha256=
|
|
44
|
-
hardpy/hardpy_panel/frontend/dist/locales/fr/translation.json,sha256=
|
|
45
|
-
hardpy/hardpy_panel/frontend/dist/locales/ja/translation.json,sha256=
|
|
46
|
-
hardpy/hardpy_panel/frontend/dist/locales/ru/translation.json,sha256=
|
|
47
|
-
hardpy/hardpy_panel/frontend/dist/locales/zh/translation.json,sha256=
|
|
40
|
+
hardpy/hardpy_panel/frontend/dist/assets/splitPathsBySizeLoader-CBTnepth.js,sha256=701tUVw0n3Iuj5yVRfcTI7Q6xRay-AA0FSeEwsfZZsE,472
|
|
41
|
+
hardpy/hardpy_panel/frontend/dist/locales/de/translation.json,sha256=vYVYRpSrpGZi7s8tPoAZxtVCeuPqhlwK1qC_lm52Pzc,2575
|
|
42
|
+
hardpy/hardpy_panel/frontend/dist/locales/en/translation.json,sha256=jJ1DEY6-fx--a5VQW6SOYCvPLQXfizs-JtsRf1rohiI,2333
|
|
43
|
+
hardpy/hardpy_panel/frontend/dist/locales/es/translation.json,sha256=_biD1ve2CpvFDeRO7dzoFyvbeFcz-572UzhUzn002Z8,2628
|
|
44
|
+
hardpy/hardpy_panel/frontend/dist/locales/fr/translation.json,sha256=YC8aL1tDx8LjmfC2pjfJ_rjl_mSDGnUIxCa80ZqxLus,2635
|
|
45
|
+
hardpy/hardpy_panel/frontend/dist/locales/ja/translation.json,sha256=kGBJmHlhnduRPLOIoSU1UoRy5RfJURGdg1YckIchA9w,2845
|
|
46
|
+
hardpy/hardpy_panel/frontend/dist/locales/ru/translation.json,sha256=81pqFajGhSwPwZV4j0HpziB1oX2iJ5Ud12cLiAaX8J0,3467
|
|
47
|
+
hardpy/hardpy_panel/frontend/dist/locales/zh/translation.json,sha256=9W61N2MA15J5Zj6UqBqPmUDZXaRAH2HWm9m51BgvzJw,2322
|
|
48
48
|
hardpy/pytest_hardpy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
49
|
-
hardpy/pytest_hardpy/plugin.py,sha256=
|
|
50
|
-
hardpy/pytest_hardpy/pytest_call.py,sha256=
|
|
49
|
+
hardpy/pytest_hardpy/plugin.py,sha256=Qa_TaNjvDARlQoINxca4_3b3sS58V0CiJdV_QZ-3V_8,22125
|
|
50
|
+
hardpy/pytest_hardpy/pytest_call.py,sha256=qUDrK1iUjhGEs4bmBFTk9E0YfFzsePoHhVDRY6ngRV8,22878
|
|
51
51
|
hardpy/pytest_hardpy/pytest_wrapper.py,sha256=j3zfSHgtx7V_LdUErGAjy0KZ14YYkXyYTwNO59NcIWI,4745
|
|
52
52
|
hardpy/pytest_hardpy/db/__init__.py,sha256=scaWueM5N_aMEuFCcMVkicpcqjx5JUi2IdEN9HmzuGs,792
|
|
53
|
-
hardpy/pytest_hardpy/db/base_store.py,sha256=
|
|
53
|
+
hardpy/pytest_hardpy/db/base_store.py,sha256=d1lkTB7CpHTKysD2yuuGQFai44OtOmtTbq-WaBYojhw,5545
|
|
54
54
|
hardpy/pytest_hardpy/db/const.py,sha256=E_A0IKGeS3qyPX4fTfUE5ksARsrTKSVWqUkdmh8S_fo,1414
|
|
55
55
|
hardpy/pytest_hardpy/db/runstore.py,sha256=humoVBDZJGh7j_v5Xrf3P0HHaeRXC8oRdIj1QWGZizg,946
|
|
56
56
|
hardpy/pytest_hardpy/db/stand_type.py,sha256=p3AFtgMt-sn8QXRp60YM-xo2mEjZHUhYr_Mxhz1WyP0,7438
|
|
@@ -71,13 +71,13 @@ hardpy/pytest_hardpy/result/report_reader/couchdb_reader.py,sha256=lnWSX-0QKbdMw
|
|
|
71
71
|
hardpy/pytest_hardpy/result/report_reader/stand_cloud_reader.py,sha256=uT7YSBu1QyURH9IkgRCdpbinn8LKXUhgVEhwPmGZV7I,3636
|
|
72
72
|
hardpy/pytest_hardpy/utils/__init__.py,sha256=zHln8ySBHesYAwYatLYkHol5TuuTTNOqrsMP7ONFEG0,1338
|
|
73
73
|
hardpy/pytest_hardpy/utils/const.py,sha256=xS3jBrW_D6IUTlAjSnLiHvSthieRHCj3uN_6fFAXS0w,1832
|
|
74
|
-
hardpy/pytest_hardpy/utils/dialog_box.py,sha256=
|
|
74
|
+
hardpy/pytest_hardpy/utils/dialog_box.py,sha256=eCLGQ-Z8rDPd_8ABHRtbkd7piSZcJoG-bCBmnyq29Pw,11375
|
|
75
75
|
hardpy/pytest_hardpy/utils/exception.py,sha256=1l2VBZLUnjPDoOs744MtaP7Y9FuXUq7koSdH2Eo31nk,1042
|
|
76
76
|
hardpy/pytest_hardpy/utils/machineid.py,sha256=6JAzUt7KtjTYn8kL9hSMaCQ20U8liH-zDT9v-5Ch7Q8,296
|
|
77
77
|
hardpy/pytest_hardpy/utils/node_info.py,sha256=DaW566WvsyWR66CThuZ38UoHwQa-pu-4WRLg61OXDnE,7134
|
|
78
78
|
hardpy/pytest_hardpy/utils/progress_calculator.py,sha256=TPl2gG0ZSvMe8otPythhF9hkD6fa6-mJAhy9yI83-yE,1071
|
|
79
|
-
hardpy-0.
|
|
80
|
-
hardpy-0.
|
|
81
|
-
hardpy-0.
|
|
82
|
-
hardpy-0.
|
|
83
|
-
hardpy-0.
|
|
79
|
+
hardpy-0.17.1.dist-info/METADATA,sha256=YzWTDF-5099MNYk_0pQUKU1Nv-XtSfNXIiV355ZW51o,4898
|
|
80
|
+
hardpy-0.17.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
81
|
+
hardpy-0.17.1.dist-info/entry_points.txt,sha256=nL2sMkKMScNaOE0IPkYnu9Yr-BUswZvGSrwY-SxHY3E,102
|
|
82
|
+
hardpy-0.17.1.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
83
|
+
hardpy-0.17.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|