Skip to content

Commit

Permalink
Added "-p" cli option to match kedro pipeline options (#1961)
Browse files Browse the repository at this point in the history
CLI pipeline option for kedro viz is different than the option for kedro run. Added the -p option for kedro viz along --pipeline option.
  • Loading branch information
VladCozma authored Jul 5, 2024
1 parent cddd25c commit da92447
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Working on your first pull request? You can learn how from these resources:

- Fork the project
- Develop your contribution in a new branch and open a PR against the `main` branch
- Make sure the CI builds are green (have a look at the section [Running checks locally](#running-checks-locally) below)
- Make sure the CI builds are green (have a look at the section [Running checks locally](#testing-guidelines) below)
- Update the PR according to the reviewer's comments

# Contribution guidelines
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Options:
--load-file FILE Path to load Kedro-Viz data from a directory
--save-file FILE Path to save Kedro-Viz data to a directory
--pipeline TEXT Name of the registered pipeline to visualise. If not
-p, --pipeline TEXT Name of the registered pipeline to visualise. If not
set, the default pipeline is visualised
-e, --env TEXT Kedro configuration environment. If not specified,
Expand Down
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Please follow the established format:

- Relax `packaging` pin in requirements. (#1947)
- Add favicon to kedro-viz documentation. (#1959)
- Add "-p" flag to kedro-viz to match kedro run. (#1960)
- Fix bug related to nested namespace pipelines. (#1897)
- Migrate from `toposort` to `graphlib`. (#1942)

Expand Down
32 changes: 32 additions & 0 deletions package/tests/test_launchers/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,38 @@ def mock_project_path(mocker):
"extra_params": {"extra_param": "param"},
},
),
(
[
"viz",
"run",
"--host",
"8.8.8.8",
"--port",
"4142",
"--no-browser",
"--save-file",
"save_dir",
"-p",
"data_science",
"-e",
"local",
"--params",
"extra_param=param",
],
{
"host": "8.8.8.8",
"port": 4142,
"load_file": None,
"save_file": "save_dir",
"pipeline_name": "data_science",
"env": "local",
"project_path": "testPath",
"autoreload": False,
"include_hooks": False,
"package_name": None,
"extra_params": {"extra_param": "param"},
},
),
(
["viz", "run", "--include-hooks"],
{
Expand Down

0 comments on commit da92447

Please sign in to comment.