Skip to content

Commit

Permalink
Remove old code/mentions related to jupyter convert (#3963)
Browse files Browse the repository at this point in the history
* Remove old code/mentions related to jupyter convert

Signed-off-by: Merel Theisen <[email protected]>

* Remove unneeded custom JupyterCommandGroup

Signed-off-by: Merel Theisen <[email protected]>

---------

Signed-off-by: Merel Theisen <[email protected]>
Signed-off-by: bpmeek <[email protected]>
  • Loading branch information
merelcht authored and bpmeek committed Jun 20, 2024
1 parent 0aa676b commit 3b0217c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 40 deletions.

This file was deleted.

12 changes: 0 additions & 12 deletions features/steps/cli_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,18 +711,6 @@ def check_dependency_in_reqs(context: behave.runner.Context, dependency: str):
assert dependency in reqs_path.read_text()


@then("Code cell with node tag should be converted into kedro node")
def check_cell_conversion(context: behave.runner.Context):
converted_file = (
context.root_project_dir
/ "src"
/ context.package_name
/ "nodes"
/ "hello_world.py"
)
assert "Hello World!" in converted_file.read_text()


@given("I have micro-packaging settings in pyproject.toml")
def add_micropkg_to_pyproject_toml(context: behave.runner.Context):
pyproject_toml_path = context.root_project_dir / "pyproject.toml"
Expand Down
20 changes: 2 additions & 18 deletions kedro/framework/cli/jupyter.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,15 @@
from kedro.framework.project import validate_settings
from kedro.framework.startup import ProjectMetadata

CONVERT_ALL_HELP = """Extract the nodes from all notebooks in the Kedro project directory,
including sub-folders."""

OVERWRITE_HELP = """If Python file already exists for the equivalent notebook,
overwrite its contents."""


class JupyterCommandGroup(click.Group):
"""A custom class for ordering the `kedro jupyter` command groups"""

def list_commands(self, ctx: click.Context) -> list[str]:
"""List commands according to a custom order"""
return ["setup", "notebook", "lab", "convert"]


@click.group(name="Kedro")
def jupyter_cli() -> None: # pragma: no cover
pass


@jupyter_cli.group(cls=JupyterCommandGroup)
@jupyter_cli.group()
def jupyter() -> None:
"""Open Jupyter Notebook / Lab with project specific variables loaded, or
convert notebooks into Kedro code.
"""
"""Open Jupyter Notebook / Lab with project specific variables loaded."""


@forward_command(jupyter, "setup", forward_help=True)
Expand Down

0 comments on commit 3b0217c

Please sign in to comment.