pypeline-runner 0.1.0__tar.gz → 0.2.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 (31) hide show
  1. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/PKG-INFO +26 -15
  2. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/README.md +23 -13
  3. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/pyproject.toml +3 -2
  4. pypeline_runner-0.2.0/src/pypeline/__init__.py +1 -0
  5. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/src/pypeline/domain/pipeline.py +5 -3
  6. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/src/pypeline/kickstart/create.py +5 -7
  7. pypeline_runner-0.2.0/src/pypeline/kickstart/templates/project/pypeline.ps1 +1 -0
  8. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/src/pypeline/kickstart/templates/project/pyproject.toml +1 -0
  9. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/src/pypeline/main.py +10 -9
  10. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/src/pypeline/pypeline.py +5 -3
  11. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/src/pypeline/steps/create_venv.py +14 -6
  12. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/src/pypeline/steps/scoop_install.py +4 -4
  13. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/src/pypeline/steps/west_install.py +3 -3
  14. pypeline_runner-0.1.0/src/pypeline/__init__.py +0 -1
  15. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/LICENSE +0 -0
  16. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/src/pypeline/__run.py +0 -0
  17. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/src/pypeline/domain/__init__.py +0 -0
  18. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/src/pypeline/domain/artifacts.py +0 -0
  19. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/src/pypeline/domain/config.py +0 -0
  20. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/src/pypeline/domain/execution_context.py +0 -0
  21. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/src/pypeline/domain/project_slurper.py +0 -0
  22. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/src/pypeline/kickstart/__init__.py +0 -0
  23. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/src/pypeline/kickstart/templates/bootstrap/bootstrap.ps1 +0 -0
  24. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/src/pypeline/kickstart/templates/bootstrap/bootstrap.py +0 -0
  25. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/src/pypeline/kickstart/templates/project/.gitignore +0 -0
  26. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/src/pypeline/kickstart/templates/project/poetry.toml +0 -0
  27. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/src/pypeline/kickstart/templates/project/pypeline.yaml +0 -0
  28. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/src/pypeline/kickstart/templates/project/scoopfile.json +0 -0
  29. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/src/pypeline/kickstart/templates/project/steps/my_step.py +0 -0
  30. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/src/pypeline/py.typed +0 -0
  31. {pypeline_runner-0.1.0 → pypeline_runner-0.2.0}/src/pypeline/steps/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pypeline-runner
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: Configure and execute pipelines with Python (similar to GitHub workflows or Jenkins pipelines).
5
5
  Home-page: https://github.com/cuinixam/pypeline
6
6
  License: MIT
@@ -17,7 +17,8 @@ Classifier: Programming Language :: Python :: 3.10
17
17
  Classifier: Programming Language :: Python :: 3.11
18
18
  Classifier: Programming Language :: Python :: 3.12
19
19
  Classifier: Topic :: Software Development :: Libraries
20
- Requires-Dist: py-app-dev (>=2.1.0,<3.0.0)
20
+ Requires-Dist: py-app-dev (>=2.1.1,<3.0.0)
21
+ Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
21
22
  Requires-Dist: typer[all] (>=0.12.0,<0.13.0)
22
23
  Project-URL: Bug Tracker, https://github.com/cuinixam/pypeline/issues
23
24
  Project-URL: Changelog, https://github.com/cuinixam/pypeline/blob/main/CHANGELOG.md
@@ -25,14 +26,14 @@ Project-URL: Documentation, https://pypeline-runner.readthedocs.io
25
26
  Project-URL: Repository, https://github.com/cuinixam/pypeline
26
27
  Description-Content-Type: text/markdown
27
28
 
28
- # Python Pipeline
29
+ # Pypeline
29
30
 
30
31
  <p align="center">
31
32
  <a href="https://github.com/cuinixam/pypeline/actions/workflows/ci.yml?query=branch%3Amain">
32
33
  <img src="https://img.shields.io/github/actions/workflow/status/cuinixam/pypeline/ci.yml?branch=main&label=CI&logo=github&style=flat-square" alt="CI Status" >
33
34
  </a>
34
- <a href="https://pypeline.readthedocs.io">
35
- <img src="https://img.shields.io/readthedocs/pypeline.svg?logo=read-the-docs&logoColor=fff&style=flat-square" alt="Documentation Status">
35
+ <a href="https://pypeline-runner.readthedocs.io">
36
+ <img src="https://img.shields.io/readthedocs/pypeline-runner.svg?logo=read-the-docs&logoColor=fff&style=flat-square" alt="Documentation Status">
36
37
  </a>
