pilot.linkstec 0.0.2__tar.gz → 0.0.4__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 (33) hide show
  1. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/PKG-INFO +1 -1
  2. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/pyproject.toml +1 -1
  3. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot/generater/vertexai.py +0 -1
  4. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot/job/impl/base_job.py +41 -1
  5. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot.linkstec.egg-info/PKG-INFO +1 -1
  6. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/LICENSE +0 -0
  7. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/README.md +0 -0
  8. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/setup.cfg +0 -0
  9. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot/__init__.py +0 -0
  10. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot/config/__init__.py +0 -0
  11. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot/config/config_reader.py +0 -0
  12. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot/control/__init__.py +0 -0
  13. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot/control/control_interface.py +0 -0
  14. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot/control/impl/__init__.py +0 -0
  15. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot/control/impl/base_controller.py +0 -0
  16. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot/conver/__init__.py +0 -0
  17. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot/conver/converfileEncodding.py +0 -0
  18. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot/conver/nkf_converter.py +0 -0
  19. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot/generater/__init__.py +0 -0
  20. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot/job/__init__.py +0 -0
  21. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot/job/impl/__init__.py +0 -0
  22. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot/job/job_interface.py +0 -0
  23. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot/splitters/__init__.py +0 -0
  24. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot/splitters/cobolsplitter.py +0 -0
  25. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot/unit/__init__.py +0 -0
  26. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot/unit/impl/__init__.py +0 -0
  27. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot/unit/impl/base_unit.py +0 -0
  28. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot/unit/unit_interface.py +0 -0
  29. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot/util/__init__.py +0 -0
  30. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot/util/files.py +0 -0
  31. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot.linkstec.egg-info/SOURCES.txt +0 -0
  32. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/src/pilot.linkstec.egg-info/dependency_links.txt +0 -0
  33. {pilot_linkstec-0.0.2 → pilot_linkstec-0.0.4}/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.2
3
+ Version: 0.0.4
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.2"
3
+ version = "0.0.4"
4
4
  authors = [
5
5
  { name="wanglr", email="wanglr1980@gmail.com" },
6
6
  ]
@@ -24,7 +24,6 @@ class VertexAISingleton:
24
24
  with self._lock:
25
25
  if not self._initialized:
26
26
  self.model = GenerativeModel(model_name)
27
- os.environ["TIKTOKEN_CACHE_DIR"] = r"D:\api"
28
27
  self.encoding = tiktoken.get_encoding("cl100k_base")
29
28
  self._initialized = True
30
29
 
@@ -260,11 +260,17 @@ class BaseJob(JobInterface):
260
260
  """
261
261
  return self.config_dto.work_space
262
262
 
263
- def copy_file_todo_trg_to_next_step(self, result_file):
263
+ def copy_file_and_todo_trg_to_next_step(self, result_file):
264
264
  self.create_current_step_end_trg_file_from_input(result_file)
265
265
  next_step_file = self.copy_input_file_to_next_step(result_file)
266
266
  self.create_next_step_todo_trg_file_from_input(next_step_file)
267
267
 
268
+
269
+ def copy_file_and_end_trg_to_next_step(self, result_file):
270
+ self.create_current_step_end_trg_file_from_input(result_file)
271
+ next_step_file = self.copy_input_file_to_next_step(result_file)
272
+ self.create_next_step_end_trg_file_from_input(next_step_file)
273
+
268
274
  def change_trg_file_to_end_in_file(self, file_name):
269
275
  """
270
276
  file_pathのディレクトリ配下に指定されたファイル名の.trgまたは.beginファイルが存在すれば、.endにリネームする。
@@ -286,3 +292,37 @@ class BaseJob(JobInterface):
286
292
  print(f"change_trg_file_to_end_in_file error: {trg_file}")
287
293
  return False
288
294
  return False
295
+
296
+
297
+
298
+ def create_next_step_end_trg_file_from_input(self, input_file_path):
299
+ """
300
+ input_file_pathで指定されたファイルをnext stepフォルダにコピーし、.trgファイルを生成する。
301
+ ファイルが既に存在する場合でも.trgファイルの作成を試行する。
302
+ """
303
+ if not input_file_path or not self.next_step:
304
+ return None
305
+
306
+ # ファイルをコピー(既存の場合はNoneが返される)
307
+ copied_file_path = self.copy_input_file_to_next_step(input_file_path)
308
+
309
+ # コピーが成功しなかった場合でも、対象ファイルパスを取得
310
+ if not copied_file_path:
311
+ base_dir = os.path.join(self.config_dto.work_space, self.current_step)
312
+ step_dir = os.path.join(self.config_dto.work_space, self.next_step)
313
+ rel_path = os.path.relpath(os.path.dirname(input_file_path), base_dir)
314
+ dest_dir = os.path.join(step_dir, rel_path)
315
+ base_file_name = os.path.basename(input_file_path)
316
+ copied_file_path = os.path.join(dest_dir, base_file_name)
317
+
318
+ # .trgファイルを作成
319
+ trg_file = copied_file_path + ".trg"
320
+ end_file = copied_file_path + ".end"
321
+ begin_file = copied_file_path + ".begin"
322
+
323
+ if not (os.path.exists(trg_file) or os.path.exists(end_file) or os.path.exists(begin_file)):
324
+ # 空ファイルとして.trgファイルを生成
325
+ open(end_file, 'w', encoding='utf-8').close()
326
+ return end_file
327
+
328
+ return None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pilot.linkstec
3
- Version: 0.0.2
3
+ Version: 0.0.4
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
File without changes
File without changes
File without changes