-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Fix science doc open
.
#60
Conversation
This now uses a local HTTP server to serve docs which is much more straightfoward than trying to hack around all the quirks trying to serve a site via file:// URLs brings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is almost verbatim ripped off https://github.com/pex-tool/pex/blob/main/pex/docs/server.py
I spent an embarrassing amount of time learning the WSGI spec and getting this working using gunicorn with its built in pidfile and daemon support only to find out late that it:
a.) Doesn't support Windows - which science does
b.) Has a hard-coded serve port bind failure retry loop that tries 5 times sleeping 1s between each - this defeats a snappy, try default port and fallback to ephemeral.
Hrm. Yeah - getting this to work on Windows block and it still does not. I'm going to convert to draft and ping you all again when I have Windows daemons / services / whatever I need - figured out. |
This now uses a local HTTP server to serve docs which is much more
straightforward than trying to hack around all the quirks trying to
serve a site via file:// URLs brings.