37
38
  <a href="https://codecov.io/gh/cuinixam/pypeline">
38
39
  <img src="https://img.shields.io/codecov/c/github/cuinixam/pypeline.svg?logo=codecov&logoColor=fff&style=flat-square" alt="Test coverage percentage">
@@ -50,20 +51,33 @@ Description-Content-Type: text/markdown
50
51
  </a>
51
52
  </p>
52
53
  <p align="center">
53
- <a href="https://pypi.org/project/pypeline/">
54
- <img src="https://img.shields.io/pypi/v/pypeline.svg?logo=python&logoColor=fff&style=flat-square" alt="PyPI Version">
54
+ <a href="https://pypi.org/project/pypeline-runner/">
55
+ <img src="https://img.shields.io/pypi/v/pypeline-runner.svg?logo=python&logoColor=fff&style=flat-square" alt="PyPI Version">
55
56
  </a>
56
- <img src="https://img.shields.io/pypi/pyversions/pypeline.svg?style=flat-square&logo=python&amp;logoColor=fff" alt="Supported Python versions">
57
- <img src="https://img.shields.io/pypi/l/pypeline.svg?style=flat-square" alt="License">
57
+ <img src="https://img.shields.io/pypi/pyversions/pypeline-runner.svg?style=flat-square&logo=python&amp;logoColor=fff" alt="Supported Python versions">
58
+ <img src="https://img.shields.io/pypi/l/pypeline-runner.svg?style=flat-square" alt="License">
58
59
  </p>
59
60
 
60
- Configure and execute steps for developing a python package.
61
+ Pypeline is a Python application designed to streamline and automate the software development lifecycle, particularly the pipeline execution processes across various environments such as GitHub and Jenkins.
62
+ The primary motivation for developing Pypeline stemmed from the need to unify and simplify the creation of build, test, and deployment pipelines that are traditionally defined separately across these platforms using GitHub workflows (YAML) and Jenkins pipelines (Jenkinsfile).
63
+
64
+ **Key Features**
65
+
66
+ - **Unified Pipeline Definition**: Users can define their entire pipeline in a single YAML file, eliminating the need to switch between different syntaxes and configurations for different CI/CD tools.
67
+
68
+ - **Extensibility**: Pypeline supports execution steps defined not only through local scripts but also from installed Python packages.
69
+
70
+ - **Execution Context**: Each step in the pipeline receives an execution context that can be updated during step execution. This allows for the sharing of information and state between steps.
71
+
72
+ - **Dependency Handling**: Dependency management ensures that only the necessary steps are executed, reducing runtime and resource usage by avoiding unnecessary operations.
73
+
74
+ - **Ease of Use**: With Pypeline, setting up and running pipelines becomes more straightforward, enabling developers to focus more on coding and less on configuring pipeline specifics.
61
75
 
62
76
  ## Installation
63
77
 
64
78
  Install this via pip (or your favourite package manager):
65
79
 
66
- `pip install pypeline`
80
+ `pip install pypeline-runner`
67
81
 
68
82
  ## Start developing
69
83
 
