Skip to content

Commit

Permalink
Update docs removing mention of package_name in session.create
Browse files Browse the repository at this point in the history
Signed-off-by: Merel Theisen <merel.theisen@quantumblack.com>
  • Loading branch information
merelcht committed Oct 19, 2022
1 parent 6f790e3 commit 0dc5e63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions docs/source/extend_kedro/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ from kedro.framework.session import KedroSession


project_path = Path.cwd()
metadata = _get_project_metadata(project_path)
session = KedroSession.create(metadata.package_name, project_path)
session = KedroSession.create(project_path=project_path)
context = session.load_context()
```

Expand Down
6 changes: 3 additions & 3 deletions docs/source/kedro_project_setup/session.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ from kedro.framework.session import KedroSession
from kedro.framework.startup import bootstrap_project
from pathlib import Path

metadata = bootstrap_project(Path.cwd())
with KedroSession.create(metadata.package_name) as session:
bootstrap_project(Path.cwd())
with KedroSession.create() as session:
session.run()
```

You must tell `KedroSession` the package name of your Kedro project so it can load your settings, nodes and pipelines. Additionally, you can provide the following optional arguments in `KedroSession.create()`:
You can provide the following optional arguments in `KedroSession.create()`:

- `project_path`: Path to the project root directory
- `save_on_close`: A boolean value to indicate whether or not to save the session to disk when it's closed
Expand Down

0 comments on commit 0dc5e63

Please sign in to comment.