pypeline-runner 1.9.1__py3-none-any.whl → 1.11.0__py3-none-any.whl

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.
pypeline/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.9.1"
1
+ __version__ = "1.11.0"
@@ -55,3 +55,6 @@ class CreateVEnv(PipelineStep[ExecutionContext]):
55
55
 
56
56
  def update_execution_context(self) -> None:
57
57
  pass
58
+
59
+ def get_needs_dependency_management(self) -> bool:
60
+ return False
@@ -0,0 +1,59 @@
1
+ from pathlib import Path
2
+ from typing import Dict, List
3
+
4
+ from py_app_dev.core.env_setup_scripts import BatEnvSetupScriptGenerator, Ps1EnvSetupScriptGenerator
5
+ from py_app_dev.core.logging import logger
6
+
7
+ from pypeline.domain.execution_context import ExecutionContext
8
+ from pypeline.domain.pipeline import PipelineStep
9
+
10
+
11
+ def read_dot_env_file(dot_env_file: Path) -> Dict[str, str]:
12
+ """Reads a .env file and returns a dictionary of environment variables."""
13
+ env_vars = {}
14
+ with dot_env_file.open("r") as f:
15
+ for line in f:
16
+ line = line.strip()
17
+ if line and not line.startswith("#"):
18
+ key, value = line.split("=", 1)
19
+ env_vars[key.strip()] = value.strip().strip('"').strip("'")
20
+ return env_vars
21
+
22
+
23
+ class GenerateEnvSetupScript(PipelineStep[ExecutionContext]):
24
+ def run(self) -> None:
25
+ logger.info(f"Generating environment setup scripts under {self.output_dir} ...")
26
+ # Read the .env file and set up the environment variables
27
+ dot_env_file = self.execution_context.project_root_dir.joinpath(".env")
28
+ if dot_env_file.exists():
29
+ logger.debug(f"Reading .env file: {dot_env_file}")
30
+ env_vars = read_dot_env_file(dot_env_file)
31
+ else:
32
+ logger.warning(f".env file not found: {dot_env_file}")
33
+ env_vars = {}
34
+ # Generate the environment setup scripts
35
+ BatEnvSetupScriptGenerator(
36
+ install_dirs=self.execution_context.install_dirs,
37
+ environment=env_vars,
38
+ output_file=self.output_dir.joinpath("env_setup.bat"),
39
+ ).to_file()
40
+ Ps1EnvSetupScriptGenerator(
41
+ install_dirs=self.execution_context.install_dirs,
42
+ environment=env_vars,
43
+ output_file=self.output_dir.joinpath("env_setup.ps1"),
44
+ ).to_file()
45
+
46
+ def get_inputs(self) -> List[Path]:
47
+ return []
48
+
49
+ def get_outputs(self) -> List[Path]:
50
+ return []
51
+
52
+ def get_name(self) -> str:
53
+ return self.__class__.__name__
54
+
55
+ def update_execution_context(self) -> None:
56
+ pass
57
+
58
+ def get_needs_dependency_management(self) -> bool:
59
+ return False
@@ -68,7 +68,9 @@ class ScoopInstall(PipelineStep[ExecutionContext]):
68
68
  def run(self) -> int:
69
69
  self.logger.debug(f"Run {self.get_name()} step. Output dir: {self.output_dir}")
70
70
  installed_apps = create_scoop_wrapper().install(self.scoop_file)
71
+ self.logger.debug("Installed apps:")
71
72
  for app in installed_apps:
73
+ self.logger.debug(f" - {app.name} ({app.version})")
72
74
  self.install_dirs.extend(app.get_all_required_paths())
73
75
  self.execution_info.to_json_file(self.execution_info_file)
74
76
  return 0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pypeline-runner
3
- Version: 1.9.1
3
+ Version: 1.11.0
4
4
  Summary: Configure and execute pipelines with Python (similar to GitHub workflows or Jenkins pipelines).
5
5
  License: MIT
6
6
  Author: cuinixam
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: Programming Language :: Python :: 3.12
18
18
  Classifier: Programming Language :: Python :: 3.13
