-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Add config option to disable email prompt #11395
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
base: develop
Are you sure you want to change the base?
Conversation
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
not sure why this is failing, maybe the bold is messing it up?
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
I can understand the reasoning for not showing the email prompt, but what's the reason for not creating the |
The |
Oh, got it! I think we also started using the For this config option, I'm fine with merging it, but:
|
Hey @wyattscarpenter, one more question for understanding: how do you actually plan to use this config option? From the issue description, it seems like the use case here is preventing people (e.g., within your company) from leaking their email, which I assume would mean you somehow set a global config file for every user in |
@jrieke I suppose the most apropos answer to your question is thus: the GitHub repo in which our project lives has a .streamlit folder in it with a local config file, in which the option is set. (Currently server.headless, but later it will be server.showEmailPrompt.) And therefore the option is applied to the project without the creation of a ~/.streamlit folder 🙂 |
Alright, thanks; I've now incorporated those changes you mentioned two weeks ago, and fixed the merge conflict that arose in the interim. Should be good to go now. |
Co-authored-by: Debbie Matthews <debbie.matthews@snowflake.com>
Ok yeah, that seems like a fair use case. Approved from product side, I'll ping our engineers to give the code another look. |
Describe your changes
This creates a new configuration option, server.prompt, which controls if the "Welcome to Streamlit!" prompt is shown (and email is asked for and ~/.streamlit folder is created).
This is distinct from server.headless because the server is not run in headless mode (eg: the browser opens automatically).
Nota bene: because no .streamlit folder is created, the telemetry warning displays every time, which I think is fine. I assume it's better to inform the user of this (for the purposes of informed implicit consent) than the slight annoyance it presumably will cause some.
GitHub Issue Link (if applicable)
Closes #8098
Testing Plan
I'd like to test to ensure ~/.streamlit is not created if prompt is false, but I found it too difficult to figure out the right way to do this.
Side note
As I was doing this on Windows 10, in cmd, I got many pre-commit errors of the form
Failed to open the file: lib/streamlit/elements/arrow.py. Is it binary file?
, which I believe is an encoding error probably stemming from the fact that until https://peps.python.org/pep-0686/ goes through the default encoding on Windows is some random windows garbage, so files with emoji are detected as binary. However, I couldn't see anything obviously wrong with the relevant pre-commit hook (which doesn't even have that error message in its source code?) https://github.com/Lucas-C/pre-commit-hooks/blob/master/pre_commit_hooks/insert_license.py, so I decided not to investigate further. Just mentioning in case this helps someone somehow.Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.