pam-python 0.1.27__tar.gz → 0.1.29__tar.gz
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.
- {pam_python-0.1.27 → pam_python-0.1.29}/PKG-INFO +1 -1
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/cli.py +2 -5
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/templates/service/service.test.tmpl +1 -2
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/templates/service/service_class.tmpl +0 -4
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/tester_task.py +6 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam_python.egg-info/PKG-INFO +1 -1
- {pam_python-0.1.27 → pam_python-0.1.29}/setup.py +1 -1
- {pam_python-0.1.27 → pam_python-0.1.29}/LICENSE.txt +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/README.md +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/__init__.py +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/api.py +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/interface_task_manager.py +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/models/__init__.py +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/models/request_command.py +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/server.py +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/service.py +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/sqlite.py +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/task_manager.py +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/temp_file_utils.py +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/templates/buildcmd/pamb +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/templates/buildcmd/pamb-base.sh +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/templates/docker/Dockerfile +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/templates/init/dockerignore.tmpl +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/templates/init/gitignore.tmpl +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/templates/init/main.tmpl +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/templates/init/pylintrc.tmpl +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/templates/init/run_unit_test.bat +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/templates/init/run_unit_test.ps1 +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/templates/init/run_unit_test.sh +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/templates/service/functions.tmpl +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/templates/service/service.yaml +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam/utils.py +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam_python.egg-info/SOURCES.txt +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam_python.egg-info/dependency_links.txt +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam_python.egg-info/entry_points.txt +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam_python.egg-info/requires.txt +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/pam_python.egg-info/top_level.txt +0 -0
- {pam_python-0.1.27 → pam_python-0.1.29}/setup.cfg +0 -0
|
@@ -3,8 +3,7 @@ import sys
|
|
|
3
3
|
import re
|
|
4
4
|
import shutil
|
|
5
5
|
import subprocess
|
|
6
|
-
import
|
|
7
|
-
|
|
6
|
+
import importlib.resources as resources
|
|
8
7
|
|
|
9
8
|
def main():
|
|
10
9
|
args = sys.argv[1:]
|
|
@@ -40,13 +39,11 @@ def to_pascal_case(input_string: str) -> str:
|
|
|
40
39
|
|
|
41
40
|
return pascal_case
|
|
42
41
|
|
|
43
|
-
|
|
44
42
|
def cpy(src, dest):
|
|
45
|
-
template_dir =
|
|
43
|
+
template_dir = resources.files("pam") / "templates"
|
|
46
44
|
src_file = os.path.join(template_dir, src)
|
|
47
45
|
shutil.copy(src_file, dest)
|
|
48
46
|
|
|
49
|
-
|
|
50
47
|
def replace_template_content(service_name, class_name, file_name):
|
|
51
48
|
file_path = os.path.join(service_name, file_name)
|
|
52
49
|
with open(file_path, 'r+', encoding='utf-8') as file:
|
|
@@ -11,8 +11,6 @@ class #CLASS_NAME#(Service):
|
|
|
11
11
|
def __init__(self, task_manager, req):
|
|
12
12
|
super().__init__(task_manager, req)
|
|
13
13
|
|
|
14
|
-
self.is_finished = False
|
|
15
|
-
|
|
16
14
|
def on_start(self):
|
|
17
15
|
log("on_start")
|
|
18
16
|
|
|
@@ -43,8 +41,6 @@ class #CLASS_NAME#(Service):
|
|
|
43
41
|
report_name = "#CLASS_NAME#_report1"
|
|
44
42
|
self._upload_report(report_name, report_df)
|
|
45
43
|
|
|
46
|
-
self.is_finished = True
|
|
47
|
-
|
|
48
44
|
self._exit()
|
|
49
45
|
|
|
50
46
|
def __process_data(self, input_files):
|
|
@@ -23,6 +23,7 @@ class TesterTask(ITaskManager):
|
|
|
23
23
|
self.upload_sqlite_callback: Optional[UploadSqliteCallbackType] = None
|
|
24
24
|
self.upload_result_callback: Optional[UploadResultCallbackType] = None
|
|
25
25
|
self.upload_report_callback: Optional[UploadReportCallbackType] = None
|
|
26
|
+
self.is_exit = False
|
|
26
27
|
|
|
27
28
|
def set_on_request_data(self, request_data_callback: RequestDataCallbackType):
|
|
28
29
|
"""
|
|
@@ -73,8 +74,13 @@ class TesterTask(ITaskManager):
|
|
|
73
74
|
pass
|
|
74
75
|
|
|
75
76
|
def service_exit(self, service: Service):
|
|
77
|
+
self.is_exit = True
|
|
76
78
|
print(f"{service.request.service_name} Exit.")
|
|
77
79
|
|
|
80
|
+
def wait_for_task_done(self):
|
|
81
|
+
while not self.is_exit:
|
|
82
|
+
pass
|
|
83
|
+
|
|
78
84
|
def service_request_data(self, service: Service, page: str):
|
|
79
85
|
"""
|
|
80
86
|
Simulate a service data request.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|