19
19
  Classifier: Topic :: Software Development :: Libraries
20
- Requires-Dist: py-app-dev (>=2.5,<3.0)
20
+ Requires-Dist: py-app-dev (>=2.10,<3.0)
21
21
  Requires-Dist: pyyaml (>=6.0,<7.0)
22
22
  Requires-Dist: typer (>=0,<1)
23
23
  Project-URL: Bug Tracker, https://github.com/cuinixam/pypeline/issues
@@ -1,4 +1,4 @@
1
- pypeline/__init__.py,sha256=zLfYDL3qj0evR4WN5tYKfgr6-_YC5xhqrm09sbhWoQQ,22
1
+ pypeline/__init__.py,sha256=uTVPjS5n_41_n-e8UW1W9n8Wt-3YLQI1WS0r4xGphOk,23
2
2
  pypeline/__run.py,sha256=TCdaX05Qm3g8T4QYryKB25Xxf0L5Km7hFOHe1mK9vI0,350
3
3
  pypeline/domain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  pypeline/domain/artifacts.py,sha256=5k7cVfHhLmvWXNuHKxXb9ca4Lxu0JytGQqazENCeKEU,1404
@@ -22,11 +22,12 @@ pypeline/main.py,sha256=Xk92H0z7z-WnrC6qdSrD5xHlTN65WDc64lSs6M4Jn_g,3324
22
22
  pypeline/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
23
  pypeline/pypeline.py,sha256=-mquLfFlEvESk-HORhvjRMESIzdlVAgBLPjwUDOPLqg,7452
24
24
  pypeline/steps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
- pypeline/steps/create_venv.py,sha256=xCc73Hk62bbuJIM3btvapuoWeQy_Se5MsgffokYc-r0,2429
26
- pypeline/steps/scoop_install.py,sha256=_YdoCMXLON0eIwck8PJOcNhayx_ka1krBAidw_oRuFE,3373
25
+ pypeline/steps/create_venv.py,sha256=sajEl43Yqcd1f0BN9lZOhm93UIRXj4Qx4TdAOSxLkTU,2509
26
+ pypeline/steps/env_setup_script.py,sha256=j6wrrnZSXXu1fq01zUdgiFBTTlpR4XXl_uMWwVCcQSI,2221
27
+ pypeline/steps/scoop_install.py,sha256=TIrU2hPCS3SzHc2_L2A2EgGFkTQIGdrconDUeNkMx64,3484
27
28
  pypeline/steps/west_install.py,sha256=hPyr28ksdKsQ0tv0gMNytzupgk1IgjN9CpmaBdX5zps,1947
28
- pypeline_runner-1.9.1.dist-info/LICENSE,sha256=sKxdoqSmW9ezvPvt0ZGJbneyA0SBcm0GiqzTv2jN230,1066
29
- pypeline_runner-1.9.1.dist-info/METADATA,sha256=5yd_A34BdGORIoURRoc4Oa743KDjVUk1dUPfQ_lY4ns,7551
30
- pypeline_runner-1.9.1.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
31
- pypeline_runner-1.9.1.dist-info/entry_points.txt,sha256=pe1u0uuhPI_yeQ0KjEw6jK-EvQfPcZwBSajgbAdKz1o,47
32
- pypeline_runner-1.9.1.dist-info/RECORD,,
29
+ pypeline_runner-1.11.0.dist-info/LICENSE,sha256=sKxdoqSmW9ezvPvt0ZGJbneyA0SBcm0GiqzTv2jN230,1066
30
+ pypeline_runner-1.11.0.dist-info/METADATA,sha256=ggajX1hHht_OzArfOo-AskPyZN2aum8z6rExafdgYuw,7553
31
+ pypeline_runner-1.11.0.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
32
+ pypeline_runner-1.11.0.dist-info/entry_points.txt,sha256=pe1u0uuhPI_yeQ0KjEw6jK-EvQfPcZwBSajgbAdKz1o,47
33
+ pypeline_runner-1.11.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.1
2
+ Generator: poetry-core 2.1.2
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any