-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add plotly run command #3329
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: dev
Are you sure you want to change the base?
Add plotly run command #3329
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, that'll make remembering all the debug flags easier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to use that in the CI for some test to avoid regression?
@T4rk1n What do you think about using
|
@T4rk1n For the flags, is there a way to make the helptext clearer to the user about which option is the default? I.e. if I can pass For that matter (since I do know that no-debug is the default), what is the use case for the |
We should be able to detect the app object automatically given a Python file. Here's a pattern to do this: https://github.com/plotly/de-client/blob/main/src/de_client/cli/root.py#L302-L306 |
Yes that might be more convenient 👍
Oh, the |
:param app_path: The import path to the Dash app instance. | ||
:return: The loaded Dash app instance. | ||
""" | ||
app_split = app_path.split(":") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check that len(app_split) == 2
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I see that further down you're allowing users to provide just the module name, then using the first Dash
you find in that module.
app_instance = module_var | ||
break | ||
|
||
if not isinstance(app_instance, Dash): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if I run with just the module name, but the module doesn't define a Dash
, I think app_instance
will be uninitialized at the point of the isinstance()
check.
Add a command to run dash app from the terminal.
The command can be run two methods:
plotly run app:app --debug
python -m dash run app:app --debug
The arguments follow
Dash.run
, run help: