diff --git a/pyproject.toml b/pyproject.toml index 3d2033f..9735bf5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,7 +73,7 @@ deps = -c {toxinidir}/.github/dependabot/constraints.txt -e .[dev] commands = - python3 -m pytest -vv --cov=src --cov-report=html:coverage_report --junitxml report.xml --cov-report xml src/kernel_install/tests + python3 -m pytest -vv --cov=src --cov-report=html:coverage_report --junitxml report.xml --cov-report xml src/jupyter_kernel_install/tests python3 -m coverage report --fail-under=98.5 --precision=2 [testenv:lint] diff --git a/src/jupyter_kernel_install/__main__.py b/src/jupyter_kernel_install/__main__.py index 7569bcd..4108994 100644 --- a/src/jupyter_kernel_install/__main__.py +++ b/src/jupyter_kernel_install/__main__.py @@ -1,7 +1,10 @@ +"""Command line interface for jupyter_kernel_install.""" + import re import sys -from jupyter_kernel_install.cli import cli + +from .cli import cli if __name__ == "__main__": sys.argv[0] = re.sub(r"(-script\.pyw|\.exe)?$", "", sys.argv[0]) - sys.exit(cli()) + cli(sys.argv[1:]) diff --git a/src/jupyter_kernel_install/cli.py b/src/jupyter_kernel_install/cli.py index 723753f..9383d63 100644 --- a/src/jupyter_kernel_install/cli.py +++ b/src/jupyter_kernel_install/cli.py @@ -9,7 +9,7 @@ from rich import print as pprint from rich_argparse import ArgumentDefaultsRichHelpFormatter -from kernel_install import __version__, install +from jupyter_kernel_install import __version__, install from .install import __all__ as methods from .logger import logger, logger_stream_handle diff --git a/src/jupyter_kernel_install/tests/conftest.py b/src/jupyter_kernel_install/tests/conftest.py index 1b003a1..76d563e 100644 --- a/src/jupyter_kernel_install/tests/conftest.py +++ b/src/jupyter_kernel_install/tests/conftest.py @@ -5,27 +5,27 @@ import pytest -import kernel_install +import jupyter_kernel_install @pytest.fixture(scope="function") def r_kernel() -> Iterator[Path]: """Set the name of the python kernel.""" - out = kernel_install.install.KERNEL_DIR / "r_test" + out = jupyter_kernel_install.install.KERNEL_DIR / "r_test" yield out @pytest.fixture(scope="function") def bash_kernel() -> Iterator[Path]: """Set the name of the python kernel.""" - out = kernel_install.install.KERNEL_DIR / "bash_test" + out = jupyter_kernel_install.install.KERNEL_DIR / "bash_test" yield out @pytest.fixture(scope="function") def python_kernel() -> Iterator[Path]: """Set the name of the python kernel.""" - out = kernel_install.install.KERNEL_DIR / "python_test" + out = jupyter_kernel_install.install.KERNEL_DIR / "python_test" yield out for r in out.rglob("*.*"): r.unlink() diff --git a/src/jupyter_kernel_install/tests/test_kernel_cli.py b/src/jupyter_kernel_install/tests/test_kernel_cli.py index f5fab55..b4106b6 100644 --- a/src/jupyter_kernel_install/tests/test_kernel_cli.py +++ b/src/jupyter_kernel_install/tests/test_kernel_cli.py @@ -2,7 +2,7 @@ from pathlib import Path -from kernel_install.cli import cli +from jupyter_kernel_install.cli import cli def test_cli(python_kernel: Path) -> None: diff --git a/src/jupyter_kernel_install/tests/test_kernel_creation.py b/src/jupyter_kernel_install/tests/test_kernel_creation.py index 9db02ee..1041347 100644 --- a/src/jupyter_kernel_install/tests/test_kernel_creation.py +++ b/src/jupyter_kernel_install/tests/test_kernel_creation.py @@ -8,8 +8,8 @@ import mock import pytest -from kernel_install import bash, python, r -from kernel_install.install import get_ld_library_path_from_bin +from jupyter_kernel_install import bash, python, r +from jupyter_kernel_install.install import get_ld_library_path_from_bin def test_ld_library_path() -> None: