pypeline-runner 1.4.0__py3-none-any.whl → 1.6.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.4.0"
1
+ __version__ = "1.6.0"
@@ -3,6 +3,7 @@ from dataclasses import dataclass, field
3
3
  from pathlib import Path
4
4
  from typing import List, Optional
5
5
 
6
+ from py_app_dev.core.data_registry import DataRegistry
6
7
  from py_app_dev.core.subprocess import SubprocessExecutor
7
8
 
8
9
  from .artifacts import ProjectArtifactsLocator
@@ -13,6 +14,8 @@ class ExecutionContext:
13
14
  project_root_dir: Path
14
15
  # Keep track of all install directories, updated by any step for the subsequent steps
15
16
  install_dirs: List[Path] = field(default_factory=list)
17
+ # Data registry to exchange data of any type
18
+ data_registry: DataRegistry = field(default_factory=DataRegistry)
16
19
 
17
20
  def add_install_dirs(self, install_dirs: List[Path]) -> None:
18
21
  self.install_dirs.extend(install_dirs)
pypeline/pypeline.py CHANGED
@@ -57,14 +57,14 @@ class PipelineLoader(Generic[TExecutionContext]):
57
57
  run_command = step_config.run.split(" ") if isinstance(step_config.run, str) else step_config.run
58
58
  step_class = PipelineLoader._create_run_command_step_class(run_command, step_class_name)
59
59
  else:
60
- raise UserNotificationException(f"Step '{step_class_name}' has no 'module' nor 'file' nor `run` defined." " Please check your pipeline configuration.")
60
+ raise UserNotificationException(f"Step '{step_class_name}' has no 'module' nor 'file' nor `run` defined. Please check your pipeline configuration.")
61
61
  result.append(PipelineStepReference[TExecutionContext](group_name, cast(Type[PipelineStep[TExecutionContext]], step_class), step_config.config))
62
62
  return result
63
63
 
64
64
  @staticmethod
65
65
  def _load_user_step(python_file: Path, step_class_name: str) -> Type[PipelineStep[ExecutionContext]]:
66
66
  # Create a module specification from the file path
67
- spec = spec_from_file_location(f"user__{step_class_name}", python_file)
67
+ spec = spec_from_file_location(f"user__{python_file.stem}", python_file)
68
68
  if spec and spec.loader:
69
69
  step_module = module_from_spec(spec)
70
70
  # Import the module
@@ -72,9 +72,9 @@ class PipelineLoader(Generic[TExecutionContext]):
72
72
  try:
73
73
  step_class = getattr(step_module, step_class_name)
74
74
  except AttributeError:
75
- raise UserNotificationException(f"Could not load class '{step_class_name}' from file '{python_file}'." " Please check your pipeline configuration.") from None
75
+ raise UserNotificationException(f"Could not load class '{step_class_name}' from file '{python_file}'. Please check your pipeline configuration.") from None
76
76
  return step_class
77
- raise UserNotificationException(f"Could not load file '{python_file}'." " Please check the file for any errors.")
77
+ raise UserNotificationException(f"Could not load file '{python_file}'. Please check the file for any errors.")
78
78
 
79
79
  @staticmethod
80
80
  def _load_module_step(module_name: str, step_class_name: str) -> Type[PipelineStep[ExecutionContext]]:
@@ -84,7 +84,7 @@ class PipelineLoader(Generic[TExecutionContext]):
84
84
  except ImportError:
85
85
  raise UserNotificationException(f"Could not load module '{module_name}'. Please check your pipeline configuration.") from None
86
86
  except AttributeError:
87
- raise UserNotificationException(f"Could not load class '{step_class_name}' from module '{module_name}'." " Please check your pipeline configuration.") from None
87
+ raise UserNotificationException(f"Could not load class '{step_class_name}' from module '{module_name}'. Please check your pipeline configuration.") from None
88
88
  return step_class
89
89
 
90
90
  @staticmethod
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pypeline-runner
3
- Version: 1.4.0
3
+ Version: 1.6.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.3.3,<3.0.0)
20
+ Requires-Dist: py-app-dev (>=2.5,<3.0)
21
21
  Requires-Dist: pyyaml (>=6.0,<7.0)
22
22
  Requires-Dist: typer (>=0.12,<0.13)
