Skip to content
This repository was archived by the owner on Mar 9, 2023. It is now read-only.

Conversation

@vinstonpandiyan
Copy link

Added base url configuration for MarvinAI Notebook
ex: marvin notebook --base-url=/marvin-notebook

Added base url configuration for MarvinAI Notebook
ex: marvin notebook --base-url=/marvin-notebook
Copy link
Contributor

@oldfly oldfly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice feature! some simple fixs needed in unit test for Travis CI approval


@cli.command('notebook', help='Start the Jupyter notebook server.')
@click.option('--port', '-p', default=8888, help='Jupyter server port')
@click.option('--base-url', '-p', default='/', help='Jupyter server base url')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The short parameter for base url could be something else than '-p' that conflicts with Port´s short parameter.

lab(ctx, port, enable_security, spark_conf)
lab(ctx, port, '/', enable_security, spark_conf)

system_mocked.assert_called_once_with('SPARK_CONF_DIR=/opt/spark/conf YARN_CONF_DIR=/opt/spark/conf jupyter-lab --notebook-dir /tmp/notebooks --ip 0.0.0.0 --port 8888 --no-browser --NotebookApp.token=')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding '--NotebookApp.base_url=/' for assertion error fix.

lab(ctx, port, enable_security, spark_conf)
lab(ctx, port, '/', enable_security, spark_conf)

system_mocked.assert_called_once_with('SPARK_CONF_DIR=/opt/spark/conf YARN_CONF_DIR=/opt/spark/conf jupyter-lab --notebook-dir /tmp/notebooks --ip 0.0.0.0 --port 8888 --no-browser')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding '--NotebookApp.base_url=/' for assertion error fix.

system_mocked.return_value = 1

notebook(ctx, port, enable_security, spark_conf, allow_root)
notebook(ctx, port, '/', enable_security, spark_conf, allow_root)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is better to still create a variable called base_url instead of directly put a '/' in the code.

Removed port conflict (-p) for base_url
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants