pilot.linkstec 0.0.10__tar.gz → 0.0.12__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.

Potentially problematic release.


This version of pilot.linkstec might be problematic. Click here for more details.

Files changed (35) hide show
  1. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/PKG-INFO +1 -1
  2. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/pyproject.toml +1 -1
  3. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot/config/config_reader.py +2 -2
  4. pilot_linkstec-0.0.12/src/pilot/control/impl/base_controller.py +56 -0
  5. pilot_linkstec-0.0.12/src/pilot/unit/impl/base_unit.py +36 -0
  6. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot.linkstec.egg-info/PKG-INFO +1 -1
  7. pilot_linkstec-0.0.10/src/pilot/control/impl/base_controller.py +0 -31
  8. pilot_linkstec-0.0.10/src/pilot/unit/impl/base_unit.py +0 -80
  9. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/LICENSE +0 -0
  10. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/README.md +0 -0
  11. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/setup.cfg +0 -0
  12. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot/__init__.py +0 -0
  13. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot/config/__init__.py +0 -0
  14. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot/control/__init__.py +0 -0
  15. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot/control/control_interface.py +0 -0
  16. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot/control/impl/__init__.py +0 -0
  17. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot/conver/__init__.py +0 -0
  18. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot/conver/converfileEncodding.py +0 -0
  19. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot/conver/nkf_converter.py +0 -0
  20. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot/generater/__init__.py +0 -0
  21. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot/generater/vertexai.py +0 -0
  22. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot/job/__init__.py +0 -0
  23. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot/job/impl/__init__.py +0 -0
  24. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot/job/impl/base_job.py +0 -0
  25. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot/job/job_interface.py +0 -0
  26. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot/splitters/__init__.py +0 -0
  27. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot/splitters/cobolsplitter.py +0 -0
  28. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot/unit/__init__.py +0 -0
  29. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot/unit/impl/__init__.py +0 -0
  30. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot/unit/unit_interface.py +0 -0
  31. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot/util/__init__.py +0 -0
  32. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot/util/files.py +0 -0
  33. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot.linkstec.egg-info/SOURCES.txt +0 -0
  34. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot.linkstec.egg-info/dependency_links.txt +0 -0
  35. {pilot_linkstec-0.0.10 → pilot_linkstec-0.0.12}/src/pilot.linkstec.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pilot.linkstec
3
- Version: 0.0.10
3
+ Version: 0.0.12
4
4
  Summary: pilot of the ship, a tool for managing and deploying Python projects.
5
5
  Author-email: wanglr <wanglr1980@gmail.com>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pilot.linkstec"
3
- version = "0.0.10"
3
+ version = "0.0.12"
4
4
  authors = [
5
5
  { name="wanglr", email="wanglr1980@gmail.com" },
6
6
  ]
@@ -81,9 +81,9 @@ class ConfigReader:
81
81
  steps = [s.strip() for s in steps_str.split(',')] if steps_str else []
82
82
  skipsteps_str = self.get('DEFAULT', 'skipsteps', fallback='')
83
83
  skipsteps = [s.strip() for s in skipsteps_str.split(',')] if skipsteps_str else []
84
- runsteps_str = self.get('DEFAULT', 'runstep', fallback='')
84
+ runsteps_str = self.get('DEFAULT', 'runsteps', fallback='')
85
85
  runsteps = [s.strip() for s in runsteps_str.split(',')] if runsteps_str else []
86
- multisteps_str = self.get('DEFAULT', 'multistep', fallback='')
86
+ multisteps_str = self.get('DEFAULT', 'multisteps', fallback='')
87
87
  multisteps = [s.strip() for s in multisteps_str.split(',')] if multisteps_str else []
88
88
 
