pypeline-runner 1.9.1__tar.gz → 1.11.0__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 (33) hide show
  1. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/PKG-INFO +2 -2
  2. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/pyproject.toml +2 -2
  3. pypeline_runner-1.11.0/src/pypeline/__init__.py +1 -0
  4. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/steps/create_venv.py +3 -0
  5. pypeline_runner-1.11.0/src/pypeline/steps/env_setup_script.py +59 -0
  6. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/steps/scoop_install.py +2 -0
  7. pypeline_runner-1.9.1/src/pypeline/__init__.py +0 -1
  8. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/LICENSE +0 -0
  9. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/README.md +0 -0
  10. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/__run.py +0 -0
  11. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/domain/__init__.py +0 -0
  12. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/domain/artifacts.py +0 -0
  13. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/domain/config.py +0 -0
  14. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/domain/execution_context.py +0 -0
  15. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/domain/pipeline.py +0 -0
  16. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/domain/project_slurper.py +0 -0
  17. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/kickstart/__init__.py +0 -0
  18. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/kickstart/create.py +0 -0
  19. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/kickstart/templates/project/.gitignore +0 -0
  20. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/kickstart/templates/project/bootstrap.ps1 +0 -0
  21. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/kickstart/templates/project/bootstrap.py +0 -0
  22. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/kickstart/templates/project/poetry.toml +0 -0
  23. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/kickstart/templates/project/pypeline.ps1 +0 -0
  24. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/kickstart/templates/project/pypeline.yaml +0 -0
  25. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/kickstart/templates/project/pyproject.toml +0 -0
  26. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/kickstart/templates/project/scoopfile.json +0 -0
  27. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/kickstart/templates/project/steps/my_step.py +0 -0
  28. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/kickstart/templates/project/west.yaml +0 -0
  29. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/main.py +0 -0
  30. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/py.typed +0 -0
  31. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/pypeline.py +0 -0
  32. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/steps/__init__.py +0 -0
  33. {pypeline_runner-1.9.1 → pypeline_runner-1.11.0}/src/pypeline/steps/west_install.py +0 -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,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pypeline-runner"
3
- version = "1.9.1"
3
+ version = "1.11.0"
4
4
  description = "Configure and execute pipelines with Python (similar to GitHub workflows or Jenkins pipelines)."
5
5
  authors = ["cuinixam <me@cuinixam.com>"]
6
6
  license = "MIT"
@@ -27,7 +27,7 @@ pypeline = "pypeline.main:main"
27
27
 
28
28
  [tool.poetry.dependencies]
29
29
  python = "^3.10"
30
- py-app-dev = "^2.5"
30
+ py-app-dev = "^2.10"
31
31
  typer = "^0"
32
32
  pyyaml = "^6.0"
33
33
 
@@ -0,0 +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 +0,0 @@
1
- __version__ = "1.9.1"