pypeline-runner 1.15.0__tar.gz → 1.15.1__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 (32) hide show
  1. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/PKG-INFO +1 -1
  2. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/pyproject.toml +1 -1
  3. pypeline_runner-1.15.1/src/pypeline/__init__.py +1 -0
  4. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/src/pypeline/inputs_parser.py +25 -15
  5. pypeline_runner-1.15.0/src/pypeline/__init__.py +0 -1
  6. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/LICENSE +0 -0
  7. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/README.md +0 -0
  8. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/src/pypeline/__run.py +0 -0
  9. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/src/pypeline/bootstrap/__init__.py +0 -0
  10. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/src/pypeline/bootstrap/run.py +0 -0
  11. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/src/pypeline/domain/__init__.py +0 -0
  12. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/src/pypeline/domain/artifacts.py +0 -0
  13. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/src/pypeline/domain/config.py +0 -0
  14. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/src/pypeline/domain/execution_context.py +0 -0
  15. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/src/pypeline/domain/pipeline.py +0 -0
  16. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/src/pypeline/domain/project_slurper.py +0 -0
  17. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/src/pypeline/kickstart/__init__.py +0 -0
  18. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/src/pypeline/kickstart/create.py +0 -0
  19. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/src/pypeline/kickstart/templates/project/.gitignore +0 -0
  20. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/src/pypeline/kickstart/templates/project/pypeline.ps1 +0 -0
  21. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/src/pypeline/kickstart/templates/project/pypeline.yaml +0 -0
  22. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/src/pypeline/kickstart/templates/project/pyproject.toml +0 -0
  23. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/src/pypeline/kickstart/templates/project/steps/my_step.py +0 -0
  24. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/src/pypeline/kickstart/templates/project/west.yaml +0 -0
  25. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/src/pypeline/main.py +0 -0
  26. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/src/pypeline/py.typed +0 -0
  27. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/src/pypeline/pypeline.py +0 -0
  28. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/src/pypeline/steps/__init__.py +0 -0
  29. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/src/pypeline/steps/create_venv.py +0 -0
  30. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/src/pypeline/steps/env_setup_script.py +0 -0
  31. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/src/pypeline/steps/scoop_install.py +0 -0
  32. {pypeline_runner-1.15.0 → pypeline_runner-1.15.1}/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.15.0
3
+ Version: 1.15.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,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pypeline-runner"
3
- version = "1.15.0"
3
+ version = "1.15.1"
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"
@@ -0,0 +1 @@
1
+ __version__ = "1.15.1"
@@ -1,5 +1,4 @@
1
1
  import argparse
2
- import distutils.util
3
2
  from typing import Any, Dict, List
4
3
 
5
4
  from py_app_dev.core.exceptions import UserNotificationException
@@ -13,7 +12,7 @@ def _map_type_for_argparse(input_type: InputType) -> Any:
13
12
  elif input_type == "integer":
14
13
  return int
15
14
  elif input_type == "boolean":
16
- return lambda x: bool(distutils.util.strtobool(x))
15
+ return argparse.BooleanOptionalAction # Use BooleanOptionalAction for boolean arguments
17
16
  else:
18
17
  raise ValueError(f"Unsupported input type specified: {input_type}")
19
18
 
@@ -37,14 +36,23 @@ def create_argument_parser_from_definitions(
37
36
  help_text += f", Default: {definition.default}"
38
37
  help_text += ")"
39
38
 
40
- parser.add_argument(
41
- f"--{name}",
42
- dest=name, # Attribute name in the parsed namespace
43
- help=help_text,
44
- type=arg_type, # Type conversion function
45
- required=definition.required,
46
- default=definition.default,
47
- )
39
+ if definition.type == "boolean":
40
+ parser.add_argument(
41
+ f"--{name}",
42
+ dest=name, # Attribute name in the parsed namespace
43
+ help=help_text,
44
+ action=arg_type, # Use BooleanOptionalAction for boolean arguments
45
+ default=definition.default or False,
46
+ )
47
+ else:
48
+ parser.add_argument(
49
+ f"--{name}",
50
+ dest=name,
51
+ help=help_text,
52
+ type=arg_type,
53
+ required=definition.required,
54
+ default=definition.default,
55
+ )
48
56
 
49
57
  return parser
50
58
 
@@ -69,11 +77,13 @@ class InputsParser:
69
77
  try:
70
78
  args = []
71
79
  for item in inputs:
72
- if "=" not in item:
73
- raise UserNotificationException(f"Invalid input format: '{item}', expected 'name=value'")
74
- name, value = item.split("=", 1)
75
- args.append(f"--{name}")
76
- args.append(value)
80
+ if "=" in item:
81
+ name, value = item.split("=", 1)
82
+ args.append(f"--{name}")
83
+ if value:
84
+ args.append(value)
85
+ else:
86
+ args.append(f"--{item}")
77
87
 
78
88
  parsed_namespace = self.parser.parse_args(args)
79
89
  return vars(parsed_namespace)
@@ -1 +0,0 @@
1
- __version__ = "1.15.0"