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

SDFV: Add web serving capability #1013

Merged
merged 2 commits into from Jun 2, 2022
Merged

SDFV: Add web serving capability #1013

merged 2 commits into from Jun 2, 2022

Conversation

orausch
Copy link
Collaborator

@orausch orausch commented Jun 1, 2022

When filename argument of SDFV is an int, start a http.server to serve the generated HTML and the dependencies.

This is really useful when interactively debugging sdfgs on a remote machine; you can just do sdfg.view(8000) (e.g. from within PDB), local-forward that port via SSH and then view the sdfg.

@orausch orausch requested a review from tbennun June 1, 2022 22:53
Copy link
Collaborator

@tbennun tbennun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment and a question: how do you stop serving the webpage? Otherwise LGTM

dace/cli/sdfv.py Outdated
# start the web server
import http.server
handler = partialclass(http.server.SimpleHTTPRequestHandler, directory=dirname)
httpd = http.server.HTTPServer(('localhost', 8000), handler)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you want to use the given port here?

@tbennun tbennun merged commit c4544b3 into master Jun 2, 2022
@tbennun tbennun deleted the orausch/serve-sdfv branch June 2, 2022 08:14
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