hardpy 0.1.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 +34 -0
- hardpy/hardpy_panel/__init__.py +0 -0
- hardpy/hardpy_panel/api.py +71 -0
- hardpy/hardpy_panel/frontend/dist/asset-manifest.json +36 -0
- hardpy/hardpy_panel/frontend/dist/favicon.ico +0 -0
- hardpy/hardpy_panel/frontend/dist/index.html +1 -0
- hardpy/hardpy_panel/frontend/dist/logo512.png +0 -0
- hardpy/hardpy_panel/frontend/dist/manifest.json +25 -0
- hardpy/hardpy_panel/frontend/dist/static/css/main.e8a862f1.css +2 -0
- hardpy/hardpy_panel/frontend/dist/static/css/main.e8a862f1.css.map +1 -0
- hardpy/hardpy_panel/frontend/dist/static/js/808.ce070002.chunk.js +2 -0
- hardpy/hardpy_panel/frontend/dist/static/js/808.ce070002.chunk.js.map +1 -0
- hardpy/hardpy_panel/frontend/dist/static/js/blueprint-icons-16px-paths.d605910e.chunk.js +2 -0
- hardpy/hardpy_panel/frontend/dist/static/js/blueprint-icons-16px-paths.d605910e.chunk.js.map +1 -0
- hardpy/hardpy_panel/frontend/dist/static/js/blueprint-icons-20px-paths.7ee05cc8.chunk.js +2 -0
- hardpy/hardpy_panel/frontend/dist/static/js/blueprint-icons-20px-paths.7ee05cc8.chunk.js.map +1 -0
- hardpy/hardpy_panel/frontend/dist/static/js/blueprint-icons-all-paths-loader.0aa89747.chunk.js +2 -0
- hardpy/hardpy_panel/frontend/dist/static/js/blueprint-icons-all-paths-loader.0aa89747.chunk.js.map +1 -0
- hardpy/hardpy_panel/frontend/dist/static/js/blueprint-icons-all-paths.f63155c9.chunk.js +2 -0
- hardpy/hardpy_panel/frontend/dist/static/js/blueprint-icons-all-paths.f63155c9.chunk.js.map +1 -0
- hardpy/hardpy_panel/frontend/dist/static/js/blueprint-icons-split-paths-by-size-loader.52a072d3.chunk.js +2 -0
- hardpy/hardpy_panel/frontend/dist/static/js/blueprint-icons-split-paths-by-size-loader.52a072d3.chunk.js.map +1 -0
- hardpy/hardpy_panel/frontend/dist/static/js/main.8ef63e9b.js +3 -0
- hardpy/hardpy_panel/frontend/dist/static/js/main.8ef63e9b.js.LICENSE.txt +90 -0
- hardpy/hardpy_panel/frontend/dist/static/js/main.8ef63e9b.js.map +1 -0
- hardpy/hardpy_panel/frontend/dist/static/media/blueprint-icons-16.520846c6beb41df528c8.eot +0 -0
- hardpy/hardpy_panel/frontend/dist/static/media/blueprint-icons-16.5c52b39c697f2323ce8b.svg +1806 -0
- hardpy/hardpy_panel/frontend/dist/static/media/blueprint-icons-16.84db1772f4bfb529f64f.woff +0 -0
- hardpy/hardpy_panel/frontend/dist/static/media/blueprint-icons-16.b67ee1736e20e37a3225.woff2 +0 -0
- hardpy/hardpy_panel/frontend/dist/static/media/blueprint-icons-16.e02ecf515378db143652.ttf +0 -0
- hardpy/hardpy_panel/frontend/dist/static/media/blueprint-icons-20.429cacb8accf72488451.ttf +0 -0
- hardpy/hardpy_panel/frontend/dist/static/media/blueprint-icons-20.6ae3791ee2d86fc228a6.svg +1806 -0
- hardpy/hardpy_panel/frontend/dist/static/media/blueprint-icons-20.8cecf62de42997e4d82f.woff2 +0 -0
- hardpy/hardpy_panel/frontend/dist/static/media/blueprint-icons-20.afbadb627d43b7857223.eot +0 -0
- hardpy/hardpy_panel/frontend/dist/static/media/blueprint-icons-20.e857f5a5132b8bfa71a1.woff +0 -0
- hardpy/hardpy_panel/frontend/dist/static/media/logo_smol.5b16f92447a4a9e80331.png +0 -0
- hardpy/hardpy_panel/runner.py +52 -0
- hardpy/pytest_hardpy/__init__.py +0 -0
- hardpy/pytest_hardpy/db/__init__.py +18 -0
- hardpy/pytest_hardpy/db/base_connector.py +24 -0
- hardpy/pytest_hardpy/db/base_server.py +14 -0
- hardpy/pytest_hardpy/db/base_store.py +88 -0
- hardpy/pytest_hardpy/db/const.py +25 -0
- hardpy/pytest_hardpy/db/runstore.py +30 -0
- hardpy/pytest_hardpy/db/schema.py +292 -0
- hardpy/pytest_hardpy/db/statestore.py +19 -0
- hardpy/pytest_hardpy/plugin.py +244 -0
- hardpy/pytest_hardpy/pytest_call.py +218 -0
- hardpy/pytest_hardpy/pytest_wrapper.py +117 -0
- hardpy/pytest_hardpy/reporter/__init__.py +10 -0
- hardpy/pytest_hardpy/reporter/base.py +42 -0
- hardpy/pytest_hardpy/reporter/hook_reporter.py +307 -0
- hardpy/pytest_hardpy/reporter/runner_reporter.py +29 -0
- hardpy/pytest_hardpy/result/__init__.py +10 -0
- hardpy/pytest_hardpy/result/couchdb_config.py +22 -0
- hardpy/pytest_hardpy/result/report_loader/__init__.py +10 -0
- hardpy/pytest_hardpy/result/report_loader/couchdb_loader.py +62 -0
- hardpy/pytest_hardpy/result/report_reader/__init__.py +0 -0
- hardpy/pytest_hardpy/result/report_reader/couchdb_reader.py +164 -0
- hardpy/pytest_hardpy/utils/__init__.py +19 -0
- hardpy/pytest_hardpy/utils/config_data.py +31 -0
- hardpy/pytest_hardpy/utils/const.py +29 -0
- hardpy/pytest_hardpy/utils/exception.py +16 -0
- hardpy/pytest_hardpy/utils/node_info.py +59 -0
- hardpy/pytest_hardpy/utils/progress_calculator.py +38 -0
- hardpy/pytest_hardpy/utils/singleton.py +23 -0
- hardpy-0.1.0.dist-info/METADATA +129 -0
- hardpy-0.1.0.dist-info/RECORD +71 -0
- hardpy-0.1.0.dist-info/WHEEL +4 -0
- hardpy-0.1.0.dist-info/entry_points.txt +5 -0
- hardpy-0.1.0.dist-info/licenses/LICENSE +674 -0
hardpy/__init__.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Copyright (c) 2024 Everypin
|
|
2
|
+
# GNU General Public License v3.0 (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
3
|
+
|
|
4
|
+
from hardpy.pytest_hardpy.plugin import HardpyPlugin
|
|
5
|
+
from hardpy.pytest_hardpy.result import CouchdbLoader
|
|
6
|
+
from hardpy.pytest_hardpy.utils import DuplicateSerialNumberError
|
|
7
|
+
from hardpy.pytest_hardpy.result.couchdb_config import CouchdbConfig
|
|
8
|
+
from hardpy.pytest_hardpy.pytest_call import (
|
|
9
|
+
get_current_report,
|
|
10
|
+
set_dut_info,
|
|
11
|
+
set_dut_serial_number,
|
|
12
|
+
set_stand_info,
|
|
13
|
+
set_case_artifact,
|
|
14
|
+
set_module_artifact,
|
|
15
|
+
set_run_artifact,
|
|
16
|
+
set_message,
|
|
17
|
+
set_driver_info,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
__all__ = [
|
|
21
|
+
"HardpyPlugin",
|
|
22
|
+
"CouchdbLoader",
|
|
23
|
+
"CouchdbConfig",
|
|
24
|
+
"DuplicateSerialNumberError",
|
|
25
|
+
"get_current_report",
|
|
26
|
+
"set_dut_info",
|
|
27
|
+
"set_dut_serial_number",
|
|
28
|
+
"set_stand_info",
|
|
29
|
+
"set_case_artifact",
|
|
30
|
+
"set_module_artifact",
|
|
31
|
+
"set_run_artifact",
|
|
32
|
+
"set_message",
|
|
33
|
+
"set_driver_info",
|
|
34
|
+
]
|
|
File without changes
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Copyright (c) 2024 Everypin
|
|
2
|
+
# GNU General Public License v3.0 (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
3
|
+
|
|
4
|
+
import os
|
|
5
|
+
|
|
6
|
+
from fastapi import FastAPI
|
|
7
|
+
from fastapi.staticfiles import StaticFiles
|
|
8
|
+
|
|
9
|
+
from hardpy.pytest_hardpy.utils import ConfigData, RunStatus as Status
|
|
10
|
+
from hardpy.pytest_hardpy.pytest_wrapper import PyTestWrapper
|
|
11
|
+
|
|
12
|
+
app = FastAPI()
|
|
13
|
+
app.state.pytest_wrp = PyTestWrapper()
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@app.get("/api/start")
|
|
17
|
+
def start_pytest():
|
|
18
|
+
"""Start pytest subprocess.
|
|
19
|
+
|
|
20
|
+
Returns:
|
|
21
|
+
dict[str, RunStatus]: run status
|
|
22
|
+
"""
|
|
23
|
+
if app.state.pytest_wrp.start():
|
|
24
|
+
return {"status": Status.STARTED}
|
|
25
|
+
return {"status": Status.BUSY}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
@app.get("/api/stop")
|
|
29
|
+
def stop_pytest():
|
|
30
|
+
"""Stop pytest subprocess.
|
|
31
|
+
|
|
32
|
+
Returns:
|
|
33
|
+
dict[str, RunStatus]: run status
|
|
34
|
+
"""
|
|
35
|
+
if app.state.pytest_wrp.stop():
|
|
36
|
+
return {"status": Status.STOPPED}
|
|
37
|
+
return {"status": Status.READY}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
@app.get("/api/collect")
|
|
41
|
+
def collect_pytest():
|
|
42
|
+
"""Collect pytest subprocess.
|
|
43
|
+
|
|
44
|
+
Returns:
|
|
45
|
+
dict[str, RunStatus]: run status
|
|
46
|
+
|
|
47
|
+
"""
|
|
48
|
+
if app.state.pytest_wrp.collect():
|
|
49
|
+
return {"status": Status.COLLECTED}
|
|
50
|
+
return {"status": Status.BUSY}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
@app.get("/api/couch")
|
|
54
|
+
def couch_connection():
|
|
55
|
+
"""Get couchdb connection string.
|
|
56
|
+
|
|
57
|
+
Returns:
|
|
58
|
+
dict[str, str, str]: couchdb connection string
|
|
59
|
+
"""
|
|
60
|
+
config_data = ConfigData()
|
|
61
|
+
|
|
62
|
+
return {
|
|
63
|
+
"connection_str": config_data.connection_string,
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
app.mount(
|
|
68
|
+
"/",
|
|
69
|
+
StaticFiles(directory=(os.path.dirname(__file__))+'/frontend/dist', html=True),
|
|
70
|
+
name="static",
|
|
71
|
+
)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"files": {
|
|
3
|
+
"main.css": "/static/css/main.e8a862f1.css",
|
|
4
|
+
"main.js": "/static/js/main.8ef63e9b.js",
|
|
5
|
+
"blueprint-icons-all-paths-loader.js": "/static/js/blueprint-icons-all-paths-loader.0aa89747.chunk.js",
|
|
6
|
+
"blueprint-icons-split-paths-by-size-loader.js": "/static/js/blueprint-icons-split-paths-by-size-loader.52a072d3.chunk.js",
|
|
7
|
+
"static/js/808.ce070002.chunk.js": "/static/js/808.ce070002.chunk.js",
|
|
8
|
+
"blueprint-icons-all-paths.js": "/static/js/blueprint-icons-all-paths.f63155c9.chunk.js",
|
|
9
|
+
"blueprint-icons-16px-paths.js": "/static/js/blueprint-icons-16px-paths.d605910e.chunk.js",
|
|
10
|
+
"blueprint-icons-20px-paths.js": "/static/js/blueprint-icons-20px-paths.7ee05cc8.chunk.js",
|
|
11
|
+
"static/media/blueprint-icons-20.svg?": "/static/media/blueprint-icons-20.6ae3791ee2d86fc228a6.svg",
|
|
12
|
+
"static/media/blueprint-icons-16.svg?": "/static/media/blueprint-icons-16.5c52b39c697f2323ce8b.svg",
|
|
13
|
+
"static/media/blueprint-icons-20.eot?": "/static/media/blueprint-icons-20.afbadb627d43b7857223.eot",
|
|
14
|
+
"static/media/blueprint-icons-20.ttf?": "/static/media/blueprint-icons-20.429cacb8accf72488451.ttf",
|
|
15
|
+
"static/media/blueprint-icons-16.eot?": "/static/media/blueprint-icons-16.520846c6beb41df528c8.eot",
|
|
16
|
+
"static/media/blueprint-icons-16.ttf?": "/static/media/blueprint-icons-16.e02ecf515378db143652.ttf",
|
|
17
|
+
"static/media/blueprint-icons-20.woff?": "/static/media/blueprint-icons-20.e857f5a5132b8bfa71a1.woff",
|
|
18
|
+
"static/media/blueprint-icons-16.woff?": "/static/media/blueprint-icons-16.84db1772f4bfb529f64f.woff",
|
|
19
|
+
"static/media/blueprint-icons-20.woff2?": "/static/media/blueprint-icons-20.8cecf62de42997e4d82f.woff2",
|
|
20
|
+
"static/media/blueprint-icons-16.woff2?": "/static/media/blueprint-icons-16.b67ee1736e20e37a3225.woff2",
|
|
21
|
+
"static/media/logo_smol.png": "/static/media/logo_smol.5b16f92447a4a9e80331.png",
|
|
22
|
+
"index.html": "/index.html",
|
|
23
|
+
"main.e8a862f1.css.map": "/static/css/main.e8a862f1.css.map",
|
|
24
|
+
"main.8ef63e9b.js.map": "/static/js/main.8ef63e9b.js.map",
|
|
25
|
+
"blueprint-icons-all-paths-loader.0aa89747.chunk.js.map": "/static/js/blueprint-icons-all-paths-loader.0aa89747.chunk.js.map",
|
|
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
|
+
"808.ce070002.chunk.js.map": "/static/js/808.ce070002.chunk.js.map",
|
|
28
|
+
"blueprint-icons-all-paths.f63155c9.chunk.js.map": "/static/js/blueprint-icons-all-paths.f63155c9.chunk.js.map",
|
|
29
|
+
"blueprint-icons-16px-paths.d605910e.chunk.js.map": "/static/js/blueprint-icons-16px-paths.d605910e.chunk.js.map",
|
|
30
|
+
"blueprint-icons-20px-paths.7ee05cc8.chunk.js.map": "/static/js/blueprint-icons-20px-paths.7ee05cc8.chunk.js.map"
|
|
31
|
+
},
|
|
32
|
+
"entrypoints": [
|
|
33
|
+
"static/css/main.e8a862f1.css",
|
|
34
|
+
"static/js/main.8ef63e9b.js"
|
|
35
|
+
]
|
|
36
|
+
}
|
|
Binary file
|
|
@@ -0,0 +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.8ef63e9b.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
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"short_name": "HardPy Operator Panel",
|
|
3
|
+
"name": "HardPy Operator Panel",
|
|
4
|
+
"icons": [
|
|
5
|
+
{
|
|
6
|
+
"src": "favicon.ico",
|
|
7
|
+
"sizes": "64x64 32x32 24x24 16x16",
|
|
8
|
+
"type": "image/x-icon"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"src": "logo192.png",
|
|
12
|
+
"type": "image/png",
|
|
13
|
+
"sizes": "192x192"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"src": "logo512.png",
|
|
17
|
+
"type": "image/png",
|
|
18
|
+
"sizes": "512x512"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"start_url": ".",
|
|
22
|
+
"display": "standalone",
|
|
23
|
+
"theme_color": "#000000",
|
|
24
|
+
"background_color": "#ffffff"
|
|
25
|
+
}
|