holoviz / panel

Panel: The powerful data exploration & web app framework for Python
https://panel.holoviz.org
BSD 3-Clause "New" or "Revised" License
4.49k stars 490 forks source link

Please document panel serve defaults #5502

Open cdeil opened 10 months ago

cdeil commented 10 months ago

It's great that panel serve is so flexible and has so many options!

The help looks like this (shortened to just two options as example):

$ panel serve --help
...
  --check-unused-sessions MILLISECONDS
                        How often to check for unused sessions
  --unused-session-lifetime MILLISECONDS
                        How long unused sessions last
 ...

Would it be possible that you show the default values in the help output?

Currently I don't know how to find out that the default value e.g. for --unused-session-lifetime is!????

The help output doesn't show it and also I can't find it in the docs: https://panel.holoviz.org/search.html?q=unused-session-lifetime

hoxbro commented 10 months ago

I think we just inherit these from bokeh serve --help.

Look around this look to be set here: https://docs.bokeh.org/en/latest/docs/reference/server/tornado.html#bokeh-server-tornado

check_unused_sessions_milliseconds: int = 17000, 
unused_session_lifetime_milliseconds: int = 15000

So 17 and 15 seconds.

cdeil commented 10 months ago

@Hoxbro - thanks!

Exposing these (and the many other) defaults in the CLI help output for user convenience is difficult, right?

ahuang11 commented 10 months ago

Some of the options/flags are in Bokeh so those will need to be changed upstream in Bokeh.

However, there are other CLI defaults that can be documented here: https://github.com/holoviz/panel/blob/ff43d36e14ff84238e0450bd56c7541ca5a0147a/panel/command/serve.py#L86

Perhaps somehow modifying --help to also show default would be nice.