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

BaseURL Configuration for MarvinAI Notebook #32

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

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

@@ -29,15 +29,15 @@ def cli():

@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.

@@ -69,7 +69,7 @@ def test_jupyter_lab(system_mocked, sys_mocked):
spark_conf = '/opt/spark/conf'
system_mocked.return_value = 1

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.

@@ -83,6 +83,6 @@ def test_jupyter_lab_with_security(system_mocked, sys_mocked):
spark_conf = '/opt/spark/conf'
system_mocked.return_value = 1

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.

@@ -40,7 +40,7 @@ def test_notebook(system_mocked, sys_mocked):
spark_conf = '/opt/spark/conf'
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