@@ -113,8 +127,5 @@ This project follows the [all-contributors](https://github.com/all-contributors/
113
127
 
114
128
  ## Credits
115
129
 
116
- This package was created with
117
- [Copier](https://copier.readthedocs.io/) and the
118
- [cuinixam/pypackage-template](https://github.com/cuinixam/pypackage-template)
119
- project template.
130
+ This package was created with [Copier](https://copier.readthedocs.io/) and the [cuinixam/pypackage-template](https://github.com/cuinixam/pypackage-template) project template.
120
131
 
@@ -1,11 +1,11 @@
1
- # Python Pipeline
1
+ # Pypeline
2
2
 
3
3
  <p align="center">
4
4
  <a href="https://github.com/cuinixam/pypeline/actions/workflows/ci.yml?query=branch%3Amain">
5
5
  <img src="https://img.shields.io/github/actions/workflow/status/cuinixam/pypeline/ci.yml?branch=main&label=CI&logo=github&style=flat-square" alt="CI Status" >
6
6
  </a>
7
- <a href="https://pypeline.readthedocs.io">
8
- <img src="https://img.shields.io/readthedocs/pypeline.svg?logo=read-the-docs&logoColor=fff&style=flat-square" alt="Documentation Status">
7
+ <a href="https://pypeline-runner.readthedocs.io">
8
+ <img src="https://img.shields.io/readthedocs/pypeline-runner.svg?logo=read-the-docs&logoColor=fff&style=flat-square" alt="Documentation Status">
9
9
  </a>
10
10
  <a href="https://codecov.io/gh/cuinixam/pypeline">
11
11
  <img src="https://img.shields.io/codecov/c/github/cuinixam/pypeline.svg?logo=codecov&logoColor=fff&style=flat-square" alt="Test coverage percentage">
@@ -23,20 +23,33 @@
23
23
  </a>
24
24
  </p>
25
25
  <p align="center">
26
- <a href="https://pypi.org/project/pypeline/">
27
- <img src="https://img.shields.io/pypi/v/pypeline.svg?logo=python&logoColor=fff&style=flat-square" alt="PyPI Version">
26
+ <a href="https://pypi.org/project/pypeline-runner/">
27
+ <img src="https://img.shields.io/pypi/v/pypeline-runner.svg?logo=python&logoColor=fff&style=flat-square" alt="PyPI Version">
28
28
  </a>
29
- <img src="https://img.shields.io/pypi/pyversions/pypeline.svg?style=flat-square&logo=python&amp;logoColor=fff" alt="Supported Python versions">
30
- <img src="https://img.shields.io/pypi/l/pypeline.svg?style=flat-square" alt="License">
29
+ <img src="https://img.shields.io/pypi/pyversions/pypeline-runner.svg?style=flat-square&logo=python&amp;logoColor=fff" alt="Supported Python versions">
30
+ <img src="https://img.shields.io/pypi/l/pypeline-runner.svg?style=flat-square" alt="License">
31
31
  </p>
32
32
 
33
- Configure and execute steps for developing a python package.
33
+ Pypeline is a Python application designed to streamline and automate the software development lifecycle, particularly the pipeline execution processes across various environments such as GitHub and Jenkins.
34
+ The primary motivation for developing Pypeline stemmed from the need to unify and simplify the creation of build, test, and deployment pipelines that are traditionally defined separately across these platforms using GitHub workflows (YAML) and Jenkins pipelines (Jenkinsfile).
35
+
36
+ **Key Features**
37
+
38
+ - **Unified Pipeline Definition**: Users can define their entire pipeline in a single YAML file, eliminating the need to switch between different syntaxes and configurations for different CI/CD tools.
39
+
40
+ - **Extensibility**: Pypeline supports execution steps defined not only through local scripts but also from installed Python packages.
41
+
42
+ - **Execution Context**: Each step in the pipeline receives an execution context that can be updated during step execution. This allows for the sharing of information and state between steps.
43
+
44
+ - **Dependency Handling**: Dependency management ensures that only the necessary steps are executed, reducing runtime and resource usage by avoiding unnecessary operations.
45
+
46
+ - **Ease of Use**: With Pypeline, setting up and running pipelines becomes more straightforward, enabling developers to focus more on coding and less on configuring pipeline specifics.
34
47
 
35
48
  ## Installation
36
49
 
37
50
  Install this via pip (or your favourite package manager):
38
51
 
39
- `pip install pypeline`
52
+ `pip install pypeline-runner`
40
53
 
41
54
  ## Start developing
42
55
 
@@ -86,7 +99,4 @@ This project follows the [all-contributors](https://github.com/all-contributors/
86
99
 
87
100
  ## Credits
88
101
 
89
- This package was created with
90
- [Copier](https://copier.readthedocs.io/) and the
91
- [cuinixam/pypackage-template](https://github.com/cuinixam/pypackage-template)
92
- project template.
102
+ This package was created with [Copier](https://copier.readthedocs.io/) and the [cuinixam/pypackage-template](https://github.com/cuinixam/pypackage-template) project template.
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pypeline-runner"
3
- version = "0.1.0"
3
+ version = "0.2.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,8 +27,9 @@ pypeline = "pypeline.main:main"
27
27
 
28
28
  [tool.poetry.dependencies]
29
29
  python = "^3.10"
30
- py-app-dev = "^2.1.0"
30
+ py-app-dev = "^2.1.1"
31
31
  typer = {extras = ["all"], version = "^0.12.0"}
32
+ pyyaml = "^6.0.1"
32
33
 
33
34
  [tool.poetry.group.dev.dependencies]
34
35
  pytest = "^7.0"
@@ -0,0 +1 @@
1
+ __version__ = "0.2.0"
@@ -1,6 +1,6 @@
1
1
  from abc import abstractmethod
2
2
  from pathlib import Path
3
- from typing import Type
3
+ from typing import Any, Dict, Optional, Type
4
4
 
5
5
  from py_app_dev.core.runnable import Runnable
6
6
 
@@ -8,9 +8,10 @@ from .execution_context import ExecutionContext
8
8
 
9
9
 
10
10
  class PipelineStep(Runnable):
11
- def __init__(self, execution_context: ExecutionContext, output_dir: Path) -> None:
11
+ def __init__(self, execution_context: ExecutionContext, output_dir: Path, config: Optional[Dict[str, Any]] = None) -> None:
12
12
  self.execution_context = execution_context
13
13
  self.output_dir = output_dir
14
+ self.config = config
14
15
  self.project_root_dir = self.execution_context.project_root_dir
15
16
 
16
17
  @abstractmethod
@@ -19,9 +20,10 @@ class PipelineStep(Runnable):
19
20
 
20
21
 
21
22
  class PipelineStepReference:
22
- def __init__(self, group_name: str, _class: Type[PipelineStep]) -> None:
23
+ def __init__(self, group_name: str, _class: Type[PipelineStep], config: Optional[Dict[str, Any]] = None) -> None:
23
24
  self.group_name = group_name
24
25
  self._class = _class
26
+ self.config = config
25
27
 
26
28
  @property
27
29
  def name(self) -> str:
@@ -31,7 +31,7 @@ class ProjectBuilder:
31
31
  @staticmethod
32
32
  def _check_target_directory(project_dir: Path) -> None:
33
33
  if project_dir.is_dir() and any(project_dir.iterdir()):
34
- raise UserNotificationException(f"Project directory '{project_dir}' is not empty." " The target directory shall either be empty or not exist.")
34
+ raise UserNotificationException(f"Project directory '{project_dir}' is not empty. Use --force to override.")
35
35
 
36
36
  def build(self) -> None:
37
37
  if self.check_target_directory_flag:
@@ -41,18 +41,16 @@ class ProjectBuilder:
41
41
 
42
42
 
43
43
  class KickstartProject:
44
- def __init__(self, project_dir: Path, bootstrap_only: bool = False, force: bool = False) -> None:
44
+ def __init__(self, project_dir: Path, force: bool = False) -> None:
45
45
  self.logger = logger.bind()
46
46
  self.project_dir = project_dir
47
- self.bootstrap_only = bootstrap_only
48
47
  self.force = force
49
48
 
50
49
  def run(self) -> None:
51
50
  self.logger.info(f"Kickstart new project in '{self.project_dir.absolute().as_posix()}'")
52
51
  project_builder = ProjectBuilder(self.project_dir)
53
- project_builder.with_dir("bootstrap")
54
- if self.bootstrap_only or self.force:
52
+ if self.force:
55
53
  project_builder.with_disable_target_directory_check()
56
- if not self.bootstrap_only:
57
- project_builder.with_dir("project")
54
+ project_builder.with_dir("bootstrap")
55
+ project_builder.with_dir("project")
58
56
  project_builder.build()
@@ -0,0 +1 @@
1
+ .\.venv\Scripts\pypeline.exe $args
@@ -6,3 +6,4 @@ authors = ["Your Name"]
6
6
 
7
7
  [tool.poetry.dependencies]
8
8
  python = ">=3.10,<3.13"
9
+ pypeline-runner = "*"
@@ -13,7 +13,9 @@ from pypeline.pypeline import PipelineScheduler, PipelineStepsExecutor
13
13
 
14
14
  package_name = "pypeline"
15
15
 
16
- app = typer.Typer(name=package_name, help="Configure and execute steps for developing a python package.", no_args_is_help=True, add_completion=False)
16
+ app = typer.Typer(
17
+ name=package_name, help="Configure and execute pipelines with Python (similar to GitHub workflows or Jenkins pipelines).", no_args_is_help=True, add_completion=False
18
+ )
17
19
 
18
20
 
19
21
  @app.callback(invoke_without_command=True)
@@ -29,10 +31,9 @@ def version(
29
31
  @time_it("init")
30
32
  def init(
31
33
  project_dir: Path = typer.Option(Path.cwd().absolute(), help="The project directory"), # noqa: B008
32
- bootstrap_only: bool = typer.Option(False, help="Initialize only the bootstrap files."),
33
34
  force: bool = typer.Option(False, help="Force the initialization of the project even if the directory is not empty."),
34
35
  ) -> None:
35
- KickstartProject(project_dir, bootstrap_only, force).run()
36
+ KickstartProject(project_dir, force).run()
36
37
 
37
38
 
38
39
  @app.command()
@@ -58,10 +59,14 @@ def run(
58
59
  help="Force the execution of a step even if it is not dirty.",
59
60
  is_flag=True,
60
61
  ),
62
+ dry_run: bool = typer.Option(
63
+ False,
64
+ help="Do not run any step, just print the steps that would be executed.",
65
+ is_flag=True,
66
+ ),
61
67
  ) -> None:
62
68
  project_slurper = ProjectSlurper(project_dir)
63
69
  if print:
64
- logger.warning("TODO: print pipeline steps")
65
70
  logger.info("Pipeline steps:")
66
71
  for group, step_configs in project_slurper.pipeline.items():
67
72
  logger.info(f" Group: {group}")
@@ -78,11 +83,7 @@ def run(
78
83
  logger.info("No steps to run.")
79
84
  return
80
85
 
81
- PipelineStepsExecutor(
82
- project_slurper.artifacts_locator,
83
- steps_references,
84
- force_run,
85
- ).run()
86
+ PipelineStepsExecutor(project_slurper.artifacts_locator, steps_references, force_run, dry_run).run()
86
87
 
87
88
 
88
89
  def main(args: Optional[List[str]] = None) -> int:
@@ -26,7 +26,7 @@ class PipelineLoader:
26
26
  self._loader = GenericPipelineLoader[PipelineStep](self.pipeline_config, self.project_root_dir)
27
27
 
28
28
  def load_steps_references(self) -> List[PipelineStepReference]:
29
- return [PipelineStepReference(step_reference.group_name, step_reference._class) for step_reference in self._loader.load_steps()]
29
+ return [PipelineStepReference(step_reference.group_name, step_reference._class, step_reference.config) for step_reference in self._loader.load_steps()]
30
30
 
31
31
 
32
32
  class PipelineStepsExecutor:
@@ -37,11 +37,13 @@ class PipelineStepsExecutor:
37
37
  artifacts_locator: ProjectArtifactsLocator,
38
38
  steps_references: List[PipelineStepReference],
39
39
  force_run: bool = False,
40
+ dry_run: bool = False,
40
41
  ) -> None:
41
42
  self.logger = logger.bind()
42
43
  self.artifacts_locator = artifacts_locator
43
44
  self.steps_references = steps_references
44
45
  self.force_run = force_run
46
+ self.dry_run = dry_run
45
47
 
46
48
  def run(self) -> None:
47
49
  execution_context = ExecutionContext(project_root_dir=self.artifacts_locator.project_root_dir, install_dirs=[])
@@ -49,9 +51,9 @@ class PipelineStepsExecutor:
49
51
  step_output_dir = self.artifacts_locator.build_dir / step_reference.group_name
50
52
  # Create the step output directory, to make sure that files can be created.
51
53
  step_output_dir.mkdir(parents=True, exist_ok=True)
52
- step = step_reference._class(execution_context, step_output_dir)
54
+ step = step_reference._class(execution_context, step_output_dir, step_reference.config)
53
55
  # Execute the step is necessary. If the step is not dirty, it will not be executed
54
- Executor(step.output_dir, self.force_run).execute(step)
56
+ Executor(step.output_dir, self.force_run, self.dry_run).execute(step)
55
57
  # Independent if the step was executed or not, every step shall update the context
56
58
  step.update_execution_context()
57
59
 
@@ -1,6 +1,8 @@
1
+ from dataclasses import dataclass
1
2
  from pathlib import Path
2
- from typing import List
3
+ from typing import Any, Dict, List, Optional
3
4
 
5
+ from mashumaro import DataClassDictMixin
4
6
  from py_app_dev.core.exceptions import UserNotificationException
5
7
  from py_app_dev.core.logging import logger
6
8
 
@@ -8,9 +10,14 @@ from ..domain.execution_context import ExecutionContext
8
10
  from ..domain.pipeline import PipelineStep
9
11
 
10
12
 
13
+ @dataclass
14
+ class CreateVEnvConfig(DataClassDictMixin):
15
+ bootstrap_script: str = "bootstrap.py"
16
+
17
+
11
18
  class CreateVEnv(PipelineStep):
12
- def __init__(self, execution_context: ExecutionContext, output_dir: Path) -> None:
13
- super().__init__(execution_context, output_dir)
19
+ def __init__(self, execution_context: ExecutionContext, output_dir: Path, config: Optional[Dict[str, Any]] = None) -> None:
20
+ super().__init__(execution_context, output_dir, config)
14
21
  self.logger = logger.bind()
15
22
  self.logger = logger.bind()
16
23
 
@@ -23,11 +30,12 @@ class CreateVEnv(PipelineStep):
23
30
 
24
31
  def run(self) -> int:
25
32
  self.logger.debug(f"Run {self.get_name()} step. Output dir: {self.output_dir}")
26
- build_script_path = self.project_root_dir / "bootstrap.py"
27
- if not build_script_path.exists():
33
+ config = CreateVEnvConfig.from_dict(self.config) if self.config else CreateVEnvConfig()
34
+ bootstrap_script = self.project_root_dir / config.bootstrap_script
35
+ if not bootstrap_script.exists():
28
36
  raise UserNotificationException("Failed to find bootstrap script. Make sure that the project is initialized correctly.")
29
37
  self.execution_context.create_process_executor(
30
- ["python", build_script_path.as_posix()],
38
+ ["python", bootstrap_script.as_posix()],
31
39
  cwd=self.project_root_dir,
32
40
  ).execute()
33
41
  self.execution_context.add_install_dirs(self.install_dirs)
@@ -3,7 +3,7 @@ import json
3
3
  import traceback
4
4
  from dataclasses import dataclass
5
5
  from pathlib import Path
6
- from typing import ClassVar, List
6
+ from typing import Any, ClassVar, Dict, List, Optional
7
7
 
8
8
  from mashumaro.config import TO_DICT_ADD_OMIT_NONE_FLAG, BaseConfig
9
9
  from mashumaro.mixins.json import DataClassJSONMixin
@@ -46,8 +46,8 @@ def create_scoop_wrapper() -> ScoopWrapper:
46
46
 
47
47
 
48
48
  class ScoopInstall(PipelineStep):
49
- def __init__(self, execution_context: ExecutionContext, output_dir: Path) -> None:
50
- super().__init__(execution_context, output_dir)
49
+ def __init__(self, execution_context: ExecutionContext, output_dir: Path, config: Optional[Dict[str, Any]] = None) -> None:
50
+ super().__init__(execution_context, output_dir, config)
51
51
  self.logger = logger.bind()
52
52
  self.execution_info = ScoopInstallExecutionInfo([])
53
53
  # One needs to keep track of the installed apps to get the required paths
@@ -77,7 +77,7 @@ class ScoopInstall(PipelineStep):
77
77
  return [self.scoop_file]
78
78
 
79
79
  def get_outputs(self) -> List[Path]:
80
- return self.install_dirs
80
+ return [self.execution_info_file, *self.install_dirs]
81
81
 
82
82
  def update_execution_context(self) -> None:
83
83
  install_dirs = ScoopInstallExecutionInfo.from_json_file(self.execution_info_file).install_dirs
@@ -1,5 +1,5 @@
1
1
  from pathlib import Path
2
- from typing import List
2
+ from typing import Any, Dict, List, Optional
3
3
 
4
4
  from py_app_dev.core.exceptions import UserNotificationException
5
5
  from py_app_dev.core.logging import logger
@@ -9,8 +9,8 @@ from ..domain.pipeline import PipelineStep
9
9
 
10
10
 
11
11
  class WestInstall(PipelineStep):
12
- def __init__(self, execution_context: ExecutionContext, output_dir: Path) -> None:
13
- super().__init__(execution_context, output_dir)
12
+ def __init__(self, execution_context: ExecutionContext, output_dir: Path, config: Optional[Dict[str, Any]] = None) -> None:
13
+ super().__init__(execution_context, output_dir, config)
14
14
  self.logger = logger.bind()
15
15
  self.artifacts_locator = execution_context.create_artifacts_locator()
16
16
 
@@ -1 +0,0 @@
1
- __version__ = "0.1.0"
File without changes