Skip to content
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

Merged
merged 7 commits into from
Mar 22, 2024
Merged

Fix science doc open. #60

merged 7 commits into from
Mar 22, 2024

Conversation

jsirois
Copy link
Contributor

@jsirois jsirois commented Mar 20, 2024

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.

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.
Copy link
Contributor Author

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.

@jsirois
Copy link
Contributor Author

jsirois commented Mar 22, 2024

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.

@jsirois jsirois marked this pull request as draft March 22, 2024 02:17
@jsirois jsirois marked this pull request as ready for review March 22, 2024 17:21
@jsirois jsirois merged commit 42fabc3 into a-scie:main Mar 22, 2024
7 checks passed
@jsirois jsirois deleted the docs/local/serve branch March 22, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants