Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jerowe committed Jan 25, 2023
1 parent 72bd501 commit 234147e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
9 changes: 3 additions & 6 deletions jupyter_rstudio_singularity/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ def sanity_check_singularity_image(
return True


def main(
@cli.command()
def launch(
remote_image: str = typer.Option(
"docker://dabbleofdevops/r-tidyverse:4.2.2",
help="""Path to the remote image.
Expand Down Expand Up @@ -268,9 +269,5 @@ def main(
return 0


def app():
typer.run(main())


if __name__ == "__main__":
typer.run(main()) # pragma: no cover
sys.exit(cli()) # pragma: no cover
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
description="Launch RStudio with Singularity from the command line.",
entry_points={
"console_scripts": [
"launch-rstudio=jupyter_rstudio_singularity.cli:app",
"launch-rstudio=jupyter_rstudio_singularity.cli:cli",
],
},
install_requires=requirements,
Expand Down
9 changes: 1 addition & 8 deletions tests/test_jupyter_rstudio_singularity.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

"""Tests for `jupyter_rstudio_singularity` package."""


import unittest
from click.testing import CliRunner

Expand All @@ -24,10 +23,4 @@ def test_000_something(self):

def test_command_line_interface(self):
"""Test the CLI."""
runner = CliRunner()
result = runner.invoke(cli.main)
assert result.exit_code == 0
assert "jupyter_rstudio_singularity.cli.main" in result.output
help_result = runner.invoke(cli.main, ["--help"])
assert help_result.exit_code == 0
assert "--help Show this message and exit." in help_result.output
return

0 comments on commit 234147e

Please sign in to comment.