89
89
  return ConfigDTO(
@@ -0,0 +1,56 @@
1
+ from concurrent.futures import ThreadPoolExecutor
2
+
3
+
4
+ from pilot.control.control_interface import ControlInterface
5
+ from pilot.unit.impl.base_unit import BaseUnit
6
+ from pilot.config.config_reader import ConfigReader
7
+
8
+
9
+ class BaseController(ControlInterface):
10
+
11
+ def __init__(self):
12
+ pass
13
+
14
+ def _init_unit(self):
15
+ return BaseUnit()
16
+
17
+ def run(self,configfile: str = None):
18
+ import time
19
+ config_dto = ConfigReader(configfile).get_dto()
20
+ unit = self._init_unit()
21
+ unit.config_dto = config_dto
22
+
23
+ steps = config_dto.steps
24
+ runsteps = config_dto.runsteps
25
+
26
+ def run_step(index):
27
+ if index >= len(steps):
28
+ return
29
+ step = steps[index]
30
+ if step in config_dto.skipsteps:
31
+ run_step(index + 1)
32
+ return
33
+
34
+ if len(runsteps) == 0:
35
+ pass
36
+ elif len(runsteps) != 0 and step not in runsteps:
37
+ run_step(index + 1)
38
+ return
39
+
40
+ max_workers = 1
41
+ if step in config_dto.multisteps:
42
+ max_workers = config_dto.threads
43
+
44
+ def step_worker():
45
+ unit.run(index)
46
+
47
+ with ThreadPoolExecutor(max_workers=max_workers) as executor:
48
+ futures = []
49
+ for _ in range(max_workers):
50
+ futures.append(executor.submit(step_worker))
51
+ time.sleep(0.5)
52
+ for future in futures:
53
+ future.result()
54
+ run_step(index + 1)
55
+
56
+ run_step(0)
@@ -0,0 +1,36 @@
1
+ import os
2
+
3
+ from pilot.unit.unit_interface import UnitInterface
4
+ from pilot.job.impl.base_job import BaseJob
5
+ from pilot.config.config_reader import ConfigReader, ConfigDTO # 追加
6
+
7
+ class BaseUnit(UnitInterface):
8
+ config_dto: ConfigDTO = None # 型アノテーションを追加
9
+ joblist = []
10
+
11
+ def __init__(self):
12
+ pass
13
+
14
+ def _init_job(self,step):
15
+ return BaseJob()
16
+
17
+ def run(self, index=0):
18
+ steps = self.config_dto.steps
19
+ step = steps[index]
20
+ current_step_dir = self.config_dto.work_space + "/" + step
21
+ self._run_jobs_in_step_dir(current_step_dir, step, index)
22
+
23
+ def _run_jobs_in_step_dir(self, current_step_dir, step, index):
24
+ for dirpath, _, filenames in os.walk(current_step_dir):
25
+ for filename in filenames:
26
+ file_path = os.path.join(dirpath, filename)
27
+ job = self._init_job(step)
28
+ job.config_dto = self.config_dto
29
+ job.current_step = step
30
+ job.step_index = index
31
+ job.file_path = file_path
32
+ if self.job_need_run(job, filename, index):
33
+ job.run()
34
+
35
+ def job_need_run(self, job:BaseJob,filename: str,index):
36
+ return True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pilot.linkstec
3
- Version: 0.0.10
3
+ Version: 0.0.12
4
4
  Summary: pilot of the ship, a tool for managing and deploying Python projects.
5
5
  Author-email: wanglr <wanglr1980@gmail.com>
6
6
  License-Expression: MIT
@@ -1,31 +0,0 @@
1
- from concurrent.futures import ThreadPoolExecutor
2
-
3
-
4
- from pilot.control.control_interface import ControlInterface
5
- from pilot.unit.impl.base_unit import BaseUnit
6
- from pilot.config.config_reader import ConfigReader
7
-
8
-
9
- class BaseController(ControlInterface):
10
-
11
- def __init__(self):
12
- pass
13
-
14
-
15
- def _init_unit(self):
16
- return BaseUnit()
17
-
18
- def run(self,configfile: str = None):
19
- import time
20
- config_dto = ConfigReader(configfile).get_dto()
21
- def worker():
22
- unit = self._init_unit()
23
- unit.config_dto = config_dto
24
- unit.run()
25
- with ThreadPoolExecutor(max_workers=config_dto.threads) as executor:
26
- futures = []
27
- for _ in range(config_dto.threads):
28
- futures.append(executor.submit(worker))
29
- time.sleep(0.2)
30
- for future in futures:
31
- future.result()
@@ -1,80 +0,0 @@
1
- import os
2
- from concurrent.futures import ThreadPoolExecutor
3
- import time
4
-
5
- from pilot.unit.unit_interface import UnitInterface
6
- from pilot.job.impl.base_job import BaseJob
7
- from pilot.config.config_reader import ConfigReader, ConfigDTO # 追加
8
-
9
- class BaseUnit(UnitInterface):
10
- config_dto: ConfigDTO = None # 型アノテーションを追加
11
- joblist = []
12
-
13
- def __init__(self):
14
- pass
15
-
16
-
17
- def _init_job(self,step):
18
- return BaseJob()
19
-
20
- def run(self):
21
- steps = self.config_dto.steps
22
- skipsteps = self.config_dto.skipsteps
23
-
24
- runsteps = self.config_dto.runsteps
25
-
26
- def run_step(index):
27
- if index >= len(steps):
28
- return
29
- step = steps[index]
30
- if step in skipsteps:
31
- run_step(index + 1)
32
- return
33
-
34
- if len(runsteps) == 0 :
35
- pass
36
- elif len(runsteps) != 0 and step not in runsteps:
37
- run_step(index + 1)
38
- return
39
-
40
- current_step_dir = self.config_dto.work_space + "/" + step
41
-
42
- max_workers = self.config_dto.threads
43
- unit_multiset = self.config_dto.multisteps
44
- if step in unit_multiset:
45
- max_workers = self.config_dto.threads
46
- else:
47
- max_workers = 1
48
- def step_worker():
49
- self._run_jobs_in_step_dir(current_step_dir, step, index)
50
-
51
- #with ThreadPoolExecutor(max_workers=max_workers) as executor:
52
- # future = executor.submit(step_worker)
53
- # future.result()
54
- # STEP完了後、次のSTEPを実行
55
- with ThreadPoolExecutor(max_workers=max_workers) as executor:
56
- futures = []
57
- for _ in range(max_workers):
58
- futures.append(executor.submit(step_worker))
59
- time.sleep(0.5)
60
- for future in futures:
61
- future.result()
62
- run_step(index + 1)
63
-
64
- run_step(0)
65
-
66
- def _run_jobs_in_step_dir(self, current_step_dir, step, index):
67
- for dirpath, _, filenames in os.walk(current_step_dir):
68
- for filename in filenames:
69
- file_path = os.path.join(dirpath, filename)
70
- job = self._init_job(step)
71
- job.config_dto = self.config_dto
72
- job.current_step = step
73
- job.step_index = index
74
- job.file_path = file_path
75
- if self.job_need_run(job, filename, index):
76
- job.run()
77
-
78
-
79
- def job_need_run(self, job:BaseJob,filename: str,index):
80
- return True
File without changes