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

Add Execute Streamlit command for running Streamlit apps #1603

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

sfc-gh-vmaleki
Copy link
Collaborator

@sfc-gh-vmaleki sfc-gh-vmaleki commented Sep 19, 2024

Pre-review checklist

  • I've confirmed that instructions included in README.md are still correct after my changes in the codebase.
  • I've added or updated automated unit tests to verify correctness of my new code.
  • I've added or updated integration tests to verify correctness of my new code.
  • I've confirmed that my changes are working by executing CLI's commands manually on MacOS.
  • I've confirmed that my changes are working by executing CLI's commands manually on Windows.
  • I've confirmed that my changes are up-to-date with the target branch.
  • I've described my changes in the release notes.
  • I've described my changes in the section below.

Changes description

  • Implemented the execute command for running Streamlit apps in headless mode
    using snow streamlit execute <app-name>.
  • After execution, you can get the app URL by using snow streamlit get-url <app-name> --open and open it in your browser.
  • Wrote unit tests for the execute command, following the pattern used for notebooks.
  • Updated the Streamlit manager to support execution.

@sfc-gh-vmaleki sfc-gh-vmaleki requested review from a team as code owners September 19, 2024 20:47
@sfc-gh-turbaszek
Copy link
Collaborator

Can you please add integration test?

Executes a streamlit in a headless mode.
"""
_ = StreamlitManager().execute(app_name=name)
return MessageResult(f"Streamlit {name} executed.")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Usually we return message from Snowflake, in your case, what message is returned?

Copy link
Collaborator Author

@sfc-gh-vmaleki sfc-gh-vmaleki Sep 20, 2024

Choose a reason for hiding this comment

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

After running snow execute streamlit my-app the message was Streamlit my-app executed..

@sfc-gh-vmaleki sfc-gh-vmaleki enabled auto-merge (squash) September 20, 2024 16:20
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.

4 participants