pilot.linkstec 0.0.8__tar.gz → 0.0.9__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.
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/PKG-INFO +1 -1
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/pyproject.toml +1 -1
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot/config/config_reader.py +9 -1
- pilot_linkstec-0.0.9/src/pilot/unit/impl/base_unit.py +73 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot.linkstec.egg-info/PKG-INFO +1 -1
- pilot_linkstec-0.0.8/src/pilot/unit/impl/base_unit.py +0 -40
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/LICENSE +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/README.md +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/setup.cfg +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot/__init__.py +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot/config/__init__.py +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot/control/__init__.py +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot/control/control_interface.py +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot/control/impl/__init__.py +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot/control/impl/base_controller.py +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot/conver/__init__.py +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot/conver/converfileEncodding.py +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot/conver/nkf_converter.py +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot/generater/__init__.py +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot/generater/vertexai.py +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot/job/__init__.py +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot/job/impl/__init__.py +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot/job/impl/base_job.py +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot/job/job_interface.py +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot/splitters/__init__.py +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot/splitters/cobolsplitter.py +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot/unit/__init__.py +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot/unit/impl/__init__.py +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot/unit/unit_interface.py +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot/util/__init__.py +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot/util/files.py +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot.linkstec.egg-info/SOURCES.txt +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot.linkstec.egg-info/dependency_links.txt +0 -0
- {pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot.linkstec.egg-info/top_level.txt +0 -0
|
@@ -11,6 +11,8 @@ class ConfigDTO:
|
|
|
11
11
|
project: str
|
|
12
12
|
steps: list[str]
|
|
13
13
|
skipsteps: list[str]
|
|
14
|
+
runsteps: list[str]
|
|
15
|
+
multisteps: list[str]
|
|
14
16
|
|
|
15
17
|
|
|
16
18
|
|
|
@@ -79,11 +81,17 @@ class ConfigReader:
|
|
|
79
81
|
steps = [s.strip() for s in steps_str.split(',')] if steps_str else []
|
|
80
82
|
skipsteps_str = self.get('DEFAULT', 'skipsteps', fallback='')
|
|
81
83
|
skipsteps = [s.strip() for s in skipsteps_str.split(',')] if skipsteps_str else []
|
|
84
|
+
runsteps_str = self.get('DEFAULT', 'runstep', fallback='')
|
|
85
|
+
runsteps = [s.strip() for s in runsteps_str.split(',')] if runsteps_str else []
|
|
86
|
+
multisteps_str = self.get('DEFAULT', 'multistep', fallback='')
|
|
87
|
+
multisteps = [s.strip() for s in multisteps_str.split(',')] if multisteps_str else []
|
|
82
88
|
|
|
83
89
|
return ConfigDTO(
|
|
84
90
|
work_space=work_space,
|
|
85
91
|
threads=threads,
|
|
86
92
|
project=project,
|
|
87
93
|
steps=steps,
|
|
88
|
-
skipsteps=skipsteps
|
|
94
|
+
skipsteps=skipsteps,
|
|
95
|
+
runsteps=runsteps,
|
|
96
|
+
multisteps=multisteps
|
|
89
97
|
)
|
|
@@ -0,0 +1,73 @@
|
|
|
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_multisteps = self.config_dto.multisteps
|
|
44
|
+
if step in unit_multisteps:
|
|
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
|
+
run_step(index + 1)
|
|
56
|
+
|
|
57
|
+
run_step(0)
|
|
58
|
+
|
|
59
|
+
def _run_jobs_in_step_dir(self, current_step_dir, step, index):
|
|
60
|
+
for dirpath, _, filenames in os.walk(current_step_dir):
|
|
61
|
+
for filename in filenames:
|
|
62
|
+
file_path = os.path.join(dirpath, filename)
|
|
63
|
+
job = self._init_job(step)
|
|
64
|
+
job.config_dto = self.config_dto
|
|
65
|
+
job.current_step = step
|
|
66
|
+
job.step_index = index
|
|
67
|
+
job.file_path = file_path
|
|
68
|
+
if self.job_need_run(job, filename, index):
|
|
69
|
+
job.run()
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def job_need_run(self, job:BaseJob,filename: str,index):
|
|
73
|
+
return True
|
|
@@ -1,40 +0,0 @@
|
|
|
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
|
|
6
|
-
|
|
7
|
-
class BaseUnit(UnitInterface):
|
|
8
|
-
config_dto = None
|
|
9
|
-
joblist = []
|
|
10
|
-
|
|
11
|
-
def __init__(self):
|
|
12
|
-
pass
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def _init_job(self,step):
|
|
16
|
-
return BaseJob()
|
|
17
|
-
|
|
18
|
-
def run(self):
|
|
19
|
-
steps = self.config_dto.steps
|
|
20
|
-
skipsteps = self.config_dto.skipsteps
|
|
21
|
-
for index, step in enumerate(steps):
|
|
22
|
-
if step in skipsteps:
|
|
23
|
-
continue
|
|
24
|
-
self._run_jobs_in_step_dir(self.config_dto.work_space+ "/" +step,step,index)
|
|
25
|
-
|
|
26
|
-
def _run_jobs_in_step_dir(self, current_step_dir, step,index):
|
|
27
|
-
for dirpath, _, filenames in os.walk(current_step_dir):
|
|
28
|
-
for filename in filenames:
|
|
29
|
-
file_path = os.path.join(dirpath, filename)
|
|
30
|
-
job = self._init_job(step)
|
|
31
|
-
job.config_dto = self.config_dto
|
|
32
|
-
job.current_step = step
|
|
33
|
-
job.step_index = index
|
|
34
|
-
job.file_path = file_path
|
|
35
|
-
if self.job_need_run(job,filename,index):
|
|
36
|
-
job.run()
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
def job_need_run(self, job:BaseJob,filename: str,index):
|
|
40
|
-
return True
|
|
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
|
{pilot_linkstec-0.0.8 → pilot_linkstec-0.0.9}/src/pilot.linkstec.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|