pypeline-runner 1.9.0__py3-none-any.whl → 1.9.1__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.0"
1
+ __version__ = "1.9.1"
pypeline/main.py CHANGED
@@ -60,8 +60,6 @@ def run(
60
60
  return
61
61
  if not project_slurper.pipeline:
62
62
  raise UserNotificationException("No pipeline found in the configuration.")
63
- if single and step and len(step) > 1:
64
- raise UserNotificationException("Only one step can be run with the --single flag.")
65
63
  # Schedule the steps to run
66
64
  steps_references = PipelineScheduler[ExecutionContext](project_slurper.pipeline, project_dir).get_steps_to_run(step, single)
67
65
  if not steps_references:
pypeline/pypeline.py CHANGED
@@ -124,27 +124,36 @@ class PipelineScheduler(Generic[TExecutionContext]):
124
124
  step_names: Optional[List[str]],
125
125
  single: Optional[bool],
126
126
  ) -> List[PipelineStepReference[PipelineStep[TExecutionContext]]]:
127
- if step_names:
128
- found_steps = set()
129
- filtered_step_refs = []
130
-
127
+ if not step_names:
128
+ return steps_references
129
+
130
+ step_names_set = set(step_names)
131
+ filtered_steps = []
132
+ found_steps = set()
133
+
134
+ if single:
135
+ # Include only the explicitly named steps, preserving order
136
+ filtered_steps = [step for step in steps_references if step.name in step_names_set]
137
+ found_steps = {step.name for step in filtered_steps}
138
+ else:
139
+ # Include all steps until the last explicitly named step is found
131
140
  for step in steps_references:
132
- if step.name in step_names:
141
+ filtered_steps.append(step)
142
+ if step.name in step_names_set:
133
143
  found_steps.add(step.name)
134
- if single:
135
- filtered_step_refs.append(step)
144
+ if found_steps == step_names_set:
145
+ # Once all named steps have been found, stop here
136
146
  break
137
- else:
138
- filtered_step_refs.append(step)
139
-
140
- # Check if all input step names were found
141
- missing_steps = set(step_names) - found_steps
142
- if missing_steps:
147
+ else:
148
+ # If loop completes without finding all named steps
149
+ missing_steps = step_names_set - found_steps
143
150
  raise UserNotificationException(f"Steps not found in pipeline configuration: {', '.join(missing_steps)}")
144
151
 
145
- return filtered_step_refs
152
+ missing_steps = step_names_set - found_steps
153
+ if missing_steps:
154
+ raise UserNotificationException(f"Steps not found in pipeline configuration: {', '.join(missing_steps)}")
146
155
 
147
- return steps_references
156
+ return filtered_steps
148
157
 
149
158
  @staticmethod
150
159
  def create_pipeline_loader(pipeline: PipelineConfig, project_root_dir: Path) -> PipelineLoader[PipelineStep[TExecutionContext]]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pypeline-runner
3
- Version: 1.9.0
3
+ Version: 1.9.1
4
4
  Summary: Configure and execute pipelines with Python (similar to GitHub workflows or Jenkins pipelines).
5
5
  License: MIT
6
6
  Author: cuinixam
@@ -1,4 +1,4 @@
1
- pypeline/__init__.py,sha256=ljy9wwnU6FSzJrHgJSWUcZ_nIboERJauUm7HTpNQfNg,22
1
+ pypeline/__init__.py,sha256=zLfYDL3qj0evR4WN5tYKfgr6-_YC5xhqrm09sbhWoQQ,22
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
@@ -18,15 +18,15 @@ pypeline/kickstart/templates/project/pyproject.toml,sha256=A60HZ6Aqf8KTFLoC35Sex
18
18
  pypeline/kickstart/templates/project/scoopfile.json,sha256=DcfZ8jYf9hmPHM-AWwnPKQJCzRG3fCuYtMeoY01nkag,219
19
19
  pypeline/kickstart/templates/project/steps/my_step.py,sha256=iZYTzWtL-qxEW_t7q079d-xpnRST_tumSzxqiQDW7sM,707
20
20
  pypeline/kickstart/templates/project/west.yaml,sha256=ZfVym7M4yzzC-Nm0vESdhqNYs6EaJuMQWGJBht_i0b4,188
21
- pypeline/main.py,sha256=yXgIjf8w8OUMD-u7ytVtRIiHtIkE2BD0XcNDNl75buI,3458
21
+ pypeline/main.py,sha256=Xk92H0z7z-WnrC6qdSrD5xHlTN65WDc64lSs6M4Jn_g,3324
22
22
  pypeline/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
- pypeline/pypeline.py,sha256=X9Qd6pPS1wSN30Yav5AojydKWWJh7xbYYS-vW8EVbo0,6862
23
+ pypeline/pypeline.py,sha256=-mquLfFlEvESk-HORhvjRMESIzdlVAgBLPjwUDOPLqg,7452
24
24
  pypeline/steps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
25
  pypeline/steps/create_venv.py,sha256=xCc73Hk62bbuJIM3btvapuoWeQy_Se5MsgffokYc-r0,2429
26
26
  pypeline/steps/scoop_install.py,sha256=_YdoCMXLON0eIwck8PJOcNhayx_ka1krBAidw_oRuFE,3373
27
27
  pypeline/steps/west_install.py,sha256=hPyr28ksdKsQ0tv0gMNytzupgk1IgjN9CpmaBdX5zps,1947
28
- pypeline_runner-1.9.0.dist-info/LICENSE,sha256=sKxdoqSmW9ezvPvt0ZGJbneyA0SBcm0GiqzTv2jN230,1066
29
- pypeline_runner-1.9.0.dist-info/METADATA,sha256=KCTSZw20UqCq6_iL2p0TPe_BAsDfttHhzutN3aQbkSg,7551
30
- pypeline_runner-1.9.0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
31
- pypeline_runner-1.9.0.dist-info/entry_points.txt,sha256=pe1u0uuhPI_yeQ0KjEw6jK-EvQfPcZwBSajgbAdKz1o,47
32
- pypeline_runner-1.9.0.dist-info/RECORD,,
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,,