pypeline-runner 1.9.1__tar.gz → 1.10.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.
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/PKG-INFO +2 -2
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/pyproject.toml +2 -2
- pypeline_runner-1.10.0/src/pypeline/__init__.py +1 -0
- pypeline_runner-1.10.0/src/pypeline/steps/env_setup_script.py +59 -0
- pypeline_runner-1.9.1/src/pypeline/__init__.py +0 -1
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/LICENSE +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/README.md +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/__run.py +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/domain/__init__.py +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/domain/artifacts.py +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/domain/config.py +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/domain/execution_context.py +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/domain/pipeline.py +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/domain/project_slurper.py +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/kickstart/__init__.py +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/kickstart/create.py +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/kickstart/templates/project/.gitignore +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/kickstart/templates/project/bootstrap.ps1 +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/kickstart/templates/project/bootstrap.py +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/kickstart/templates/project/poetry.toml +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/kickstart/templates/project/pypeline.ps1 +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/kickstart/templates/project/pypeline.yaml +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/kickstart/templates/project/pyproject.toml +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/kickstart/templates/project/scoopfile.json +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/kickstart/templates/project/steps/my_step.py +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/kickstart/templates/project/west.yaml +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/main.py +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/py.typed +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/pypeline.py +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/steps/__init__.py +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/steps/create_venv.py +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/steps/scoop_install.py +0 -0
- {pypeline_runner-1.9.1 → pypeline_runner-1.10.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.
|
|
3
|
+
Version: 1.10.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.
|
|
20
|
+
Requires-Dist: py-app-dev (>=2.9,<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.
|
|
3
|
+
version = "1.10.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.
|
|
30
|
+
py-app-dev = "^2.9"
|
|
31
31
|
typer = "^0"
|
|
32
32
|
pyyaml = "^6.0"
|
|
33
33
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.10.0"
|
|
@@ -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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.9.1"
|
|
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
|
{pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/kickstart/templates/project/.gitignore
RENAMED
|
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
|
{pypeline_runner-1.9.1 → pypeline_runner-1.10.0}/src/pypeline/kickstart/templates/project/west.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|