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

feat(maidr.show): support non-interactive standalone script #55

Open
jooyoungseo opened this issue Jun 22, 2024 · 2 comments
Open

feat(maidr.show): support non-interactive standalone script #55

jooyoungseo opened this issue Jun 22, 2024 · 2 comments
Assignees
Labels
backlog Low priority issues

Comments

@jooyoungseo
Copy link
Member

Currently, maidr.show() requires a local server running so it works only when executed within an interactive session.

To support non-interactive standlone execution, I suggest the following:

if __name__ == "__main__":
    # If running as a script, save HTML and open in browser
    ## save the html file as a tempfile using `maidr.save()`
    ## Open the saved tempfile in browser via `webbrowser.open(f"file://{temp_path}")`
else:
    # If running in an interactive environment, use our `maidr.show()`

If you have any better ideas, feel free to go with that way.

@SaaiVenkat
Copy link
Collaborator

SaaiVenkat commented Jun 26, 2024

Professor @jooyoungseo ,

Currently, I would also recommend to use maidr.save_html() to execute a python script. In order to support the standalone script, we need to provide a backend similar to what visualization libraries are using to show the plots. This requires further design analysis, as this would be a big change. I would suggest to add this as backlog, since we have the highlighting feature pending.

@SaaiVenkat SaaiVenkat added the backlog Low priority issues label Jun 27, 2024
@SaaiVenkat
Copy link
Collaborator

Adding this to backlog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Low priority issues
Projects
None yet
Development

No branches or pull requests

2 participants