pam-python 0.1.11__tar.gz → 0.1.13__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.11/pam_python.egg-info → pam_python-0.1.13}/PKG-INFO +2 -1
- {pam_python-0.1.11 → pam_python-0.1.13}/pam/cli.py +2 -34
- pam_python-0.1.13/pam/templates/init/run_test.sh +1 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam/templates/service/service.test.tmpl +2 -2
- {pam_python-0.1.11 → pam_python-0.1.13/pam_python.egg-info}/PKG-INFO +2 -1
- {pam_python-0.1.11 → pam_python-0.1.13}/pam_python.egg-info/SOURCES.txt +1 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam_python.egg-info/requires.txt +1 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/setup.py +3 -2
- {pam_python-0.1.11 → pam_python-0.1.13}/LICENSE.txt +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/README.md +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam/__init__.py +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam/api.py +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam/interface_task_manager.py +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam/models/__init__.py +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam/models/request_command.py +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam/server.py +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam/service.py +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam/task_manager.py +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam/temp_file_utils.py +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam/templates/buildcmd/pamb +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam/templates/buildcmd/pamb-base.sh +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam/templates/docker/Dockerfile +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam/templates/init/dockerignore.tmpl +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam/templates/init/gitignore.tmpl +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam/templates/init/main.tmpl +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam/templates/init/pylintrc.tmpl +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam/templates/service/functions.tmpl +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam/templates/service/service.yaml +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam/templates/service/service_class.tmpl +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam/tester_task.py +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam/utils.py +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam_python.egg-info/dependency_links.txt +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam_python.egg-info/entry_points.txt +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/pam_python.egg-info/top_level.txt +0 -0
- {pam_python-0.1.11 → pam_python-0.1.13}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: pam-python
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.13
|
|
4
4
|
Summary: Pam Python Library
|
|
5
5
|
Home-page: https://github.com/heart/pam-python
|
|
6
6
|
Author: Narongrit Kanhanoi
|
|
@@ -25,6 +25,7 @@ Requires-Dist: dask>=2024.12.1
|
|
|
25
25
|
Requires-Dist: dask-expr>=1.1.21
|
|
26
26
|
Requires-Dist: requests>=2.32.3
|
|
27
27
|
Requires-Dist: gunicorn>=23.0.0
|
|
28
|
+
Requires-Dist: pyarrow>=19.0.1
|
|
28
29
|
Dynamic: author
|
|
29
30
|
Dynamic: author-email
|
|
30
31
|
Dynamic: classifier
|
|
@@ -2,7 +2,6 @@ import os
|
|
|
2
2
|
import sys
|
|
3
3
|
import re
|
|
4
4
|
import shutil
|
|
5
|
-
import glob
|
|
6
5
|
import subprocess
|
|
7
6
|
import pkg_resources
|
|
8
7
|
|
|
@@ -21,42 +20,9 @@ def main():
|
|
|
21
20
|
if create_type == "service":
|
|
22
21
|
name = args[2]
|
|
23
22
|
create_service(name)
|
|
24
|
-
elif cmd == "test":
|
|
25
|
-
if len(args) < 2:
|
|
26
|
-
print("Usage: pam test <modulename>")
|
|
27
|
-
return
|
|
28
|
-
module_name = args[1]
|
|
29
|
-
test_module(module_name)
|
|
30
23
|
else:
|
|
31
24
|
print(f"Unknown command: {args.command}")
|
|
32
25
|
|
|
33
|
-
def test_module(module_name):
|
|
34
|
-
"""Run all test files matching '*.test.py' in the specified module directory."""
|
|
35
|
-
# Locate all test files in the module directory
|
|
36
|
-
test_files = glob.glob(f"{module_name}/*.test.py")
|
|
37
|
-
|
|
38
|
-
if not test_files:
|
|
39
|
-
print(f"Error: No test files found in module '{module_name}' (expected '*.test.py').")
|
|
40
|
-
return
|
|
41
|
-
|
|
42
|
-
print(f"Found {len(test_files)} test file(s) in '{module_name}':")
|
|
43
|
-
for test_file in test_files:
|
|
44
|
-
print(f" - {test_file}")
|
|
45
|
-
|
|
46
|
-
# Run each test file
|
|
47
|
-
for test_file in test_files:
|
|
48
|
-
print(f"\nRunning tests in {test_file}...")
|
|
49
|
-
result = subprocess.run([sys.executable, test_file], capture_output=True, text=True, check=True)
|
|
50
|
-
|
|
51
|
-
print("\nTest Output:")
|
|
52
|
-
print(result.stdout)
|
|
53
|
-
if result.stderr:
|
|
54
|
-
print("\nErrors:")
|
|
55
|
-
print(result.stderr)
|
|
56
|
-
print("-" * 40) # Separator for clarity
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
26
|
def to_pascal_case(input_string: str) -> str:
|
|
61
27
|
"""
|
|
62
28
|
Convert a string to PascalCase.
|
|
@@ -122,6 +88,8 @@ def init_project():
|
|
|
122
88
|
cpy("init/pylintrc.tmpl", ".pylintrc")
|
|
123
89
|
cpy("init/gitignore.tmpl", ".gitignore")
|
|
124
90
|
cpy("init/dockerignore.tmpl", ".dockerignore")
|
|
91
|
+
cpy("init/run_test.sh", "run_unit_test.sh")
|
|
92
|
+
|
|
125
93
|
|
|
126
94
|
if not os.path.exists("requirements.txt"):
|
|
127
95
|
open("requirements.txt", 'a', encoding='utf-8').close()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
python -m unittest discover
|
|
@@ -20,7 +20,7 @@ TempfileUtils.temp_datasource_path = f"{MOCK_DIR}/app/data/data_sources"
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
# ==================== UTILITY FUNCTIONS ====================
|
|
23
|
-
def
|
|
23
|
+
def create_mock_csv(page, mockDir):
|
|
24
24
|
fake = Faker()
|
|
25
25
|
for i in range(page):
|
|
26
26
|
data = {
|
|
@@ -71,7 +71,7 @@ class TestService1(unittest.TestCase):
|
|
|
71
71
|
|
|
72
72
|
def setUp(self):
|
|
73
73
|
createMockDir(MOCK_DIR)
|
|
74
|
-
|
|
74
|
+
create_mock_csv(TOTAL_PAGES, MOCK_DIR)
|
|
75
75
|
|
|
76
76
|
self.testerTask = TesterTask()
|
|
77
77
|
self.testerTask.set_on_upload_result(on_upload_result)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: pam-python
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.13
|
|
4
4
|
Summary: Pam Python Library
|
|
5
5
|
Home-page: https://github.com/heart/pam-python
|
|
6
6
|
Author: Narongrit Kanhanoi
|
|
@@ -25,6 +25,7 @@ Requires-Dist: dask>=2024.12.1
|
|
|
25
25
|
Requires-Dist: dask-expr>=1.1.21
|
|
26
26
|
Requires-Dist: requests>=2.32.3
|
|
27
27
|
Requires-Dist: gunicorn>=23.0.0
|
|
28
|
+
Requires-Dist: pyarrow>=19.0.1
|
|
28
29
|
Dynamic: author
|
|
29
30
|
Dynamic: author-email
|
|
30
31
|
Dynamic: classifier
|
|
@@ -20,6 +20,7 @@ pam/templates/init/dockerignore.tmpl
|
|
|
20
20
|
pam/templates/init/gitignore.tmpl
|
|
21
21
|
pam/templates/init/main.tmpl
|
|
22
22
|
pam/templates/init/pylintrc.tmpl
|
|
23
|
+
pam/templates/init/run_test.sh
|
|
23
24
|
pam/templates/service/functions.tmpl
|
|
24
25
|
pam/templates/service/service.test.tmpl
|
|
25
26
|
pam/templates/service/service.yaml
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="pam-python",
|
|
5
|
-
version="0.1.
|
|
5
|
+
version="0.1.13",
|
|
6
6
|
author="Narongrit Kanhanoi",
|
|
7
7
|
author_email="narongrit@pams.ai",
|
|
8
8
|
description="Pam Python Library",
|
|
@@ -32,7 +32,8 @@ setup(
|
|
|
32
32
|
"dask>=2024.12.1",
|
|
33
33
|
"dask-expr>=1.1.21",
|
|
34
34
|
"requests>=2.32.3",
|
|
35
|
-
"gunicorn>=23.0.0"
|
|
35
|
+
"gunicorn>=23.0.0",
|
|
36
|
+
"pyarrow>=19.0.1"
|
|
36
37
|
],
|
|
37
38
|
entry_points={
|
|
38
39
|
"console_scripts": [
|
|
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
|