Skip to content

Commit

Permalink
πŸ”– 0.12.2 (#184)
Browse files Browse the repository at this point in the history
* Append sys.argv[1:] by default when cli_args is None in utils.load_pipeline()

* πŸ”– 0.12.2
  • Loading branch information
pwwang authored Oct 19, 2023
1 parent 1fa2f1e commit 398b896
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## 0.12.2

- Append `sys.argv[1:]` by default when `cli_args` is `None` in `utils.load_pipeline()`

## 0.12.1

- Add utils.is_loading_pipeline() to check if pipeline is loading
Expand Down
4 changes: 3 additions & 1 deletion pipen/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ def _get_obj_from_spec(spec: str) -> Any:

async def load_pipeline(
obj: str | Type[Proc] | Type[ProcGroup] | Type[Pipen],
cli_args: Sequence[str] = (),
cli_args: Sequence[str] = None,
**kwargs: Any,
) -> Pipen:
"""Load a pipeline from a Pipen, Proc or ProcGroup object
Expand Down Expand Up @@ -691,6 +691,8 @@ async def load_pipeline(
)

old_argv = sys.argv
if cli_args is None:
cli_args = sys.argv[1:]
sys.argv = [LOADING_ARGV0] + list(cli_args)
try:
# Initialize the pipeline so that the arguments definied by
Expand Down
2 changes: 1 addition & 1 deletion pipen/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Provide version of pipen"""

__version__ = "0.12.1"
__version__ = "0.12.2"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.masonry.api"

[tool.poetry]
name = "pipen"
version = "0.12.1"
version = "0.12.2"
description = "A pipeline framework for python"
authors = [ "pwwang <[email protected]>",]
license = "MIT"
Expand Down

0 comments on commit 398b896

Please sign in to comment.