edina / nbexchange

External exchange for nbgrader
Other
6 stars 2 forks source link

Generalise the connector for the exchange #2

Closed perllaghu closed 3 years ago

perllaghu commented 4 years ago

Currently the nbgrader plugin exchange.py code has

    base_service_url = Unicode(
        os.environ.get("NAAS_BASE_URL", "https://noteable.edina.ac.uk")
    ).tag(config=True)

    def service_url(self):
        this_url = urljoin(self.base_service_url, "/services/nbexchange/")
        self.log.debug(f"service_url: {this_url}")
        return this_url

and the exchange app.py has

        for handler in handlers.default_handlers:
            for url in handler.urls:
                self.handlers.append((url_path_join(self.base_url, url), handler))

(where base_url = os.environ.get("JUPYTERHUB_SERVICE_PREFIX", "/services/nbexchange/")

This was all built assuming the exchange was a service managed by the hub, rather than a separate thing.

This needs to be revisited.

perllaghu commented 3 years ago

This has been addressed.... it's the same as issues #25 & #26