Skip to content

Commit 32af5af

Browse files
committed
Fix some typos
1 parent e07a615 commit 32af5af

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

docs/source/standalone.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(standanlone)=
1+
(standalone)=
22

33
# Spawning and proxying a web service from JupyterHub
44

@@ -160,7 +160,7 @@ client accessing any path of our server will be redirected to the JupyterHub API
160160
After a client has been authenticated with the JupyterHub API, they will be redirected back to our server.
161161
This redirect will be received on the `/oauth_callback` path, from where we need to redirect the client back to the
162162
root of the application.
163-
We use the [HubOAuthCallbackHander](https://github.com/jupyterhub/jupyterhub/blob/5.0.0/jupyterhub/services/auth.py#L1547),
163+
We use the [HubOAuthCallbackHandler](https://github.com/jupyterhub/jupyterhub/blob/5.0.0/jupyterhub/services/auth.py#L1547),
164164
another handler from the JupyterHub package, for this.
165165
It will also cache the received OAuth state from the login so that we can skip authentication for the next requests
166166
and do not need to go through the whole login process for each request.
@@ -183,12 +183,12 @@ configuration of this JupyterHub.
183183
JupyterHub uses a lot of environment variables to specify how the launched app should be run.
184184
This list is a small overview of all used variables and what they contain and are used for.
185185

186-
| Variable | Explanation | Typical Value |
187-
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |
188-
| `JUPYTERHUB_SERVICE_URL` | URL where the server should be listening. Used to find the Address and Port to start the server on. | `http://127.0.0.1:5555` |
189-
| `JUPYTERHUB_SERVICE_PREFIX` | An URL Prefix where the root of the launched application should be hosted. E.g., when set to `/user/name/`, then the root of the proxied aplication should be `/user/name/index.html` | `/services/service-name/` or `/user/name/` |
190-
| `JUPYTERHUB_ACTIVITY_URL` | URL where to send activity notifications to. | `$JUPYTERHUB_API_URL/user/name/activity` |
191-
| `JUPYTERHUB_API_TOKEN` | Authorization Token for requests to the JupyterHub API. | |
192-
| `JUPYTERHUB_SERVER_NAME` | A name given to all apps launched by the JupyterHub. | |
193-
| `JUPYTERHUB_SSL_KEYFILE`, `JUPYTERHUB_SSL_CERTFILE`, `JUPYTERHUB_SSL_CLIENT_CA` | Paths to keyfile, certfile and client CA for the SSL configuration | |
194-
| `JUPYTERHUB_USER`, `JUPYTERHUB_GROUP` | Name and Group of the user for this application. Required for Authentication |
186+
| Variable | Explanation | Typical Value |
187+
|---------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------|
188+
| `JUPYTERHUB_SERVICE_URL` | URL where the server should be listening. Used to find the Address and Port to start the server on. | `http://127.0.0.1:5555` |
189+
| `JUPYTERHUB_SERVICE_PREFIX` | An URL Prefix where the root of the launched application should be hosted. E.g., when set to `/user/name/`, then the root of the proxied application should be `/user/name/index.html` | `/services/service-name/` or `/user/name/` |
190+
| `JUPYTERHUB_ACTIVITY_URL` | URL where to send activity notifications to. | `$JUPYTERHUB_API_URL/user/name/activity` |
191+
| `JUPYTERHUB_API_TOKEN` | Authorization Token for requests to the JupyterHub API. | |
192+
| `JUPYTERHUB_SERVER_NAME` | A name given to all apps launched by the JupyterHub. | |
193+
| `JUPYTERHUB_SSL_KEYFILE`, `JUPYTERHUB_SSL_CERTFILE`, `JUPYTERHUB_SSL_CLIENT_CA` | Paths to keyfile, certfile and client CA for the SSL configuration | |
194+
| `JUPYTERHUB_USER`, `JUPYTERHUB_GROUP` | Name and Group of the user for this application. Required for Authentication |

jupyter_server_proxy/standalone/app.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,19 @@ class StandaloneProxyServer(JupyterApp, ServerProcess):
3535
help="""
3636
Base URL where Requests will be received and proxied. Usually taken from the
3737
"JUPYTERHUB_SERVICE_PREFIX" environment variable (or "/" when not set).
38-
Set to overwrite.
38+
Set to override.
3939
4040
When setting to "/foo/bar", only incoming requests starting with this prefix will
4141
be answered by the server and proxied to the proxied app. Any other requests will
4242
get a 404 response.
4343
""",
4444
).tag(config=True)
4545

46-
@default("prefix")
46+
@default("base_url")
4747
def _default_prefix(self):
4848
return os.environ.get("JUPYTERHUB_SERVICE_PREFIX", "/").removesuffix("/")
4949

50-
@validate("prefix")
50+
@validate("base_url")
5151
def _validate_prefix(self, proposal):
5252
return proposal["value"].removesuffix("/")
5353

@@ -65,7 +65,7 @@ def _validate_prefix(self, proposal):
6565
address = Unicode(
6666
help="""
6767
The address where the proxy server can be accessed. The address is usually taken from the `JUPYTERHUB_SERVICE_URL`
68-
environment variable or will default to `127.0.0.1`. Used to explicitely overwrite the address of the server.
68+
environment variable or will default to `127.0.0.1`. Used to explicitly override the address of the server.
6969
"""
7070
).tag(config=True)
7171

@@ -81,7 +81,7 @@ def _default_address(self):
8181
port = Int(
8282
help="""
8383
The port where the proxy server can be accessed. The port is usually taken from the `JUPYTERHUB_SERVICE_URL`
84-
environment variable or will default to `8888`. Used to explicitely overwrite the port of the server.
84+
environment variable or will default to `8888`. Used to explicitly override the port of the server.
8585
"""
8686
).tag(config=True)
8787

@@ -104,7 +104,7 @@ def _default_port(self):
104104
activity_interval = Int(
105105
default_value=300,
106106
help="""
107-
Specify an interval to send regulat activity updated to the JupyterHub (in Seconds).
107+
Specify an interval to send regular activity updates to the JupyterHub (in seconds).
108108
When enabled, the StandaloneProxy will try to send a POST request to the JupyterHub API
109109
containing a timestamp and the name of the server.
110110
The URL for the activity Endpoint needs to be specified in the "JUPYTERHUB_ACTIVITY_URL"
@@ -146,7 +146,7 @@ def __init__(self, **kwargs):
146146
}
147147

148148
# Create an Alias to all Traits defined in ServerProcess, with some
149-
# exeptions we do not need, for easier use of the CLI
149+
# exceptions we do not need, for easier use of the CLI
150150
# We don't need "command" here, as we will take it from the extra_args
151151
ignore_traits = [
152152
"name",
@@ -219,7 +219,7 @@ def create_app(self) -> web.Application:
219219
)
220220
settings["websocket_max_message_size"] = self.websocket_max_message_size
221221

222-
# Create the proxy class with out arguments
222+
# Create the proxy class without arguments
223223
proxy_handler, proxy_kwargs = self.make_proxy_handler()
224224

225225
base_url = re.escape(self.base_url)
@@ -282,7 +282,7 @@ def start(self):
282282
# Periodically send JupyterHub Notifications, that we are still running
283283
if self.activity_interval > 0:
284284
self.log.info(
285-
f"Sending Acitivity Notivication to JupyterHub with interval={self.activity_interval}s"
285+
f"Sending Activity Notification to JupyterHub with interval={self.activity_interval}s"
286286
)
287287
start_activity_update(self.activity_interval)
288288

0 commit comments

Comments
 (0)