hardpy 0.5.1__py3-none-any.whl → 0.6.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 +10 -0
- hardpy/cli/__init__.py +0 -0
- hardpy/cli/cli.py +145 -0
- hardpy/cli/template.py +220 -0
- hardpy/common/__init__.py +0 -0
- hardpy/common/config.py +159 -0
- hardpy/hardpy_panel/api.py +49 -6
- hardpy/hardpy_panel/frontend/dist/asset-manifest.json +3 -3
- hardpy/hardpy_panel/frontend/dist/index.html +1 -1
- hardpy/hardpy_panel/frontend/dist/static/js/main.7c954faf.js +3 -0
- hardpy/hardpy_panel/frontend/dist/static/js/main.7c954faf.js.map +1 -0
- hardpy/pytest_hardpy/db/base_connector.py +7 -1
- hardpy/pytest_hardpy/db/base_server.py +4 -4
- hardpy/pytest_hardpy/db/base_store.py +13 -3
- hardpy/pytest_hardpy/db/const.py +3 -0
- hardpy/pytest_hardpy/db/schema.py +47 -11
- hardpy/pytest_hardpy/db/statestore.py +11 -0
- hardpy/pytest_hardpy/plugin.py +93 -33
- hardpy/pytest_hardpy/pytest_call.py +65 -5
- hardpy/pytest_hardpy/pytest_wrapper.py +62 -60
- hardpy/pytest_hardpy/reporter/base.py +1 -1
- hardpy/pytest_hardpy/reporter/hook_reporter.py +7 -3
- hardpy/pytest_hardpy/result/report_loader/couchdb_loader.py +3 -2
- hardpy/pytest_hardpy/result/report_reader/couchdb_reader.py +2 -2
- hardpy/pytest_hardpy/utils/__init__.py +7 -4
- hardpy/pytest_hardpy/utils/connection_data.py +17 -0
- hardpy/pytest_hardpy/utils/const.py +4 -14
- hardpy/pytest_hardpy/utils/dialog_box.py +1 -1
- hardpy/pytest_hardpy/utils/exception.py +14 -0
- hardpy/pytest_hardpy/utils/node_info.py +1 -1
- hardpy/pytest_hardpy/utils/progress_calculator.py +1 -1
- hardpy/pytest_hardpy/utils/singleton.py +1 -1
- {hardpy-0.5.1.dist-info → hardpy-0.6.1.dist-info}/METADATA +25 -57
- {hardpy-0.5.1.dist-info → hardpy-0.6.1.dist-info}/RECORD +38 -34
- {hardpy-0.5.1.dist-info → hardpy-0.6.1.dist-info}/entry_points.txt +1 -1
- hardpy/hardpy_panel/frontend/dist/static/js/main.da686f40.js +0 -3
- hardpy/hardpy_panel/frontend/dist/static/js/main.da686f40.js.map +0 -1
- hardpy/hardpy_panel/runner.py +0 -54
- hardpy/pytest_hardpy/utils/config_data.py +0 -35
- /hardpy/hardpy_panel/frontend/dist/static/js/{main.da686f40.js.LICENSE.txt → main.7c954faf.js.LICENSE.txt} +0 -0
- {hardpy-0.5.1.dist-info → hardpy-0.6.1.dist-info}/WHEEL +0 -0
- {hardpy-0.5.1.dist-info → hardpy-0.6.1.dist-info}/licenses/LICENSE +0 -0
hardpy/hardpy_panel/runner.py
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
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 sys
|
|
5
|
-
from argparse import ArgumentParser
|
|
6
|
-
from pathlib import Path
|
|
7
|
-
|
|
8
|
-
from uvicorn import run as uvicorn_run
|
|
9
|
-
|
|
10
|
-
from hardpy.pytest_hardpy.utils import ConfigData
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def run():
|
|
14
|
-
"""Start server for frontend."""
|
|
15
|
-
config = ConfigData()
|
|
16
|
-
parser = ArgumentParser(description="Usage: hardpy-panel [OPTION]... [PATH]")
|
|
17
|
-
# fmt: off
|
|
18
|
-
parser.add_argument("-dbu", "--db_user", default=config.db_user, help="database user") # noqa: E501
|
|
19
|
-
parser.add_argument("-dbpw", "--db_pswd", default=config.db_pswd, help="database user password") # noqa: E501
|
|
20
|
-
parser.add_argument("-dbp", "--db_port", type=int, default=config.db_port, help="database port number") # noqa: E501
|
|
21
|
-
parser.add_argument("-dbh", "--db_host", type=str, default=config.db_host, help="database hostname") # noqa: E501
|
|
22
|
-
parser.add_argument("-wh", "--web_host", type=str, default=config.web_host, help="web operator panel hostname") # noqa: E501
|
|
23
|
-
parser.add_argument("-wp", "--web_port", type=str, default=config.web_port, help="web operator panel port") # noqa: E501
|
|
24
|
-
parser.add_argument("-sp", "--sck_port", type=int, default=config.socket_port, help="internal socket port") # noqa: E501
|
|
25
|
-
parser.add_argument("-sa", "--sck_addr", type=int, default=config.socket_port, help="internal socket address") # noqa: E501
|
|
26
|
-
parser.add_argument("path", type=str, nargs='?', help="path to test directory")
|
|
27
|
-
# fmt: on
|
|
28
|
-
|
|
29
|
-
args = parser.parse_args()
|
|
30
|
-
|
|
31
|
-
config.db_user = args.db_user
|
|
32
|
-
config.db_pswd = args.db_pswd
|
|
33
|
-
config.db_port = args.db_port
|
|
34
|
-
config.db_host = args.db_host
|
|
35
|
-
config.web_host = args.web_host
|
|
36
|
-
config.web_port = args.web_port
|
|
37
|
-
|
|
38
|
-
path = Path(args.path) if args.path else Path.cwd()
|
|
39
|
-
|
|
40
|
-
config.tests_dir = path
|
|
41
|
-
|
|
42
|
-
if not config.tests_dir.exists():
|
|
43
|
-
print(f"Directory not found: {path}")
|
|
44
|
-
sys.exit()
|
|
45
|
-
|
|
46
|
-
uvicorn_run(
|
|
47
|
-
"hardpy.hardpy_panel.api:app",
|
|
48
|
-
host=config.web_host,
|
|
49
|
-
port=config.web_port,
|
|
50
|
-
log_level="critical",
|
|
51
|
-
)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
run()
|
|
@@ -1,35 +0,0 @@
|
|
|
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 socket import gethostname
|
|
5
|
-
from pathlib import Path
|
|
6
|
-
|
|
7
|
-
from hardpy.pytest_hardpy.utils.singleton import Singleton
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class ConfigData(Singleton):
|
|
11
|
-
"""Web connection data storage."""
|
|
12
|
-
|
|
13
|
-
def __init__(self):
|
|
14
|
-
if not self._initialized:
|
|
15
|
-
self.db_host: str = "localhost"
|
|
16
|
-
self.db_user: str = "dev"
|
|
17
|
-
self.db_pswd: str = "dev"
|
|
18
|
-
self.db_port: int = 5984
|
|
19
|
-
self.web_host: str = "0.0.0.0"
|
|
20
|
-
self.web_port: int = 8000
|
|
21
|
-
self.tests_dir = Path.cwd()
|
|
22
|
-
self.socket_port: int = 6525
|
|
23
|
-
self.socket_addr: str = gethostname()
|
|
24
|
-
self._initialized = True
|
|
25
|
-
|
|
26
|
-
@property
|
|
27
|
-
def connection_string(self) -> str:
|
|
28
|
-
"""Get couchdb connection string.
|
|
29
|
-
|
|
30
|
-
Returns:
|
|
31
|
-
str: couchdb connection string
|
|
32
|
-
"""
|
|
33
|
-
credentials = f"{self.db_user}:{self.db_pswd}"
|
|
34
|
-
uri = f"{self.db_host}:{str(self.db_port)}" # noqa: WPS237
|
|
35
|
-
return f"http://{credentials}@{uri}/"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|