Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jupyter env: new build for new XClim and to get Dask dashboard and Panel server app to work #241

Merged
merged 16 commits into from May 5, 2022

Commits on Apr 13, 2022

  1. jupyter env: new build for new XClim and to get Dask dashboard and Pa…

    …nel server app to work
    tlvu committed Apr 13, 2022
    Configuration menu
    Copy the full SHA
    5167d78 View commit details
    Browse the repository at this point in the history
  2. jupyter: set BOKEH_ALLOW_WS_ORIGIN to ease step to start Panel server…

    … app
    
    With this setting, we will not need to provide `websocket_origin` as in the
    sample code below.
    
    ```
    import panel as pn
    srv = pn.panel(
        pn.widgets.FloatInput(name='an input')
    ).show(port=5007, websocket_origin="pavics.ouranos.ca")
    ```
    tlvu committed Apr 13, 2022
    Configuration menu
    Copy the full SHA
    bdbf4d8 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2022

  1. Configuration menu
    Copy the full SHA
    68f260c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1bb9eb8 View commit details
    Browse the repository at this point in the history
  3. jupyter: try to setup notebook_url for bokeh server, not working

    Following https://docs.bokeh.org/en/latest/docs/user_guide/jupyter.html#jupyterhub
    
    ======
    
    Define a function to help create the URL for the browser to connect to the Bokeh server.
    
    See below for a reference implementation. You’ll have to either modify this code or assign the URL of your JupyterHub installation to the environment variable EXTERNAL_URL. JupyterHub defaults to JUPYTERHUB_SERVICE_PREFIX in this case.
    
    def remote_jupyter_proxy_url(port):
        """
        Callable to configure Bokeh's show method when a proxy must be
        configured.
    
        If port is None we're asking about the URL
        for the origin header.
        """
        base_url = os.environ['EXTERNAL_URL']
        host = urllib.parse.urlparse(base_url).netloc
    
        # If port is None we're asking for the URL origin
        # so return the public hostname.
        if port is None:
            return host
    
        service_url_path = os.environ['JUPYTERHUB_SERVICE_PREFIX']
        proxy_url_path = 'proxy/%d' % port
    
        user_url = urllib.parse.urljoin(base_url, service_url_path)
        full_url = urllib.parse.urljoin(user_url, proxy_url_path)
        return full_url
    
    Pass the function you defined in step 2 to the show() function as the notebook_url keyword argument. Bokeh then calls this function when it sets up the server and creates the URL to load a graph:
    
    show(obj, notebook_url=remote_jupyter_proxy_url)
    
    =========
    tlvu committed Apr 14, 2022
    Configuration menu
    Copy the full SHA
    6f2e685 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9fc62b8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5aee605 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    730c933 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2022

  1. Configuration menu
    Copy the full SHA
    ae703db View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2022

  1. jupyter: new version has BOKEH_ALLOW_WS_ORIGIN already set to '*' so …

    …no need to set it in jupyterhub_config.py anymore
    tlvu committed Apr 24, 2022
    Configuration menu
    Copy the full SHA
    02f01fe View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2022

  1. Configuration menu
    Copy the full SHA
    940e00d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e18b9a0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d5d2332 View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2022

  1. jupyter: new version with working Panel preview button but do not wor…

    …k behind our JupyterHub
    tlvu committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    d3e14aa View commit details
    Browse the repository at this point in the history

Commits on May 5, 2022

  1. Configuration menu
    Copy the full SHA
    c7285b3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0cdb793 View commit details
    Browse the repository at this point in the history