23
23
  Project-URL: Bug Tracker, https://github.com/cuinixam/pypeline/issues
@@ -1,9 +1,9 @@
1
- pypeline/__init__.py,sha256=8UhoYEXHs1Oai7BW_ExBmuwWnRI-yMG_u1fQAXMizHQ,22
1
+ pypeline/__init__.py,sha256=8EjIC8Er4Bn8PhErizTXrZVYTgb6tHgj00LrrBVNYXA,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=qXshnk9umi0AVGV4m5iEiy_MQ5Ad2LDZwI8OULU-qMk,1355
5
5
  pypeline/domain/config.py,sha256=AlavAaz5hSxa6yaKYnj-x71ClhOtA41yv5Qf2JIE47k,1650
6
- pypeline/domain/execution_context.py,sha256=0zc3OgXeIMDpgWWYMaDGub7fY5urLLR79yuCaXVxoTQ,1101
6
+ pypeline/domain/execution_context.py,sha256=ho-WvCVRMUfYo1532eQYabXCHtXDgvSNUkX8S3Cr7Xo,1278
7
7
  pypeline/domain/pipeline.py,sha256=mO5tc18nxiAtnLs_MR56u7PAoTJDMZ_KVkCqMzV-YG8,3916
8
8
  pypeline/domain/project_slurper.py,sha256=YCho7V1BHjFmC_foxHFaWX8c_VbMJ16XEB4CQBlMrhc,894
9
9
  pypeline/kickstart/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -18,13 +18,13 @@ pypeline/kickstart/templates/project/scoopfile.json,sha256=DcfZ8jYf9hmPHM-AWwnPK
18
18
  pypeline/kickstart/templates/project/steps/my_step.py,sha256=_zx01qAVuwn6IMPBUBwKY-IBjS9Gs2m-d51L9sayGug,733
19
19
  pypeline/main.py,sha256=GtuOgB9OeNFgbWLHZux80fppYQVwMYNFZoZhDIlJW9c,3457
20
20
  pypeline/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
- pypeline/pypeline.py,sha256=fHGocevkWywVVTOkHJ0YSPBKjDwyJ8Zjs37wP4eMAO0,9209
21
+ pypeline/pypeline.py,sha256=ADg_HlVA6LxZX1jq2GJw-bRCsy1cWixTQcTzDNufauw,9198
22
22
  pypeline/steps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
23
  pypeline/steps/create_venv.py,sha256=vTPSA0gGGzq_QhI1jAgsGchS2s8_ZpEtnWcb0uL8BHE,1934
24
24
  pypeline/steps/scoop_install.py,sha256=_YdoCMXLON0eIwck8PJOcNhayx_ka1krBAidw_oRuFE,3373
25
25
  pypeline/steps/west_install.py,sha256=hPyr28ksdKsQ0tv0gMNytzupgk1IgjN9CpmaBdX5zps,1947
26
- pypeline_runner-1.4.0.dist-info/LICENSE,sha256=sKxdoqSmW9ezvPvt0ZGJbneyA0SBcm0GiqzTv2jN230,1066
27
- pypeline_runner-1.4.0.dist-info/METADATA,sha256=U148kmNlXfpu71NuVMTcvIcGpN-0M7BB6EahoEo8RZU,7158
28
- pypeline_runner-1.4.0.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
29
- pypeline_runner-1.4.0.dist-info/entry_points.txt,sha256=pe1u0uuhPI_yeQ0KjEw6jK-EvQfPcZwBSajgbAdKz1o,47
30
- pypeline_runner-1.4.0.dist-info/RECORD,,
26
+ pypeline_runner-1.6.0.dist-info/LICENSE,sha256=sKxdoqSmW9ezvPvt0ZGJbneyA0SBcm0GiqzTv2jN230,1066
27
+ pypeline_runner-1.6.0.dist-info/METADATA,sha256=W1G0C5EOOD3lelRR3o4TDHkx_QY7K9ShxtwCXlr-FA4,7154
28
+ pypeline_runner-1.6.0.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
29
+ pypeline_runner-1.6.0.dist-info/entry_points.txt,sha256=pe1u0uuhPI_yeQ0KjEw6jK-EvQfPcZwBSajgbAdKz1o,47
30
+ pypeline_runner-1.6.0.dist-info/RECORD,,