hardpy 0.7.0__py3-none-any.whl → 0.8.0__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 +25 -27
- hardpy/cli/cli.py +1 -2
- hardpy/common/config.py +8 -8
- hardpy/hardpy_panel/frontend/dist/asset-manifest.json +3 -3
- hardpy/hardpy_panel/frontend/dist/index.html +1 -1
- hardpy/hardpy_panel/frontend/dist/logo192.png +0 -0
- hardpy/hardpy_panel/frontend/dist/static/css/main.e8a862f1.css.map +1 -1
- hardpy/hardpy_panel/frontend/dist/static/js/main.6f09d61a.js +3 -0
- hardpy/hardpy_panel/frontend/dist/static/js/main.6f09d61a.js.map +1 -0
- hardpy/pytest_hardpy/db/__init__.py +1 -1
- hardpy/pytest_hardpy/db/base_connector.py +1 -1
- hardpy/pytest_hardpy/db/base_store.py +9 -0
- hardpy/pytest_hardpy/db/schema/v1.py +4 -4
- hardpy/pytest_hardpy/db/statestore.py +0 -11
- hardpy/pytest_hardpy/plugin.py +52 -64
- hardpy/pytest_hardpy/pytest_call.py +5 -2
- hardpy/pytest_hardpy/pytest_wrapper.py +0 -1
- hardpy/pytest_hardpy/reporter/__init__.py +1 -1
- hardpy/pytest_hardpy/reporter/hook_reporter.py +3 -2
- hardpy/pytest_hardpy/result/__init__.py +1 -1
- hardpy/pytest_hardpy/utils/__init__.py +16 -12
- hardpy/pytest_hardpy/utils/dialog_box.py +81 -54
- hardpy/pytest_hardpy/utils/exception.py +6 -0
- {hardpy-0.7.0.dist-info → hardpy-0.8.0.dist-info}/METADATA +10 -8
- {hardpy-0.7.0.dist-info → hardpy-0.8.0.dist-info}/RECORD +29 -28
- hardpy/hardpy_panel/frontend/dist/static/js/main.942e57d4.js +0 -3
- hardpy/hardpy_panel/frontend/dist/static/js/main.942e57d4.js.map +0 -1
- /hardpy/hardpy_panel/frontend/dist/static/js/{main.942e57d4.js.LICENSE.txt → main.6f09d61a.js.LICENSE.txt} +0 -0
- {hardpy-0.7.0.dist-info → hardpy-0.8.0.dist-info}/WHEEL +0 -0
- {hardpy-0.7.0.dist-info → hardpy-0.8.0.dist-info}/entry_points.txt +0 -0
- {hardpy-0.7.0.dist-info → hardpy-0.8.0.dist-info}/licenses/LICENSE +0 -0
hardpy/__init__.py
CHANGED
|
@@ -21,13 +21,14 @@ from hardpy.pytest_hardpy.pytest_call import (
|
|
|
21
21
|
from hardpy.pytest_hardpy.result import CouchdbLoader
|
|
22
22
|
from hardpy.pytest_hardpy.result.couchdb_config import CouchdbConfig
|
|
23
23
|
from hardpy.pytest_hardpy.utils import (
|
|
24
|
+
BaseWidget,
|
|
24
25
|
CheckboxWidget,
|
|
25
26
|
DialogBox,
|
|
26
27
|
DuplicatePartNumberError,
|
|
27
28
|
DuplicateSerialNumberError,
|
|
28
29
|
DuplicateTestStandLocationError,
|
|
29
30
|
DuplicateTestStandNameError,
|
|
30
|
-
|
|
31
|
+
ImageComponent,
|
|
31
32
|
MultistepWidget,
|
|
32
33
|
NumericInputWidget,
|
|
33
34
|
RadiobuttonWidget,
|
|
@@ -36,37 +37,34 @@ from hardpy.pytest_hardpy.utils import (
|
|
|
36
37
|
)
|
|
37
38
|
|
|
38
39
|
__all__ = [
|
|
39
|
-
|
|
40
|
-
"
|
|
40
|
+
"BaseWidget",
|
|
41
|
+
"CheckboxWidget",
|
|
41
42
|
"CouchdbConfig",
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
"DuplicateSerialNumberError",
|
|
43
|
+
"CouchdbLoader",
|
|
44
|
+
"DialogBox",
|
|
45
45
|
"DuplicatePartNumberError",
|
|
46
|
-
"
|
|
46
|
+
"DuplicateSerialNumberError",
|
|
47
47
|
"DuplicateTestStandLocationError",
|
|
48
|
-
|
|
48
|
+
"DuplicateTestStandNameError",
|
|
49
|
+
"ImageComponent",
|
|
50
|
+
"MultistepWidget",
|
|
51
|
+
"NumericInputWidget",
|
|
52
|
+
"RadiobuttonWidget",
|
|
53
|
+
"StepWidget",
|
|
54
|
+
"TextInputWidget",
|
|
55
|
+
"get_current_attempt",
|
|
56
|
+
"get_current_report",
|
|
57
|
+
"run_dialog_box",
|
|
58
|
+
"set_case_artifact",
|
|
59
|
+
"set_driver_info",
|
|
49
60
|
"set_dut_info",
|
|
50
|
-
"set_dut_serial_number",
|
|
51
61
|
"set_dut_part_number",
|
|
52
|
-
"
|
|
53
|
-
"set_stand_info",
|
|
54
|
-
"set_stand_location",
|
|
55
|
-
"set_case_artifact",
|
|
56
|
-
"set_module_artifact",
|
|
57
|
-
"set_run_artifact",
|
|
62
|
+
"set_dut_serial_number",
|
|
58
63
|
"set_message",
|
|
59
|
-
"
|
|
64
|
+
"set_module_artifact",
|
|
60
65
|
"set_operator_message",
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"TextInputWidget",
|
|
66
|
-
"NumericInputWidget",
|
|
67
|
-
"CheckboxWidget",
|
|
68
|
-
"RadiobuttonWidget",
|
|
69
|
-
"ImageWidget",
|
|
70
|
-
"StepWidget",
|
|
71
|
-
"MultistepWidget",
|
|
66
|
+
"set_run_artifact",
|
|
67
|
+
"set_stand_info",
|
|
68
|
+
"set_stand_location",
|
|
69
|
+
"set_stand_name",
|
|
72
70
|
]
|
hardpy/cli/cli.py
CHANGED
|
@@ -4,10 +4,9 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import sys
|
|
6
6
|
from pathlib import Path
|
|
7
|
-
from typing import Optional
|
|
7
|
+
from typing import Annotated, Optional
|
|
8
8
|
|
|
9
9
|
import typer
|
|
10
|
-
from typing_extensions import Annotated
|
|
11
10
|
from uvicorn import run as uvicorn_run
|
|
12
11
|
|
|
13
12
|
from hardpy.cli.template import TemplateGenerator
|
hardpy/common/config.py
CHANGED
|
@@ -5,7 +5,8 @@ from __future__ import annotations
|
|
|
5
5
|
from logging import getLogger
|
|
6
6
|
from pathlib import Path
|
|
7
7
|
|
|
8
|
-
import
|
|
8
|
+
import tomli
|
|
9
|
+
import tomli_w
|
|
9
10
|
from pydantic import BaseModel, ConfigDict, ValidationError
|
|
10
11
|
|
|
11
12
|
logger = getLogger(__name__)
|
|
@@ -111,8 +112,9 @@ class ConfigManager:
|
|
|
111
112
|
Args:
|
|
112
113
|
parent_dir (Path): Configuration file parent directory.
|
|
113
114
|
"""
|
|
115
|
+
config_str = tomli_w.dumps(cls.obj.model_dump())
|
|
114
116
|
with Path.open(parent_dir / "hardpy.toml", "w") as file:
|
|
115
|
-
file.write(
|
|
117
|
+
file.write(config_str)
|
|
116
118
|
|
|
117
119
|
@classmethod
|
|
118
120
|
def read_config(cls, toml_path: Path) -> HardpyConfig | None:
|
|
@@ -127,15 +129,13 @@ class ConfigManager:
|
|
|
127
129
|
cls.tests_path = toml_path
|
|
128
130
|
toml_file = toml_path / "hardpy.toml"
|
|
129
131
|
if not toml_file.exists():
|
|
130
|
-
logger.error(
|
|
132
|
+
logger.error("File hardpy.toml not found at path: %s", toml_file)
|
|
131
133
|
return None
|
|
132
134
|
try:
|
|
133
|
-
with Path.open(toml_path / "hardpy.toml", "
|
|
134
|
-
cls.obj = HardpyConfig(**
|
|
135
|
+
with Path.open(toml_path / "hardpy.toml", "rb") as f:
|
|
136
|
+
cls.obj = HardpyConfig(**tomli.load(f))
|
|
135
137
|
return cls.obj # noqa: TRY300
|
|
136
|
-
except
|
|
137
|
-
logger.exception("Error parsing TOML")
|
|
138
|
-
except rtoml.TomlSerializationError:
|
|
138
|
+
except tomli.TOMLDecodeError:
|
|
139
139
|
logger.exception("Error parsing TOML")
|
|
140
140
|
except ValidationError:
|
|
141
141
|
logger.exception("Error parsing TOML")
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": {
|
|
3
3
|
"main.css": "/static/css/main.e8a862f1.css",
|
|
4
|
-
"main.js": "/static/js/main.
|
|
4
|
+
"main.js": "/static/js/main.6f09d61a.js",
|
|
5
5
|
"blueprint-icons-all-paths-loader.js": "/static/js/blueprint-icons-all-paths-loader.0aa89747.chunk.js",
|
|
6
6
|
"blueprint-icons-split-paths-by-size-loader.js": "/static/js/blueprint-icons-split-paths-by-size-loader.52a072d3.chunk.js",
|
|
7
7
|
"static/js/808.ce070002.chunk.js": "/static/js/808.ce070002.chunk.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"static/media/logo_smol.png": "/static/media/logo_smol.5b16f92447a4a9e80331.png",
|
|
22
22
|
"index.html": "/index.html",
|
|
23
23
|
"main.e8a862f1.css.map": "/static/css/main.e8a862f1.css.map",
|
|
24
|
-
"main.
|
|
24
|
+
"main.6f09d61a.js.map": "/static/js/main.6f09d61a.js.map",
|
|
25
25
|
"blueprint-icons-all-paths-loader.0aa89747.chunk.js.map": "/static/js/blueprint-icons-all-paths-loader.0aa89747.chunk.js.map",
|
|
26
26
|
"blueprint-icons-split-paths-by-size-loader.52a072d3.chunk.js.map": "/static/js/blueprint-icons-split-paths-by-size-loader.52a072d3.chunk.js.map",
|
|
27
27
|
"808.ce070002.chunk.js.map": "/static/js/808.ce070002.chunk.js.map",
|
|
@@ -31,6 +31,6 @@
|
|
|
31
31
|
},
|
|
32
32
|
"entrypoints": [
|
|
33
33
|
"static/css/main.e8a862f1.css",
|
|
34
|
-
"static/js/main.
|
|
34
|
+
"static/js/main.6f09d61a.js"
|
|
35
35
|
]
|
|
36
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>HardPy Operator Panel</title><script defer="defer" src="/static/js/main.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>HardPy Operator Panel</title><script defer="defer" src="/static/js/main.6f09d61a.js"></script><link href="/static/css/main.e8a862f1.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
|
Binary file
|