pam-python 0.1.12__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.
Files changed (35) hide show
  1. {pam_python-0.1.12/pam_python.egg-info → pam_python-0.1.13}/PKG-INFO +1 -1
  2. {pam_python-0.1.12 → pam_python-0.1.13}/pam/cli.py +2 -34
  3. pam_python-0.1.13/pam/templates/init/run_test.sh +1 -0
  4. {pam_python-0.1.12 → pam_python-0.1.13/pam_python.egg-info}/PKG-INFO +1 -1
  5. {pam_python-0.1.12 → pam_python-0.1.13}/pam_python.egg-info/SOURCES.txt +1 -0
  6. {pam_python-0.1.12 → pam_python-0.1.13}/setup.py +1 -1
  7. {pam_python-0.1.12 → pam_python-0.1.13}/LICENSE.txt +0 -0
  8. {pam_python-0.1.12 → pam_python-0.1.13}/README.md +0 -0
  9. {pam_python-0.1.12 → pam_python-0.1.13}/pam/__init__.py +0 -0
  10. {pam_python-0.1.12 → pam_python-0.1.13}/pam/api.py +0 -0
  11. {pam_python-0.1.12 → pam_python-0.1.13}/pam/interface_task_manager.py +0 -0
  12. {pam_python-0.1.12 → pam_python-0.1.13}/pam/models/__init__.py +0 -0
  13. {pam_python-0.1.12 → pam_python-0.1.13}/pam/models/request_command.py +0 -0
  14. {pam_python-0.1.12 → pam_python-0.1.13}/pam/server.py +0 -0
  15. {pam_python-0.1.12 → pam_python-0.1.13}/pam/service.py +0 -0
  16. {pam_python-0.1.12 → pam_python-0.1.13}/pam/task_manager.py +0 -0
  17. {pam_python-0.1.12 → pam_python-0.1.13}/pam/temp_file_utils.py +0 -0
  18. {pam_python-0.1.12 → pam_python-0.1.13}/pam/templates/buildcmd/pamb +0 -0
  19. {pam_python-0.1.12 → pam_python-0.1.13}/pam/templates/buildcmd/pamb-base.sh +0 -0
  20. {pam_python-0.1.12 → pam_python-0.1.13}/pam/templates/docker/Dockerfile +0 -0
  21. {pam_python-0.1.12 → pam_python-0.1.13}/pam/templates/init/dockerignore.tmpl +0 -0
  22. {pam_python-0.1.12 → pam_python-0.1.13}/pam/templates/init/gitignore.tmpl +0 -0
  23. {pam_python-0.1.12 → pam_python-0.1.13}/pam/templates/init/main.tmpl +0 -0
  24. {pam_python-0.1.12 → pam_python-0.1.13}/pam/templates/init/pylintrc.tmpl +0 -0
  25. {pam_python-0.1.12 → pam_python-0.1.13}/pam/templates/service/functions.tmpl +0 -0
  26. {pam_python-0.1.12 → pam_python-0.1.13}/pam/templates/service/service.test.tmpl +0 -0
  27. {pam_python-0.1.12 → pam_python-0.1.13}/pam/templates/service/service.yaml +0 -0
  28. {pam_python-0.1.12 → pam_python-0.1.13}/pam/templates/service/service_class.tmpl +0 -0
  29. {pam_python-0.1.12 → pam_python-0.1.13}/pam/tester_task.py +0 -0
  30. {pam_python-0.1.12 → pam_python-0.1.13}/pam/utils.py +0 -0
  31. {pam_python-0.1.12 → pam_python-0.1.13}/pam_python.egg-info/dependency_links.txt +0 -0
  32. {pam_python-0.1.12 → pam_python-0.1.13}/pam_python.egg-info/entry_points.txt +0 -0
  33. {pam_python-0.1.12 → pam_python-0.1.13}/pam_python.egg-info/requires.txt +0 -0
  34. {pam_python-0.1.12 → pam_python-0.1.13}/pam_python.egg-info/top_level.txt +0 -0
  35. {pam_python-0.1.12 → 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.12
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
@@ -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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pam-python
3
- Version: 0.1.12
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
@@ -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.12",
5
+ version="0.1.13",
6
6
  author="Narongrit Kanhanoi",
7
7
  author_email="narongrit@pams.ai",
8
8
  description="Pam Python Library",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes