Commit Graph

102 Commits

Author SHA1 Message Date
Min RK
6fc9e90f28 Don't set cwd to user's home for services
allow `cwd` setting to take effect
2017-01-15 20:10:06 +01:00
Min RK
5d41376c2e use JUPYTERHUB_API_TOKEN env in Spawner
to be more consistent with services

deprecate JPY_API_TOKEN, but keep it around for compatibility
2017-01-06 13:30:53 +01:00
Min RK
3b3bc8224b comment review 2016-12-20 16:41:26 +01:00
Min RK
72ab8f99ec Avoid cleaning up API tokens for Spawners that will resume
in which case the previous API token should be left alone.
2016-12-19 10:50:25 +01:00
Min RK
d5a6e2b2ac Merge pull request #886 from yuvipanda/spawner-docs 2016-11-30 13:48:05 +01:00
Min RK
2152a94156 review pass on spawner docstring changes
- small wording, spelling tweaks
- rst formatting fixes
- remove some spurious, cluttering newlines
- clearer traitlets default values on first line
2016-11-30 13:43:59 +01:00
YuviPanda
60bc92cf78 Spawner doc fixes per @willingc 2016-11-30 14:02:02 +05:30
YuviPanda
3b15467738 Clearer module docstring for spawner.py 2016-11-29 16:26:34 +08:00
YuviPanda
4970fe0a1c Add more docs for spawner base class 2016-11-29 16:25:15 +08:00
YuviPanda
4687fbe075 Add extended docs for LocalProcessSpawner too 2016-11-28 23:07:54 -08:00
YuviPanda
b0dc52781e Add info about shell expansion to cmd / args traitlets
We should probably standardize this too
2016-11-28 22:45:06 -08:00
YuviPanda
4f1f7d6b8f Add example use for default_url traitlet 2016-11-28 22:42:10 -08:00
YuviPanda
41f8608f4e Fix port config documentation to match reality 2016-11-28 22:41:47 -08:00
YuviPanda
12e3a5496d Rename MemorySpecification to ByteSpecification 2016-11-27 17:57:34 -08:00
YuviPanda
280644bab5 Expand traitlet documentation for spawner base class 2016-11-27 17:53:41 -08:00
YuviPanda
0f237f28e7 Rename the env variables
Match the traitlet names
2016-11-10 14:37:50 -08:00
YuviPanda
d63bd944ac Add clarifying comment about limit / guarantee env variables 2016-11-10 10:39:44 -08:00
YuviPanda
54e28d759d Some inline doc fixups 2016-11-10 10:31:04 -08:00
YuviPanda
a00c13ba67 Set allow_none=True for limit/guarantee floats 2016-11-09 09:41:54 -08:00
YuviPanda
b4bc5437dd Set allow_none = True as default for MemorySpecification 2016-11-08 22:43:47 -08:00
YuviPanda
9eb30f6ff6 Add resource limits / guarantees consistently to jupyterhub
- Allows us to standardize this on the spawner base class,
  so there's a consistent interface for different spawners
  to implement this.
- Specify the supported suffixes and various units we accept
  for memory and cpu units.
- Standardize the way we expose resource limit / guarantees
  to single-user servers
2016-11-08 17:17:10 -08:00
Min RK
7da7f7e074 quotes around single-user CLI args
avoids mishandling things such as integer-literals
2016-11-01 12:07:25 +01:00
Carol Willing
5163c7a97f Merge pull request #824 from minrk/allow-empty-state
Don't assume empty state means not running
2016-10-27 08:33:54 -07:00
Min RK
b9daef9947 docstring review 2016-10-27 11:41:23 +02:00
Carol Willing
d957c5158f Use warning instead of warn for logs 2016-10-26 04:06:29 -07:00
Min RK
adda2fcd90 Don't assume empty state means not running
Some Spawners may not need state,
and they should be allowed to resume on Hub restart as well.

Adds some detail about when .poll may be called and how it should behave in less obvious circumstances
2016-10-21 16:28:40 +02:00
Min RK
b8f4803ef4 Deprecate %U username substitution
use Python format-strings instead.
2016-09-15 12:05:46 +02:00
Min RK
42a993fd08 backward-combat for ip, port in LocalProcessSpawner subclasses
Subclasses prior to 0.6 may assume return value
of LocalProcessSpawner.start can be ignored
instead of passing it through.

For these cases, keep setting ip/port in the deprecated way
so that it still works with a warning,
rather than failing with the wrong port.
2016-09-08 16:54:52 +02:00
Min RK
a1c787ba5f basic implementation of managed services
- managed services are automatically restarted
- proxied services not there yet
2016-08-27 12:59:26 +02:00
Min RK
3159b61ae7 return (ip, port) from Spawner.start
removes the need for Spawners to set db state themselves in most cases

Should be backward-compatible with warnings.
2016-07-25 16:54:15 +02:00
Min RK
3f9205d405 Add a permissions-check hint when spawn fails with PermissionError 2016-07-01 14:36:34 +02:00
Min RK
1e21e00e1a return status from poll_and_notify
allows calling it directly
2016-04-27 14:28:23 +02:00
YuviPanda
45fcdc75c0 Add docs about callables in environment configurable 2016-03-31 23:44:08 -07:00
YuviPanda
705ff78715 Allow environment config values to be callable
This allows deployments to configure environment variables
that need to be different for each user / container (such as
credentials for various services, etc).
2016-03-31 11:52:53 -07:00
Matthias Bussonnier
26f0e8ea5c Import warnings, used on line 215, not imported. 2016-03-29 15:36:22 -07:00
Min RK
195eea55f3 log.warning 2016-03-29 09:22:32 -07:00
Min RK
7a2794af7c use traitlets-4.1 observe/default decorators 2016-03-27 10:41:36 -07:00
Min RK
fa48620076 use traitlets-4.1 .tag(config=True) API 2016-03-27 10:29:36 -07:00
Min RK
d0f1520642 Add Spawner.environment configurable
instead of making existing Spawner.env configurable

Spawner.env is deprecated
2016-03-22 13:48:26 +01:00
Min RK
be7a627c11 Make Spawner.env configurable
moves `_env_default` logic to `get_env`,
so that `Spawner.env` can be safely configurable
2016-03-11 12:34:49 +01:00
Min RK
9af103c673 fixes for handling failed chdir in spawners 2016-03-07 15:12:30 +01:00
shreddd
1316196542 Update spawner.py
type
2016-03-05 12:24:39 -08:00
Shreyas Cholia
1a377bd03a comment on default_url being used with notebook_dir 2016-03-05 12:16:10 -08:00
Shreyas Cholia
66a99ce881 Add support for default_url 2016-03-05 12:05:58 -08:00
Min RK
7f89f1a2a0 expose disable_user_config as Spawner.disable_user_config 2016-03-04 14:41:40 +01:00
Min RK
335b47d7c1 include protocol in subdomain_host
makes everything easier, and tests are passing with and without subdomains (yay!)
2016-02-28 11:12:41 +01:00
Min RK
a9b8542ec7 pass hub's host to single-user servers via hub_host 2016-02-26 17:32:54 +01:00
Min RK
f626d2f6e5 use 127.0.0.1 instead of localhost
localhost can cause some issues on badly behaved or misconfigured systems,
and 127 seems simpler.
2016-02-03 10:30:09 +01:00
evanlinde
bc4973fb43 username parameter for notebook_dir
Allow specifying user-specific notebook directories outside of user's home folder
2016-01-22 09:47:48 -06:00
Min RK
818510c2ca Merge pull request #381 from minrk/rtd-yml
add preliminary API docs
2016-01-22 12:03:57 +01:00