Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions python/graphframes/console.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
import click
import logging

logger = logging.getLogger(__name__)

@click.group()
def cli():
"""GraphFrames CLI: a collection of commands for graphframes."""
pass
MISSING_TUTORIALS_EXTRA_MSG = (
"The `graphframes` CLI requires the optional `tutorials` dependencies, "
"which are not installed. Install them with: "
"pip install 'graphframes-py[tutorials]'"
)


def main():
from graphframes.tutorials import download
try:
import click

from graphframes.tutorials import download
except ImportError as err:
logger.error("%s (%s)", MISSING_TUTORIALS_EXTRA_MSG, err)
raise SystemExit(1) from err

@click.group()
def cli():
"""GraphFrames CLI: a collection of commands for graphframes."""
pass

cli.add_command(download.stackexchange)
cli()
Expand Down
Loading
Loading